File indexing completed on 2024-04-06 11:57:36
0001 #ifndef CL_TEcnaRootFile
0002 #define CL_TEcnaRootFile
0003
0004 #include "TObject.h"
0005 #include "TString.h"
0006 #include "TFile.h"
0007 #include "TTree.h"
0008
0009 #include "CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaObject.h"
0010 #include "CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaResultType.h"
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025 class TEcnaRootFile : public TObject {
0026 protected:
0027 void Init();
0028
0029 public:
0030 TString fRootFileName;
0031 TString fRootFileStatus;
0032
0033 TFile *fRootFile;
0034
0035 Int_t fCounterBytesCnaResults;
0036 Int_t fNbEntries;
0037 TTree *fCnaResultsTree;
0038
0039
0040
0041 TBranch *fCnaResultsBranch;
0042 TEcnaResultType *fCnaIndivResult;
0043
0044
0045 TEcnaRootFile();
0046 TEcnaRootFile(TEcnaObject *, const Text_t *, const TString &);
0047 TEcnaRootFile(TEcnaObject *, const Text_t *);
0048
0049 TEcnaRootFile(const Text_t *);
0050 TEcnaRootFile(const Text_t *, const TString &);
0051
0052 ~TEcnaRootFile() override;
0053
0054 void ReStart(const Text_t *);
0055 void ReStart(const Text_t *, const TString &);
0056 void CloseFile();
0057 Bool_t OpenR(const Text_t * = "");
0058 Bool_t OpenW(const Text_t * = "");
0059 Bool_t ReadElement(Int_t);
0060 Bool_t ReadElement(CnaResultTyp, Int_t);
0061 Int_t ReadElementNextEntryNumber(CnaResultTyp, Int_t);
0062 ClassDefOverride(TEcnaRootFile, 1)
0063 };
0064
0065 R__EXTERN TEcnaRootFile *gCnaRootFile;
0066
0067 #endif