CMS 3D CMS Logo

TEcnaRootFile.h
Go to the documentation of this file.
1 #ifndef CL_TEcnaRootFile
2 #define CL_TEcnaRootFile
3 
4 #include "TObject.h"
5 #include "TString.h"
6 #include "TFile.h"
7 #include "TTree.h"
8 
11 
24 
25 class TEcnaRootFile : public TObject {
26 protected:
27  void Init();
28 
29 public:
30  TString fRootFileName; // Treename of fRootFile
31  TString fRootFileStatus; // Status of fRootFile
32 
33  TFile *fRootFile; // Root file for ECNA
34 
35  Int_t fCounterBytesCnaResults; // Counter of bytes in fCnaResultsTree
36  Int_t fNbEntries; // Nb of entries in fCnaResultsTree
37  TTree *fCnaResultsTree; // Tree containing the individual results
38  // individual result = equivalent
39  // of one ASCII file
40 
41  TBranch *fCnaResultsBranch; // Branch of the individual results
42  TEcnaResultType *fCnaIndivResult; // One of the individual results
43  // in the branch fCnaResultsBranch
44 
45  TEcnaRootFile();
46  TEcnaRootFile(TEcnaObject *, const Text_t *, const TString &);
47  TEcnaRootFile(TEcnaObject *, const Text_t *);
48 
49  TEcnaRootFile(const Text_t *);
50  TEcnaRootFile(const Text_t *, const TString &);
51 
52  ~TEcnaRootFile() override;
53 
54  void ReStart(const Text_t *);
55  void ReStart(const Text_t *, const TString &);
56  void CloseFile();
57  Bool_t OpenR(const Text_t * = "");
58  Bool_t OpenW(const Text_t * = "");
59  Bool_t ReadElement(Int_t);
60  Bool_t ReadElement(CnaResultTyp, Int_t);
62  ClassDefOverride(TEcnaRootFile, 1) //Root file of CNA
63 };
64 
66 
67 #endif
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:42
Bool_t OpenR(const Text_t *="")
CnaResultTyp
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRootFile.h:65
TBranch * fCnaResultsBranch
Definition: TEcnaRootFile.h:41
TString fRootFileStatus
Definition: TEcnaRootFile.h:31
~TEcnaRootFile() override
Int_t fCounterBytesCnaResults
Definition: TEcnaRootFile.h:35
Int_t ReadElementNextEntryNumber(CnaResultTyp, Int_t)
TString fRootFileName
Definition: TEcnaRootFile.h:30
void ReStart(const Text_t *)
Bool_t ReadElement(Int_t)
Bool_t OpenW(const Text_t *="")
TTree * fCnaResultsTree
Definition: TEcnaRootFile.h:37
TFile * fRootFile
Definition: TEcnaRootFile.h:33