Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TFileDrawMap.h
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#ifndef ROOT_TFileDrawMap
13#define ROOT_TFileDrawMap
14
15
16//////////////////////////////////////////////////////////////////////////
17// //
18// TFileDrawMap //
19// //
20// Draw a 2-d map of the objects in a file //
21// //
22//////////////////////////////////////////////////////////////////////////
23
24#include "TNamed.h"
25
26#include <map>
27
28class TH2;
29class TFile;
30class TDirectory;
31class TBox;
32class TBranch;
33
34class TFileDrawMap : public TNamed {
35
36protected:
37 TFile *fFile = nullptr; ///<! Pointer to the file, cannot be persistent
38 std::map<TBranch*, Int_t> fBranchColors; ///<! map of generated colors for the branches
39 TH2 *fFrame = nullptr; ///< Histogram used to draw the map frame
40 TString fKeys; ///< List of keys
41 Int_t fXsize = 0; ///< Size in bytes of X axis
42 Int_t fYsize = 0; ///< Size in K/Mbytes of Y axis
43
44 virtual void DrawMarker(Int_t marker, Long64_t eseek);
45 virtual bool GetObjectInfoDir(TDirectory *dir, Int_t px, Int_t py, TString &info) const;
46 virtual void PaintBox(TBox &box, Long64_t bseek, Int_t nbytes);
47 virtual void PaintDir(TDirectory *dir, const char *keys);
48 virtual TObject *GetObject();
49
51
52public:
54 TFileDrawMap(const TFile *file, const char *keys, Option_t *option = "");
55 ~TFileDrawMap() override;
56
57 virtual void AnimateTree(const char *branches=""); // *MENU*
58 Int_t DistancetoPrimitive(Int_t px, Int_t py) override;
59 virtual void DrawObject(); // *MENU*
60 virtual void DumpObject(); // *MENU*
61 char *GetObjectInfo(Int_t px, Int_t py) const override;
62 virtual void InspectObject(); // *MENU*
63 void Paint(Option_t *option) override;
64
65 ClassDefOverride(TFileDrawMap,2); //Draw a 2-d map of the objects in a file
66};
67
68#endif
long long Long64_t
Definition RtypesCore.h:69
const char Option_t
Definition RtypesCore.h:66
#define ClassDefOverride(name, id)
Definition Rtypes.h:346
Option_t Option_t option
Create a Box.
Definition TBox.h:22
A TTree is a list of TBranches.
Definition TBranch.h:93
Describe directory structure in memory.
Definition TDirectory.h:45
This class is automatically called by TFile::DrawMap.
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 ROOT file is an on-disk file, usually with extension .root, that stores objects in a file-system-li...
Definition TFile.h:53
Service class for 2-D histogram classes.
Definition TH2.h:30
The TNamed class is the base class for all named ROOT classes.
Definition TNamed.h:29
Mother of all ROOT objects.
Definition TObject.h:41
Basic string class.
Definition TString.h:139
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Definition fillpatterns.C:1