93 :
TNamed(
"TFileDrawMap",
"")
101 if (file->
GetEND() > 1000000) {
109 fFrame->SetDirectory(
nullptr);
113 fFrame->GetYaxis()->SetTitle(
"MBytes");
115 fFrame->GetYaxis()->SetTitle(
"KBytes");
117 fFrame->GetXaxis()->SetTitle(
"Bytes");
169 auto pos = info.
Index(
", basket=");
174 pos = info.
Index(
", branch=");
177 TString select_branches = info(pos + 9, info.
Length() - pos - 9);
179 auto colon = info.
Index(
"::");
188 if (branches && *branches)
189 select_branches = branches;
196 while((comma = strrchr((
char*)select_branches.
Data(),
','))) {
199 while (*comma ==
' ') comma++;
200 branch = tree->GetBranch(comma);
207 comma = (
char*)select_branches.
Data();
208 while (*comma ==
' ') comma++;
209 branch = tree->GetBranch(comma);
216 Int_t nbranches = list.GetEntries();
223 gPad->SetDoubleBuffer(0);
226 for (
Int_t ib=0;ib<nbranches;ib++) {
227 branch = (
TBranch*)list.At(ib);
254 if (px > pxmin && px < pxmax && py > pymax && py < pymin) {
258 return fFrame->DistancetoPrimitive(px,py);
269 Int_t mark = marker%4;
307 gROOT->MakeDefCanvas();
308 }
else if (padsave) {
315 auto pbasket = info.
Index(
", basket=");
316 if (pbasket !=
kNPOS) {
318 auto pbranch = info.
Index(
", branch=");
319 if (pbranch ==
kNPOS)
322 TString cbranch = info(pbranch + 9, info.
Length() - pbranch - 9);
324 auto colon = info.
Index(
"::");
355 auto indx = info.
Index(
"entry=");
360 sscanf(info.
Data() + indx + 6,
"%d", &entry);
362 auto colon = info.
Index(
"::");
383 auto colon = info.
Index(
"::");
389 return fFile->Get(info);
403 return (
char*)info.
Data();
424 while ((key = (
TKey*)next())) {
443 while (
auto leaf = (
TLeaf *)nextb()) {
444 TBranch *branch = leaf->GetBranch();
447 Int_t len = leaf->GetLen();
448 for (
Int_t i = 0; i < nbaskets; i++) {
453 if (pbyte >= bseek && pbyte < bseek + nbytes) {
455 if (!offsets) entry += (pbyte-bseek)/len;
468 if (pbyte >= bseek && pbyte < bseek+nbytes) {
486 if (pbyte >=
fFile->GetSeekInfo() && pbyte < fFile->GetSeekInfo()+
fFile->GetNbytesInfo()) {
487 info.
Form(
"%sStreamerInfo List, nbytes=%d",dir->
GetPath(),
fFile->GetNbytesInfo());
492 if (pbyte >=
fFile->GetSeekFree() && pbyte < fFile->GetSeekFree()+
fFile->GetNbytesFree()) {
498 info.
Form(
"(byte=%lld)",pbyte);
530 for (
Int_t j=0;j<ny;j++) {
539 if (
xmin >
gPad->GetUxmax())
continue;
543 if (
ymin >
gPad->GetUymax())
continue;
562 while ((key = (
TKey*)next())) {
571 box.SetFillColor(color);
572 box.SetFillStyle(1001);
588 while (
auto leaf = (
TLeaf*)nextb()) {
589 TBranch *branch = leaf->GetBranch();
593 gPad->IncrementPaletteColor(1,
"pfc");
598 box.SetFillColor(color);
600 for (
Int_t i=0;i<nbaskets;i++) {
611 box.SetFillColor(50);
612 box.SetFillStyle(1001);
617 box.SetFillStyle(3008);
621 box.SetFillStyle(1001);
int Int_t
Signed integer 4 bytes (int).
double Double_t
Double 8 bytes.
constexpr Ssiz_t kNPOS
The equivalent of std::string::npos for the ROOT class TString.
long long Long64_t
Portable signed long integer 8 bytes.
const char Option_t
Option string (const char).
unsigned int sleep(unsigned int seconds)
virtual Color_t GetFillColor() const
Return the fill area color.
A TTree is a list of TBranches.
virtual Long64_t GetBasketSeek(Int_t basket) const
Return address of basket in the file.
TObjArray * GetListOfBaskets()
Int_t GetMaxBaskets() const
Int_t * GetBasketBytes() const
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...
Long64_t * GetBasketEntry() const
Int_t GetEntryOffsetLen() const
TClass instances represent classes, structs and namespaces in the ROOT type system.
Bool_t InheritsFrom(const char *cl) const override
Return kTRUE if this class inherits from a class with name "classname".
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 Int_t GetSize() const
Return the capacity of the collection, i.e.
Describe directory structure in memory.
virtual Int_t GetNbytesKeys() const
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
virtual TList * GetListOfKeys() const
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.
virtual void DrawMarker(Int_t marker, Long64_t eseek)
Draw marker.
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.
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 ...
virtual Long64_t GetEND() const
@ kNoStats
Don't draw stats box.
2-D histogram with a double per channel (see TH1 documentation)
Book space in a file, create I/O buffers, to fill them, (un)compress them.
virtual Long64_t GetSeekKey() const
virtual const char * GetClassName() const
A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
const char * GetName() const override
Returns name of object.
virtual void SetName(const char *name)
Set the name of the TNamed.
virtual void Inspect() const
Dump contents of this object in a graphics canvas.
virtual void Dump() const
Dump contents of object on stdout.
virtual UInt_t GetUniqueID() const
Return the unique object id.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual void SetUniqueID(UInt_t uid)
Set the unique object id.
TObject()
TObject constructor.
@ kCanDelete
if object in a list can be deleted
Regular expression class.
const char * Data() const
void Resize(Ssiz_t n)
Resize the string. Truncate or add blanks as necessary.
TString & Remove(Ssiz_t pos)
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
A TTree represents a columnar dataset.
virtual void Show(Long64_t entry=-1, Int_t lenmax=20)
Print values of all active leaves for entry.
virtual TObjArray * GetListOfLeaves()
void Draw(Option_t *opt) override
Default Draw method for all objects.
TVirtualPad is an abstract base class for the Pad and Canvas classes.
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)
Long64_t BinarySearch(Long64_t n, const T *array, T value)
Binary search in an array of n values to locate value.