CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC4_patch1/src/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaRootFile.h

Go to the documentation of this file.
00001 #ifndef CL_TEcnaRootFile
00002 #define CL_TEcnaRootFile
00003 
00004 #include "TObject.h"
00005 #include "TString.h"
00006 #include "TFile.h"
00007 #include "TTree.h"
00008 
00009 #include "CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaObject.h"
00010 #include "CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaResultType.h"
00011 
00024 
00025 class TEcnaRootFile : public TObject {
00026 
00027 protected:
00028 
00029   void      Init();
00030 
00031 public:
00032 
00033   TString     fRootFileName;            // Treename of fRootFile
00034   TString     fRootFileStatus;          // Status of fRootFile
00035 
00036   TFile      *fRootFile;                // Root file for ECNA
00037 
00038   Int_t       fCounterBytesCnaResults;  // Counter of bytes in fCnaResultsTree
00039   Int_t       fNbEntries;               // Nb of entries in fCnaResultsTree
00040   TTree      *fCnaResultsTree;    // Tree containing the individual results
00041                                   // individual result = equivalent
00042                                   // of one ASCII file
00043 
00044   TBranch         *fCnaResultsBranch;  // Branch of the individual results
00045   TEcnaResultType *fCnaIndivResult;    // One of the individual results
00046                                        // in the branch fCnaResultsBranch
00047 
00048   TEcnaRootFile();
00049   TEcnaRootFile(TEcnaObject*, const Text_t*, TString);
00050   TEcnaRootFile(TEcnaObject*, const Text_t*);
00051 
00052   TEcnaRootFile(const Text_t*);
00053   TEcnaRootFile(const Text_t*, TString);
00054 
00055   ~TEcnaRootFile();
00056 
00057   void   ReStart(const Text_t*);
00058   void   ReStart(const Text_t*, TString);
00059   void   CloseFile();
00060   Bool_t OpenR(const Text_t* = "");
00061   Bool_t OpenW(const Text_t* = "");
00062   Bool_t ReadElement(Int_t);
00063   Bool_t ReadElement(CnaResultTyp,Int_t);
00064   Int_t  ReadElementNextEntryNumber(CnaResultTyp,Int_t);
00065   ClassDef(TEcnaRootFile,1)  //Root file of CNA
00066 };
00067 
00068 R__EXTERN TEcnaRootFile *gCnaRootFile;
00069 
00070 #endif