CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TCnaRootFile.h
Go to the documentation of this file.
1 #ifndef CL_TCnaRootFile
2 #define CL_TCnaRootFile
3 
4 #include "TObject.h"
5 #include "TString.h"
6 #include "TFile.h"
7 #include "TTree.h"
8 #include "CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TCnaResultType.h"
9 
10 class TCnaRootFile : public TObject {
11 
12 protected:
13 
14  void Init();
15 
16 public:
17 
18  TString fRootFileName; // Treename of fRootFile
19  TString fRootFileStatus; // Status of fRootFile
20  TFile *fRootFile; // Root file for CNA
21  Int_t fCounterBytesCnaResults; // Counter of bytes in fCnaResultsTree
22  Int_t fNbEntries; // Nb of entries in fCnaResultsTree
23  TTree *fCnaResultsTree; // Tree containing the individual results
24  // individual result = equivalent
25  // of one ASCII file
26 
27  TBranch *fCnaResultsBranch; // Branch of the individual results
28  TCnaResultType *fCnaIndivResult; // One of the individual results
29  // in the branch fCnaResultsBranch
30 
31  TCnaRootFile() { Init(); }
32  TCnaRootFile(const Text_t*);
33  TCnaRootFile(const Text_t*, TString);
34  ~TCnaRootFile();
35  void CloseFile();
36  Bool_t OpenR(const Text_t* = "");
37  Bool_t OpenW(const Text_t* = "");
38  Bool_t ReadElement(Int_t);
39  Bool_t ReadElement(CnaResultTyp,Int_t);
40  ClassDef(TCnaRootFile,1) //Root file of CNA
41 };
42 
44 
45 #endif
TCnaResultType * fCnaIndivResult
Definition: TCnaRootFile.h:28
TString fRootFileStatus
Definition: TCnaRootFile.h:19
CnaResultTyp
TFile * fRootFile
Definition: TCnaRootFile.h:20
Bool_t ReadElement(Int_t)
Int_t fCounterBytesCnaResults
Definition: TCnaRootFile.h:21
TString fRootFileName
Definition: TCnaRootFile.h:18
void CloseFile()
Bool_t OpenW(const Text_t *="")
TTree * fCnaResultsTree
Definition: TCnaRootFile.h:23
TBranch * fCnaResultsBranch
Definition: TCnaRootFile.h:27
R__EXTERN TCnaRootFile * gCnaRootFile
Definition: TCnaRootFile.h:43
Bool_t OpenR(const Text_t *="")
Int_t fNbEntries
Definition: TCnaRootFile.h:22