Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TFileDrawMap.cxx
Go to the documentation of this file.
1// @(#)root/treeplayer:$Id$
2// Author: Rene Brun 15/01/2003
3
4/*************************************************************************
5 * Copyright (C) 1995-2003, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12/** \class TFileDrawMap
13This class is automatically called by TFile::DrawMap.
14It draws a canvas showing the internal structure of a ROOT file.
15Each key or basket in a file is shown with a fill area drawn
16at the byte position of the key/basket in the file.
17The Y axis of the canvas shows the number of Kbytes/Mbytes.
18The X axis shows the bytes between y(i) and y(i+1).
19A color corresponding to the class in the key/basket is automatically
20selected using the class unique identifier.
21
22When moving the mouse in the canvas, the "Event Status" panels
23shows the object corresponding to the mouse position.
24if the object is a key, it shows the class and object name as well as
25the file directory name if the file has sub-directories.
26
27if the object is a basket, it shows:
28 - the name of the Tree
29 - the name of the branch
30 - the basket number
31 - the entry number in the basket
32
33Special keys like the StreamerInfo record, the Keys List Record
34and the Free Blocks Record are also shown.
35
36When clicking the right mouse button, a pop-up menu is shown
37with its title identifying the picked object and with the items:
38 - DrawObject: in case of a key, the Draw function of the object is called
39 in case of a basket, the branch is drawn for all entries
40 - DumpObject: in case of a key, the Dump function of the object is called
41 in case of a basket, tree->Show(entry) is called
42 - InspectObject: the Inspect function is called for the object.
43
44The normal axis zoom functionality can be used to zoom or unzoom
45One can also use the TCanvas context menu SetCanvasSize to make
46a larger canvas and use the canvas scroll bars.
47
48When the class is built, it is possible to identify a subset of the
49objects to be shown. For example, to view only the keys with
50names starting with "abc", set the argument keys to "abc*".
51The default is to view all the objects.
52The argument options can also be used (only one option currently)
53When the option "same" is given, the new picture is superimposed.
54The option "same" is useful, eg:
55to draw all keys with names = "abc" in a first pass
56then all keys with names = "uv*" in a second pass, etc.
57*/
58
59#include "TFileDrawMap.h"
60#include "TROOT.h"
61#include "TClass.h"
62#include "TFile.h"
63#include "TTree.h"
64#include "TBranch.h"
65#include "TLeaf.h"
66#include "TMath.h"
67#include "TVirtualPad.h"
68#include "TH2.h"
69#include "TBox.h"
70#include "TKey.h"
71#include "TRegexp.h"
72#include "TSystem.h"
73#include "strlcpy.h"
74
75
76////////////////////////////////////////////////////////////////////////////////
77/// Default TreeFileMap constructor.
78
80{
81 fFile = nullptr;
82 fFrame = nullptr;
83 fXsize = 1000;
84 fYsize = 1000;
85}
86
87////////////////////////////////////////////////////////////////////////////////
88/// TFileDrawMap normal constructor.
89/// see descriptions of arguments above
90
91TFileDrawMap::TFileDrawMap(const TFile *file, const char *keys, Option_t *)
92 : TNamed("TFileDrawMap","")
93{
94 fFile = (TFile*) file;
95 fKeys = keys;
97
98 //create histogram used to draw the map frame
99
100 if (file->GetEND() > 1000000) {
101 fXsize = 1000000;
102 } else {
103 fXsize = 1000;
104 }
105 fYsize = 1 + Int_t(file->GetEND()/fXsize);
106
107 fFrame = new TH2D("hmapframe","",100,0,fXsize,100,0,fYsize);
108 fFrame->SetDirectory(nullptr);
111 if (fXsize > 1000) {
112 fFrame->GetYaxis()->SetTitle("MBytes");
113 } else {
114 fFrame->GetYaxis()->SetTitle("KBytes");
115 }
116 fFrame->GetXaxis()->SetTitle("Bytes");
117
118 if (gPad)
119 gPad->Clear();
120
121 fFrame->Draw("axis");
122 Draw();
123
124 if (gPad)
125 gPad->Update();
126}
127
128////////////////////////////////////////////////////////////////////////////////
129/// Tree destructor.
130
132{
133 //delete fFrame; //should not be deleted (kCanDelete set)
134}
135
136////////////////////////////////////////////////////////////////////////////////
137/// Returns info which corresponds to recent mouse position
138/// In case of normal graphics it is object name
139/// In case of web canvas use stored click event position
140
142{
143 TString info;
144 if (gPad && gPad->IsWeb()) {
145 // in case of web canvas one can try to use last click event
146 GetObjectInfoDir(fFile, gPad->GetEventX(), gPad->GetEventY(), info);
147 } else {
148 // last selected place stored as name
149 info = GetName();
150 }
151 return info;
152}
153
154
155////////////////////////////////////////////////////////////////////////////////
156/// Show sequence of baskets reads for the list of baskets involved
157/// in the list of branches (separated by ",")
158/// - if branches="", the branch pointed by the mouse is taken.
159/// - if branches="*", all branches are taken
160/// Example:
161///
162/// AnimateTree("x,y,u");
163
164void TFileDrawMap::AnimateTree(const char *branches)
165{
166 TString info = GetRecentInfo();
167
168 auto pos = info.Index(", basket=");
169 if (pos == kNPOS)
170 return;
171 info.Remove(pos);
172
173 pos = info.Index(", branch=");
174 if (pos == kNPOS)
175 return;
176 TString select_branches = info(pos + 9, info.Length() - pos - 9);
177
178 auto colon = info.Index("::");
179 if (colon == kNPOS)
180 return;
181
182 info.Resize(colon - 1);
183
184 auto tree = fFile->Get<TTree>(info);
185 if (!tree)
186 return;
187 if (branches && *branches)
188 select_branches = branches;
189
190 // create list of branches
191 Int_t nzip = 0;
192 TBranch *branch;
193 TObjArray list;
194 char *comma;
195 while((comma = strrchr((char*)select_branches.Data(),','))) {
196 *comma = 0;
197 comma++;
198 while (*comma == ' ') comma++;
199 branch = tree->GetBranch(comma);
200 if (branch) {
201 nzip += (Int_t)branch->GetZipBytes();
202 branch->SetUniqueID(0);
203 list.Add(branch);
204 }
205 }
206 comma = (char*)select_branches.Data();
207 while (*comma == ' ') comma++;
208 branch = tree->GetBranch(comma);
209 if (branch) {
210 nzip += (Int_t)branch->GetZipBytes();
211 branch->SetUniqueID(0);
212 list.Add(branch);
213 }
214 Double_t fractionRead = Double_t(nzip)/Double_t(fFile->GetEND());
215 Int_t nbranches = list.GetEntries();
216
217 // loop on all tree entries
218 Int_t nentries = (Int_t)tree->GetEntries();
219 Int_t sleep = 1;
220 Int_t stime = (Int_t)(100./(nentries*fractionRead));
221 if (stime < 10) {stime=1; sleep = nentries/400;}
222
223 for (Int_t entry=0;entry<nentries;entry++) {
224 for (Int_t ib=0;ib<nbranches;ib++) {
225 branch = (TBranch*)list.At(ib);
226 Int_t nbaskets = branch->GetListOfBaskets()->GetSize();
227 Int_t basket = TMath::BinarySearch(nbaskets,branch->GetBasketEntry(), (Long64_t) entry);
228 Int_t nbytes = branch->GetBasketBytes()[basket];
229 Int_t bseek = branch->GetBasketSeek(basket);
230 Int_t entry0 = branch->GetBasketEntry()[basket];
231 Int_t entryn = branch->GetBasketEntry()[basket+1];
232 Int_t eseek = (Int_t)(bseek + nbytes*Double_t(entry-entry0)/Double_t(entryn-entry0));
233 DrawMarker(ib, branch->GetUniqueID(), "ifilemap1");
234 DrawMarker(ib, eseek, "ifilemap2");
235 gPad->UpdateAsync();
236 branch->SetUniqueID(eseek);
238 if (entry%sleep == 0)
239 gSystem->Sleep(stime);
240 }
241 }
242}
243
244////////////////////////////////////////////////////////////////////////////////
245/// Compute distance from point px,py to this TreeFileMap.
246/// Find the closest object to the mouse, save its path in the TFileDrawMap name.
247
249{
250 Int_t pxmin = gPad->XtoAbsPixel(gPad->GetUxmin());
251 Int_t pxmax = gPad->XtoAbsPixel(gPad->GetUxmax());
252 Int_t pymin = gPad->YtoAbsPixel(gPad->GetUymin());
253 Int_t pymax = gPad->YtoAbsPixel(gPad->GetUymax());
254 if (px > pxmin && px < pxmax && py > pymax && py < pymin) {
255 SetName(GetObjectInfo(px,py));
256 return 0;
257 }
258 return fFrame->DistancetoPrimitive(px,py);
259}
260
261////////////////////////////////////////////////////////////////////////////////
262/// Draw marker.
263
264void TFileDrawMap::DrawMarker(Int_t marker, Long64_t eseek, const char *id)
265{
266 Double_t py = eseek / fXsize;
267 Double_t px = eseek % fXsize;
268 Double_t d = fXsize * 0.01;
269 Int_t mark = marker % 4;
270
271 Double_t xx[5], yy[5];
272 Int_t np = 0;
273
274 switch (mark) {
275 case 0:
276 np = 4; //down tringle
277 xx[0] = px; yy[0] = py - d;
278 xx[1] = px - d; yy[1] = py + d;
279 xx[2] = px + d; yy[2] = py + d;
280 xx[3] = px; yy[3] = py - d;
281 break;
282 case 1 :
283 np = 4; //up triangle
284 xx[0] = px; yy[0] = py + d;
285 xx[1] = px - d; yy[1] = py - d;
286 xx[2] = px + d; yy[2] = py - d;
287 xx[3] = px; yy[3] = py + d;
288 break;
289 case 2 :
290 np = 5; //open square
291 xx[0] = px - d; yy[0] = py - d;
292 xx[1] = px + d; yy[1] = py - d;
293 xx[2] = px + d; yy[2] = py + d;
294 xx[3] = px - d; yy[3] = py + d;
295 xx[4] = px - d; yy[4] = py - d;
296 break;
297 case 3 :
298 np = 5; // sandclock
299 xx[0] = px - d; yy[0] = py - d;
300 xx[1] = px + d; yy[1] = py + d;
301 xx[2] = px - d; yy[2] = py + d;
302 xx[3] = px + d; yy[3] = py - d;
303 xx[4] = px - d; yy[4] = py - d;
304 break;
305 }
306 if (np > 1)
307 gPad->PaintPolyLine(np, xx, yy, id);
308}
309
310////////////////////////////////////////////////////////////////////////////////
311/// Draw object at the mouse position.
312
314{
315 TVirtualPad *padsave = gROOT->GetSelectedPad();
316 if ((padsave == gPad) || (gPad && gPad->IsWeb())) {
317 //must create a new canvas
318 gROOT->MakeDefCanvas();
319 } else if (padsave) {
320 padsave->cd();
321 }
322
323 TString info = GetRecentInfo();
324
325 // case of a TTree
326 auto pbasket = info.Index(", basket=");
327 if (pbasket != kNPOS) {
328 info.Resize(pbasket);
329 auto pbranch = info.Index(", branch=");
330 if (pbranch == kNPOS)
331 return;
332
333 TString cbranch = info(pbranch + 9, info.Length() - pbranch - 9);
334
335 auto colon = info.Index("::");
336 if (colon == kNPOS)
337 return;
338
339 info.Resize(colon - 1);
340
341 auto tree = fFile->Get<TTree>(info);
342 if (tree)
343 tree->Draw(cbranch);
344 } else {
345 // other objects
346 auto obj = GetObject();
347 if (obj)
348 obj->Draw();
349 }
350}
351
352
353////////////////////////////////////////////////////////////////////////////////
354/// Dump object at the mouse position.
355
357{
358 TObject *obj = GetObject();
359 if (obj) {
360 obj->Dump();
361 return;
362 }
363
364 TString info = GetRecentInfo();
365
366 auto indx = info.Index("entry=");
367 if (indx == kNPOS)
368 return;
369
370 Int_t entry = 0;
371 sscanf(info.Data() + indx + 6, "%d", &entry);
372
373 auto colon = info.Index("::");
374 if (colon == kNPOS)
375 return;
376
377 info.Resize(colon - 1);
378
379 auto tree = fFile->Get<TTree>(info);
380 if (tree)
381 tree->Show(entry);
382}
383
384////////////////////////////////////////////////////////////////////////////////
385/// Retrieve object at the mouse position in memory.
386
388{
389 TString info = GetRecentInfo();
390
391 if (info.Contains("entry="))
392 return nullptr;
393
394 auto colon = info.Index("::");
395 if (colon == kNPOS)
396 return nullptr;
397
398 info.Resize(colon - 1);
399
400 return fFile->Get(info);
401}
402
403////////////////////////////////////////////////////////////////////////////////
404/// Redefines TObject::GetObjectInfo.
405/// Displays the keys info in the file corresponding to cursor position px,py
406/// in the canvas status bar info panel
407
409{
410 // Thread safety: this solution is not elegant, but given the action performed
411 // by the method, this construct can be considered non-problematic.
412 static TString info;
413 GetObjectInfoDir(fFile, px, py, info);
414 return (char*)info.Data();
415}
416
417////////////////////////////////////////////////////////////////////////////////
418/// Redefines TObject::GetObjectInfo.
419/// Displays the keys info in the directory
420/// corresponding to cursor position px,py
421
423{
424 Double_t x = gPad->AbsPixeltoX(px);
425 Double_t y = gPad->AbsPixeltoY(py);
426 Int_t iy = (Int_t)y;
427 Long64_t pbyte = (Long64_t)(fXsize*iy+x);
428 Int_t nbytes;
429 Long64_t bseek;
430 TDirectory *dirsav = gDirectory;
431 dir->cd();
432
433 TIter next(dir->GetListOfKeys());
434 TKey *key;
435 while ((key = (TKey*)next())) {
436 TDirectory *curdir = gDirectory;
438 // a TDirectory ?
439 if (cl && cl == TDirectoryFile::Class()) {
440 curdir->cd(key->GetName());
441 TDirectory *subdir = gDirectory;
442 bool gotInfo = GetObjectInfoDir(subdir, px, py, info);
443 if (gotInfo) {
444 dirsav->cd();
445 return true;
446 }
447 curdir->cd();
448 continue;
449 }
450 // a TTree ?
451 if (cl && cl->InheritsFrom(TTree::Class())) {
452 TTree *tree = (TTree*)gDirectory->Get(key->GetName());
453 TIter nextb(tree->GetListOfLeaves());
454 while (auto leaf = (TLeaf *)nextb()) {
455 TBranch *branch = leaf->GetBranch();
456 Int_t nbaskets = branch->GetMaxBaskets();
457 Int_t offsets = branch->GetEntryOffsetLen();
458 Int_t len = leaf->GetLen();
459 for (Int_t i = 0; i < nbaskets; i++) {
460 bseek = branch->GetBasketSeek(i);
461 if (!bseek)
462 break;
463 nbytes = branch->GetBasketBytes()[i];
464 if (pbyte >= bseek && pbyte < bseek + nbytes) {
465 Int_t entry = branch->GetBasketEntry()[i];
466 if (!offsets) entry += (pbyte-bseek)/len;
467 if (curdir == (TDirectory*)fFile) {
468 info.Form("%s%s ::%s, branch=%s, basket=%d, entry=%d",curdir->GetPath(),key->GetName(),key->GetClassName(),branch->GetName(),i,entry);
469 } else {
470 info.Form("%s/%s ::%s, branch=%s, basket=%d, entry=%d",curdir->GetPath(),key->GetName(),key->GetClassName(),branch->GetName(),i,entry);
471 }
472 return true;
473 }
474 }
475 }
476 }
477 nbytes = key->GetNbytes();
478 bseek = key->GetSeekKey();
479 if (pbyte >= bseek && pbyte < bseek+nbytes) {
480 if (curdir == (TDirectory*)fFile) {
481 info.Form("%s%s ::%s, nbytes=%d",curdir->GetPath(),key->GetName(),key->GetClassName(),nbytes);
482 } else {
483 info.Form("%s/%s ::%s, nbytes=%d",curdir->GetPath(),key->GetName(),key->GetClassName(),nbytes);
484 }
485 dirsav->cd();
486 return true;
487 }
488 }
489 // Are we in the Keys list
490 if (pbyte >= dir->GetSeekKeys() && pbyte < dir->GetSeekKeys()+dir->GetNbytesKeys()) {
491 info.Form("%sKeys List, nbytes=%d",dir->GetPath(),dir->GetNbytesKeys());
492 dirsav->cd();
493 return true;
494 }
495 if (dir == (TDirectory*)fFile) {
496 // Are we in the TStreamerInfo
497 if (pbyte >= fFile->GetSeekInfo() && pbyte < fFile->GetSeekInfo()+fFile->GetNbytesInfo()) {
498 info.Form("%sStreamerInfo List, nbytes=%d",dir->GetPath(),fFile->GetNbytesInfo());
499 dirsav->cd();
500 return true;
501 }
502 // Are we in the Free Segments
503 if (pbyte >= fFile->GetSeekFree() && pbyte < fFile->GetSeekFree()+fFile->GetNbytesFree()) {
504 info.Form("%sFree List, nbytes=%d",dir->GetPath(),fFile->GetNbytesFree());
505 dirsav->cd();
506 return true;
507 }
508 }
509 info.Form("(byte=%lld)",pbyte);
510 dirsav->cd();
511 return false;
512}
513
514////////////////////////////////////////////////////////////////////////////////
515/// Inspect object at the mouse position.
516
518{
519 TObject *obj = GetObject();
520 if (obj) obj->Inspect();
521}
522
523////////////////////////////////////////////////////////////////////////////////
524/// Paint this TFileDrawMap.
525
527{
528 //draw keys
530}
531
532////////////////////////////////////////////////////////////////////////////////
533/// Paint the object at bseek with nbytes using the box object.
534
536{
537 Int_t iy = bseek/fXsize;
538 Int_t ix = bseek%fXsize;
539 Int_t ny = 1+(nbytes+ix)/fXsize;
541 for (Int_t j=0;j<ny;j++) {
542 if (j == 0) xmin = (Double_t)ix;
543 else xmin = 0;
544 xmax = xmin + nbytes;
545 if (xmax > fXsize) xmax = fXsize;
546 ymin = iy+j;
547 ymax = ymin+1;
548 nbytes -= (Int_t)(xmax-xmin);
549 if (xmax < gPad->GetUxmin()) continue;
550 if (xmin > gPad->GetUxmax()) continue;
551 if (xmin < gPad->GetUxmin()) xmin = gPad->GetUxmin();
552 if (xmax > gPad->GetUxmax()) xmax = gPad->GetUxmax();
553 if (ymax < gPad->GetUymin()) continue;
554 if (ymin > gPad->GetUymax()) continue;
555 if (ymin < gPad->GetUymin()) ymin = gPad->GetUymin();
556 if (ymax > gPad->GetUymax()) ymax = gPad->GetUymax();
557 //box.TAttFill::Modify();
558 box.PaintBox(xmin,ymin,xmax,ymax);
559 }
560}
561
562////////////////////////////////////////////////////////////////////////////////
563/// Paint keys in a directory.
564
565void TFileDrawMap::PaintDir(TDirectory *dir, const char *keys)
566{
567 TDirectory *dirsav = gDirectory;
568 TIter next(dir->GetListOfKeys());
569 TKey *key;
570 Int_t color = 0;
571 TBox box;
572 TRegexp re(keys,true);
573 while ((key = (TKey*)next())) {
574 Int_t nbytes = key->GetNbytes();
575 Long64_t bseek = key->GetSeekKey();
577 if (cl) {
578 color = (Int_t)(cl->GetUniqueID()%20);
579 } else {
580 color = 1;
581 }
582 box.SetFillColor(color);
583 box.SetFillStyle(1001);
584 TString s = key->GetName();
585 if (strcmp(fKeys.Data(),key->GetName()) && s.Index(re) == kNPOS) continue;
586 // a TDirectory ?
587 if (cl && cl == TDirectoryFile::Class()) {
588 TDirectory *curdir = gDirectory;
589 gDirectory->cd(key->GetName());
590 TDirectory *subdir = gDirectory;
591 PaintDir(subdir,"*");
592 curdir->cd();
593 }
594 PaintBox(box,bseek,nbytes);
595 // a TTree ?
596 if (cl && cl->InheritsFrom(TTree::Class())) {
597 TTree *tree = (TTree*)gDirectory->Get(key->GetName());
598 TIter nextb(tree->GetListOfLeaves());
599 while (auto leaf = (TLeaf*)nextb()) {
600 TBranch *branch = leaf->GetBranch();
601 color = branch->GetFillColor();
602 if (color == 0) {
603 if (fBranchColors.find(branch) == fBranchColors.end()) {
604 gPad->IncrementPaletteColor(1, "pfc");
605 fBranchColors[branch] = gPad->NextPaletteColor();
606 }
607 color = fBranchColors[branch];
608 }
609 box.SetFillColor(color);
610 Int_t nbaskets = branch->GetMaxBaskets();
611 for (Int_t i=0;i<nbaskets;i++) {
612 bseek = branch->GetBasketSeek(i);
613 if (!bseek) break;
614 nbytes = branch->GetBasketBytes()[i];
615 PaintBox(box,bseek,nbytes);
616 }
617 }
618 }
619 }
620
621 // draw the box for Keys list
622 box.SetFillColor(50);
623 box.SetFillStyle(1001);
624 PaintBox(box,dir->GetSeekKeys(),dir->GetNbytesKeys());
625 if (dir == (TDirectory*)fFile) {
626 // draw the box for TStreamerInfo
627 box.SetFillColor(6);
628 box.SetFillStyle(3008);
630 // draw the box for Free Segments
631 box.SetFillColor(1);
632 box.SetFillStyle(1001);
634 }
635 dirsav->cd();
636}
#define d(i)
Definition RSha256.hxx:102
int Int_t
Signed integer 4 bytes (int)
Definition RtypesCore.h:60
double Double_t
Double 8 bytes.
Definition RtypesCore.h:74
constexpr Ssiz_t kNPOS
The equivalent of std::string::npos for the ROOT class TString.
Definition RtypesCore.h:132
long long Long64_t
Portable signed long integer 8 bytes.
Definition RtypesCore.h:84
const char Option_t
Option string (const char)
Definition RtypesCore.h:81
#define gDirectory
Definition TDirectory.h:385
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t np
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t len
float xmin
int nentries
float ymin
float xmax
float ymax
R__EXTERN C unsigned int sleep(unsigned int seconds)
#define gROOT
Definition TROOT.h:417
R__EXTERN TSystem * gSystem
Definition TSystem.h:582
#define gPad
virtual Color_t GetFillColor() const
Return the fill area color.
Definition TAttFill.h:32
Create a Box.
Definition TBox.h:22
A TTree is a list of TBranches.
Definition TBranch.h:93
virtual Long64_t GetBasketSeek(Int_t basket) const
Return address of basket in the file.
Definition TBranch.cxx:1300
TObjArray * GetListOfBaskets()
Definition TBranch.h:254
Int_t GetMaxBaskets() const
Definition TBranch.h:257
Int_t * GetBasketBytes() const
Definition TBranch.h:223
Long64_t GetZipBytes(Option_t *option="") const
Return total number of zip bytes in the branch if option ="*" includes all sub-branches of this branc...
Definition TBranch.cxx:2236
Long64_t * GetBasketEntry() const
Definition TBranch.h:224
Int_t GetEntryOffsetLen() const
Definition TBranch.h:236
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition TClass.h:84
Bool_t InheritsFrom(const char *cl) const override
Return kTRUE if this class inherits from a class with name "classname".
Definition TClass.cxx:4995
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
Definition TClass.cxx:2999
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
static TClass * Class()
TObject * Get(const char *namecycle) override
Return pointer to object identified by namecycle.
Describe directory structure in memory.
Definition TDirectory.h:45
virtual Int_t GetNbytesKeys() const
Definition TDirectory.h:227
virtual const char * GetPath() const
Returns the full path of the directory.
virtual Bool_t cd()
Change current directory to "this" directory.
virtual Long64_t GetSeekKeys() const
Definition TDirectory.h:231
virtual TList * GetListOfKeys() const
Definition TDirectory.h:224
virtual bool GetObjectInfoDir(TDirectory *dir, Int_t px, Int_t py, TString &info) const
Redefines TObject::GetObjectInfo.
TFile * fFile
! Pointer to the file, cannot be persistent
virtual void DrawObject()
Draw object at the mouse position.
Int_t fYsize
Size in K/Mbytes of Y axis.
TString fKeys
List of keys.
~TFileDrawMap() override
Tree destructor.
virtual void PaintDir(TDirectory *dir, const char *keys)
Paint keys in a directory.
Int_t fXsize
Size in bytes of X axis.
virtual void DumpObject()
Dump object at the mouse position.
virtual void InspectObject()
Inspect object at the mouse position.
virtual void DrawMarker(Int_t marker, Long64_t eseek, const char *id)
Draw marker.
TFileDrawMap()
Default TreeFileMap constructor.
TString GetRecentInfo()
Returns info which corresponds to recent mouse position In case of normal graphics it is object name ...
char * GetObjectInfo(Int_t px, Int_t py) const override
Redefines TObject::GetObjectInfo.
TH2 * fFrame
Histogram used to draw the map frame.
virtual void PaintBox(TBox &box, Long64_t bseek, Int_t nbytes)
Paint the object at bseek with nbytes using the box object.
virtual TObject * GetObject()
Retrieve object at the mouse position in memory.
virtual void AnimateTree(const char *branches="")
Show sequence of baskets reads for the list of baskets involved in the list of branches (separated by...
std::map< TBranch *, Int_t > fBranchColors
! map of generated colors for the branches
Int_t DistancetoPrimitive(Int_t px, Int_t py) override
Compute distance from point px,py to this TreeFileMap.
void Paint(Option_t *option) override
Paint this TFileDrawMap.
A file, usually with extension .root, that stores data and code in the form of serialized objects in ...
Definition TFile.h:130
virtual Long64_t GetSeekFree() const
Definition TFile.h:340
virtual Long64_t GetEND() const
Definition TFile.h:319
virtual Long64_t GetSeekInfo() const
Definition TFile.h:341
virtual Int_t GetNbytesFree() const
Definition TFile.h:337
virtual Int_t GetNbytesInfo() const
Definition TFile.h:336
virtual void SetDirectory(TDirectory *dir)
By default, when a histogram is created, it is added to the list of histogram objects in the current ...
Definition TH1.cxx:9170
Int_t DistancetoPrimitive(Int_t px, Int_t py) override
Compute distance from point px,py to a line.
Definition TH1.cxx:2952
@ kNoStats
Don't draw stats box.
Definition TH1.h:403
TAxis * GetXaxis()
Definition TH1.h:571
TAxis * GetYaxis()
Definition TH1.h:572
void Draw(Option_t *option="") override
Draw this histogram with options.
Definition TH1.cxx:3193
2-D histogram with a double per channel (see TH1 documentation)
Definition TH2.h:400
Book space in a file, create I/O buffers, to fill them, (un)compress them.
Definition TKey.h:28
virtual Long64_t GetSeekKey() const
Definition TKey.h:91
Int_t GetNbytes() const
Definition TKey.h:88
virtual const char * GetClassName() const
Definition TKey.h:77
A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
Definition TLeaf.h:57
The TNamed class is the base class for all named ROOT classes.
Definition TNamed.h:29
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
Definition TNamed.cxx:173
const char * GetName() const override
Returns name of object.
Definition TNamed.h:49
virtual void SetName(const char *name)
Set the name of the TNamed.
Definition TNamed.cxx:149
An array of TObjects.
Definition TObjArray.h:31
Mother of all ROOT objects.
Definition TObject.h:42
virtual void Inspect() const
Dump contents of this object in a graphics canvas.
Definition TObject.cxx:569
virtual void Dump() const
Dump contents of object on stdout.
Definition TObject.cxx:366
virtual UInt_t GetUniqueID() const
Return the unique object id.
Definition TObject.cxx:479
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
Definition TObject.cxx:886
virtual void SetUniqueID(UInt_t uid)
Set the unique object id.
Definition TObject.cxx:897
@ kCanDelete
if object in a list can be deleted
Definition TObject.h:71
Regular expression class.
Definition TRegexp.h:31
Basic string class.
Definition TString.h:137
Ssiz_t Length() const
Definition TString.h:426
const char * Data() const
Definition TString.h:385
void Resize(Ssiz_t n)
Resize the string. Truncate or add blanks as necessary.
Definition TString.cxx:1160
TString & Remove(Ssiz_t pos)
Definition TString.h:695
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
Definition TString.cxx:2438
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Definition TString.h:642
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
Definition TString.h:661
virtual void Sleep(UInt_t milliSec)
Sleep milliSec milli seconds.
Definition TSystem.cxx:440
virtual Bool_t ProcessEvents()
Process pending events (GUI, timers, sockets).
Definition TSystem.cxx:419
A TTree represents a columnar dataset.
Definition TTree.h:95
virtual void Show(Long64_t entry=-1, Int_t lenmax=20)
Print values of all active leaves for entry.
Definition TTree.cxx:9810
virtual TObjArray * GetListOfLeaves()
Definition TTree.h:590
void Draw(Option_t *opt) override
Default Draw method for all objects.
Definition TTree.h:492
static TClass * Class()
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Definition TVirtualPad.h:53
virtual TVirtualPad * GetSelectedPad() const =0
virtual TVirtualPad * cd(Int_t subpadnumber=0)=0
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Definition fillpatterns.C:1
Double_t y[n]
Definition legend1.C:17
Double_t x[n]
Definition legend1.C:17
Long64_t BinarySearch(Long64_t n, const T *array, T value)
Binary search in an array of n values to locate value.
Definition TMathBase.h:329
th1 Draw()