93 :
TNamed(
"TFileDrawMap",
"")
103 if (file->
GetEND() > 1000000) {
156 if (pos ==
kNPOS)
return;
158 pos = ourbranches.
Index(
", branch=");
159 if (pos ==
kNPOS)
return;
160 ourbranches[pos] = 0;
165 if (strlen(branches) > 0) info = branches;
166 else info = ourbranches.
Data()+pos+9;
167 printf(
"Animating tree, branches=%s\n",info.
Data());
174 while((comma = strrchr((
char*)info.
Data(),
','))) {
177 while (*comma ==
' ') comma++;
185 comma = (
char*)info.
Data();
186 while (*comma ==
' ') comma++;
199 Int_t stime = (
Int_t)(100./(nentries*fractionRead));
200 if (stime < 10) {stime=1; sleep = nentries/400;}
201 gPad->SetDoubleBuffer(0);
204 for (
Int_t ib=0;ib<nbranches;ib++) {
232 if (px > pxmin && px < pxmax && py > pymax && py < pymin) {
254 gVirtualX->DrawLine(ix-d,iy-d,ix-d,iy+d);
258 gVirtualX->DrawLine(ix-d,iy-d,ix+d,iy-d);
264 gVirtualX->DrawLine(ix-d,iy-d,ix+d,iy-d);
265 gVirtualX->DrawLine(ix+d,iy-d,ix+d,iy+d);
266 gVirtualX->DrawLine(ix+d,iy+d,ix-d,iy+d);
267 gVirtualX->DrawLine(ix-d,iy+d,ix-d,iy-d);
283 if (padsave ==
gPad) {
285 gROOT->MakeDefCanvas();
293 char *cbasket = (
char*)strstr(info,
", basket=");
296 char *cbranch = (
char*)strstr(info,
", branch=");
297 if (!cbranch)
return;
301 if (tree) tree->
Draw(cbranch);
307 if (obj) obj->
Draw();
321 char *centry = (
char*)strstr(
GetName(),
"entry=");
324 sscanf(centry+6,
"%d",&entry);
326 char *colon = (
char*)strstr((
char*)info.
Data(),
"::");
331 if (tree) tree->
Show(entry);
347 if (strstr(
GetName(),
"entry="))
return 0;
350 char *colon = strstr(info,
"::");
351 if (!colon)
return 0;
368 return (
char*)info.
Data();
389 while ((key = (
TKey*)next())) {
394 curdir->
cd(key->GetName());
409 while ((leaf = (
TLeaf*)nextb())) {
410 TBranch *branch = leaf->GetBranch();
413 Int_t len = leaf->GetLen();
414 for (
Int_t i=0;i<nbaskets;i++) {
418 if (pbyte >= bseek && pbyte < bseek+nbytes) {
420 if (!offsets) entry += (pbyte-bseek)/len;
422 info.
Form(
"%s%s, branch=%s, basket=%d, entry=%d",curdir->
GetPath(),key->GetName(),branch->
GetName(),i,entry);
424 info.
Form(
"%s/%s, branch=%s, basket=%d, entry=%d",curdir->
GetPath(),key->GetName(),branch->
GetName(),i,entry);
431 nbytes = key->GetNbytes();
432 bseek = key->GetSeekKey();
433 if (pbyte >= bseek && pbyte < bseek+nbytes) {
435 info.
Form(
"%s%s ::%s, nbytes=%d",curdir->
GetPath(),key->GetName(),key->GetClassName(),nbytes);
437 info.
Form(
"%s/%s ::%s, nbytes=%d",curdir->
GetPath(),key->GetName(),key->GetClassName(),nbytes);
451 if (pbyte >= fFile->GetSeekInfo() && pbyte < fFile->GetSeekInfo()+fFile->GetNbytesInfo()) {
452 info.
Form(
"%sStreamerInfo List, nbytes=%d",dir->
GetPath(),fFile->GetNbytesInfo());
457 if (pbyte >= fFile->GetSeekFree() && pbyte < fFile->GetSeekFree()+fFile->GetNbytesFree()) {
458 info.
Form(
"%sFree List, nbytes=%d",dir->
GetPath(),fFile->GetNbytesFree());
463 info.
Form(
"(byte=%lld)",pbyte);
509 for (
Int_t j=0;j<ny;j++) {
512 xmax = xmin + nbytes;
516 nbytes -= (
Int_t)(xmax-xmin);
517 if (xmax < gPad->GetUxmin())
continue;
518 if (xmin >
gPad->GetUxmax())
continue;
519 if (xmin < gPad->GetUxmin()) xmin =
gPad->GetUxmin();
520 if (xmax >
gPad->GetUxmax()) xmax =
gPad->GetUxmax();
521 if (ymax < gPad->GetUymin())
continue;
522 if (ymin >
gPad->GetUymax())
continue;
523 if (ymin < gPad->GetUymin()) ymin =
gPad->GetUymin();
524 if (ymax >
gPad->GetUymax()) ymax =
gPad->GetUymax();
541 while ((key = (
TKey*)next())) {
542 Int_t nbytes = key->GetNbytes();
568 while ((leaf = (
TLeaf*)nextb())) {
569 TBranch *branch = leaf->GetBranch();
571 if (color == 0) color = 1;
574 for (
Int_t i=0;i<nbaskets;i++) {
virtual void PaintDir(TDirectory *dir, const char *keys)
Paint keys in a directory.
virtual void DrawMarker(Int_t marker, Long64_t eseek)
Draw marker.
virtual const char * GetName() const
Returns name of object.
virtual Double_t GetMaximumStored() const
A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
virtual UInt_t GetUniqueID() const
Return the unique object id.
virtual TObject * GetObject()
Retrieve object at the mouse position in memory.
virtual void Paint(Option_t *option="")
Control routine to paint any kind of histograms.
Long64_t * GetBasketEntry() const
virtual Bool_t ProcessEvents()
Process pending events (GUI, timers, sockets).
virtual Bool_t GetObjectInfoDir(TDirectory *dir, Int_t px, Int_t py, TString &info) const
Redefines TObject::GetObjectInfo.
virtual TList * GetListOfKeys() const
virtual void SetMaximum(Double_t maximum=-1111)
virtual void SetLimits(Double_t xmin, Double_t xmax)
TObjArray * GetListOfBaskets()
virtual Long64_t GetSeekInfo() const
virtual void SetDirectory(TDirectory *dir)
By default when an histogram is created, it is added to the list of histogram objects in the current ...
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...
virtual ~TFileDrawMap()
Tree destructor.
virtual void InspectObject()
Inspect object at the mouse position.
virtual void SetName(const char *name)
Set the name of the TNamed.
virtual void PaintBox(TBox &box, Long64_t bseek, Int_t nbytes)
Paint the object at bseek with nbytes using the box object.
virtual char * GetObjectInfo(Int_t px, Int_t py) const
Redefines TObject::GetObjectInfo.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
Regular expression class.
virtual TObject * Get(const char *namecycle)
Return pointer to object identified by namecycle.
virtual void SetMinimum(Double_t minimum=-1111)
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
virtual void DrawObject()
Draw object at the mouse position.
virtual Int_t GetNbytesKeys() const
void ToLower()
Change string to lower-case.
virtual void Draw(Option_t *option="")
Default Draw method for all objects.
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute distance from point px,py to this TreeFileMap.
TObject * At(Int_t idx) const
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Int_t GetEntryOffsetLen() const
virtual TVirtualPad * cd(Int_t subpadnumber=0)=0
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
if object in a list can be deleted
virtual Long64_t GetSeekFree() const
TFileDrawMap()
Default TreeFileMap constructor.
Int_t * GetBasketBytes() const
virtual void Sleep(UInt_t milliSec)
Sleep milliSec milli seconds.
The TNamed class is the base class for all named ROOT classes.
virtual void Show(Long64_t entry=-1, Int_t lenmax=20)
Print values of all active leaves for entry.
Book space in a file, create I/O buffers, to fill them, (un)compress them.
TVirtualPad is an abstract base class for the Pad and Canvas classes.
virtual Long64_t GetSeekKeys() const
void GetObject(const char *namecycle, T *&ptr)
virtual void SetUniqueID(UInt_t uid)
Set the unique object id.
virtual TBranch * GetBranch(const char *name)
Return pointer to the branch with the given name in this tree or its friends.
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute distance from point px,py to a line.
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to one event.
R__EXTERN TSystem * gSystem
virtual void Draw(Option_t *option="")
Draw this histogram with options.
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual void Inspect() const
Dump contents of this object in a graphics canvas.
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
virtual void DumpObject()
Dump object at the mouse position.
Int_t GetMaxBaskets() const
The ROOT global object gROOT contains a list of all defined classes.
Bool_t InheritsFrom(const char *cl) const
Return kTRUE if this class inherits from a class with name "classname".
virtual const char * GetPath() const
Returns the full path of the directory.
virtual void AnimateTree(const char *branches="")
Show sequence of baskets reads for the list of baskets involved in the list of branches (separated by...
virtual void PaintBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2, Option_t *option="")
Draw this box with new coordinates.
virtual void Paint(Option_t *option)
Paint this TFileDrawMap.
virtual Long64_t GetBasketSeek(Int_t basket) const
Return address of basket in the file.
TString & Remove(Ssiz_t pos)
virtual Int_t GetNbytesFree() const
virtual Int_t GetNbytesInfo() const
Describe directory structure in memory.
virtual void Dump() const
Dump contents of object on stdout.
virtual void Draw(Option_t *opt)
Default Draw method for all objects.
virtual Color_t GetFillColor() const
Return the fill area color.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
static constexpr double s
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.
virtual Long64_t GetEntries() const
R__EXTERN C unsigned int sleep(unsigned int seconds)
Mother of all ROOT objects.
virtual Long64_t GetEND() const
virtual Bool_t cd(const char *path=0)
Change current directory to "this" directory.
THist< 1, double, THistStatContent, THistStatUncertainty > TH1D
Int_t GetEntries() const
Return the number of objects in array (i.e.
A TTree object has a header with a name and a title.
virtual Int_t GetSize() const
A TTree is a list of TBranches.
This class is automatically called by TFile::DrawMap.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to one event.
Long64_t BinarySearch(Long64_t n, const T *array, T value)
TAxis * GetXaxis()
Get the behaviour adopted by the object about the statoverflows. See EStatOverflows for more informat...
virtual TObjArray * GetListOfLeaves()
const char * Data() const