CMS 3D CMS Logo

CMSSW_4_4_3_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   TFile      *fRootFile;                // Root file for CNA
00036   Int_t       fCounterBytesCnaResults;  // Counter of bytes in fCnaResultsTree
00037   Int_t       fNbEntries;               // Nb of entries in fCnaResultsTree
00038   TTree      *fCnaResultsTree;    // Tree containing the individual results
00039                                   // individual result = equivalent
00040                                   // of one ASCII file
00041 
00042   TBranch         *fCnaResultsBranch;  // Branch of the individual results
00043   TEcnaResultType *fCnaIndivResult;    // One of the individual results
00044                                        // in the branch fCnaResultsBranch
00045 
00046   TEcnaRootFile();
00047   TEcnaRootFile(TEcnaObject*, const Text_t*, TString);
00048   TEcnaRootFile(TEcnaObject*, const Text_t*);
00049 
00050   TEcnaRootFile(const Text_t*);
00051   TEcnaRootFile(const Text_t*, TString);
00052 
00053   ~TEcnaRootFile();
00054 
00055   void   ReStart(const Text_t*);
00056   void   ReStart(const Text_t*, TString);
00057   void   CloseFile();
00058   Bool_t OpenR(const Text_t* = "");
00059   Bool_t OpenW(const Text_t* = "");
00060   Bool_t ReadElement(Int_t);
00061   Bool_t ReadElement(CnaResultTyp,Int_t);
00062   Int_t  ReadElementNextEntryNumber(CnaResultTyp,Int_t);
00063   ClassDef(TEcnaRootFile,1)  //Root file of CNA
00064 };
00065 
00066 R__EXTERN TEcnaRootFile *gCnaRootFile;
00067 
00068 #endif