Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-10-18 09:25:16

0001 // @(#)root/treeplayer:$Id$
0002 // Author: Rene Brun   15/01/2003
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2003, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 
0012 #ifndef ROOT_TFileDrawMap
0013 #define ROOT_TFileDrawMap
0014 
0015 
0016 //////////////////////////////////////////////////////////////////////////
0017 //                                                                      //
0018 // TFileDrawMap                                                         //
0019 //                                                                      //
0020 // Draw a 2-d map of the objects in a file                              //
0021 //                                                                      //
0022 //////////////////////////////////////////////////////////////////////////
0023 
0024 #include "TNamed.h"
0025 
0026 #include <map>
0027 
0028 class TH2;
0029 class TFile;
0030 class TDirectory;
0031 class TBox;
0032 class TBranch;
0033 
0034 class TFileDrawMap : public TNamed {
0035 
0036 protected:
0037    TFile         *fFile = nullptr;      ///<! Pointer to the file, cannot be persistent
0038    std::map<TBranch*, Int_t> fBranchColors; ///<! map of generated colors for the branches
0039    TH2           *fFrame = nullptr;     ///< Histogram used to draw the map frame
0040    TString        fKeys;                ///< List of keys
0041    Int_t          fXsize = 0;           ///< Size in bytes of X axis
0042    Int_t          fYsize = 0;           ///< Size in K/Mbytes of Y axis
0043 
0044    virtual void     DrawMarker(Int_t marker, Long64_t eseek);
0045    virtual bool     GetObjectInfoDir(TDirectory *dir, Int_t px, Int_t py, TString &info) const;
0046    virtual void     PaintBox(TBox &box, Long64_t bseek, Int_t nbytes);
0047    virtual void     PaintDir(TDirectory *dir, const char *keys);
0048    virtual TObject *GetObject();
0049 
0050    TString GetRecentInfo();
0051 
0052 public:
0053    TFileDrawMap();
0054    TFileDrawMap(const TFile *file, const char *keys, Option_t *option = "");
0055    ~TFileDrawMap() override;
0056 
0057    virtual void  AnimateTree(const char *branches=""); // *MENU*
0058    Int_t DistancetoPrimitive(Int_t px, Int_t py) override;
0059    virtual void  DrawObject(); // *MENU*
0060    virtual void  DumpObject(); // *MENU*
0061    char *GetObjectInfo(Int_t px, Int_t py) const override;
0062    virtual void  InspectObject(); // *MENU*
0063    void  Paint(Option_t *option) override;
0064 
0065    ClassDefOverride(TFileDrawMap,2);  //Draw a 2-d map of the objects in a file
0066 };
0067 
0068 #endif