Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 10:41:28

0001 #ifndef MECanvasHolder_hh
0002 #define MECanvasHolder_hh
0003 
0004 #include <TROOT.h>
0005 #include <TVirtualPadEditor.h>
0006 #include <TLatex.h>
0007 #include <TPaveText.h>
0008 #include <TCanvas.h>
0009 #include <TColor.h>
0010 #include <TH1.h>
0011 #include <TH2.h>
0012 
0013 class MECanvasHolder
0014 {
0015 public:
0016 
0017   // action after a double click

0018   virtual void setPxAndPy( int px, int py ); 
0019 
0020   TPad* getPad() { return fPad; }
0021   void setPad();
0022 
0023   TH1* curHist() { return _h; }
0024   void setCurHist( TH1* h ) { _h=h; }
0025   void getCurXY( float& x, float& y ) { x=_x; y=_y; }
0026 
0027   // ROOT style and Histograms

0028   void setSessionStyle();
0029   static void setHistoStyle( TH1* );
0030 
0031 public:
0032 
0033   // contructors/destructor

0034   MECanvasHolder();
0035   virtual  ~MECanvasHolder();
0036 
0037   // Canvas

0038   TCanvas*    fCanvas;          //Canvas of fECanvas

0039   TPad*       fPad;
0040   Int_t       fTopXGen;         //Top x  of general canvas fCanvas

0041   Int_t       fTopYGen;         //Top y  of general canvas fCanvas

0042   UInt_t      fWidthGen;        //Width  of general canvas fCanvas

0043   UInt_t      fHeigthGen;       //Heigth of general canvas fCanvas

0044   TString     fDate;            //Date when program runs

0045   TString     fTime;            //Time when program runs

0046 
0047 
0048   // Welcome pave (from Monecal)

0049   TPaveText* fWelcomePave;    
0050   Bool_t     fWelcomeState;  
0051   TText*     fWelcomeTitle;    
0052   TText*     fWelcomeL0;      
0053 
0054   TLatex* fTexTL;
0055   TLatex* fTexTR;
0056   TLatex* fTexBL;
0057   TLatex* fTexBR;
0058 
0059   // current position in the canvas after a double click

0060   int _px;
0061   int _py;
0062   float _x;
0063   float _y;
0064 
0065   // current histogram

0066   TH1* _h;
0067 
0068   // Methods inherited from Monecal

0069   void      SetCanvas( TCanvas* canvas, 
0070                const char* str1="", 
0071                const char* str2="", 
0072                const char* str3="", 
0073                const char* str4="" 
0074                );
0075   void      CanvasModified();
0076   void      ClearWelcome();
0077   void      ShowWelcome( bool=false );
0078   void      SetDate();
0079 
0080   void setHessPalette();
0081 
0082 private:
0083   
0084   double _scale;
0085   double _refw;
0086 
0087 // declare to ROOT dictionary

0088 ClassDef(MECanvasHolder,0) // MECanvasHolder -- Monitoring utility for survey of Ecal

0089 };
0090 
0091 #endif
0092