- Timestamp:
- Mar 4, 2021, 2:36:16 PM (4 years ago)
- Branches:
- master
- Children:
- 4658ca4
- Parents:
- f9517a5
- Location:
- external/ExRootAnalysis
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
external/ExRootAnalysis/ExRootTreeReader.cc
rf9517a5 rdc883b4 12 12 #include "TBranchElement.h" 13 13 #include "TCanvas.h" 14 #include "TParameter.h" 14 15 #include "TClonesArray.h" 15 16 #include "TH2.h" … … 119 120 //------------------------------------------------------------------------------ 120 121 122 Double_t ExRootTreeReader::GetInfo(const char *name) 123 { 124 TTree *tree = NULL; 125 TParameter<Double_t> *param = NULL; 126 Double_t result = -999.9; 127 if(fChain) tree = fChain->GetTree(); 128 if(tree) param = static_cast<TParameter<Double_t> *>(tree->GetUserInfo()->FindObject(name)); 129 if(param) result = param->GetVal(); 130 return result; 131 } 132 133 //------------------------------------------------------------------------------ 134 121 135 Bool_t ExRootTreeReader::Notify() 122 136 { -
external/ExRootAnalysis/ExRootTreeReader.h
rf9517a5 rdc883b4 29 29 30 30 TClonesArray *UseBranch(const char *branchName); 31 Double_t GetInfo(const char *name); 31 32 32 33 private: -
external/ExRootAnalysis/ExRootTreeWriter.cc
rf9517a5 rdc883b4 11 11 #include "ExRootAnalysis/ExRootTreeBranch.h" 12 12 13 #include "TParameter.h" 13 14 #include "TClonesArray.h" 14 15 #include "TFile.h" … … 48 49 fBranches.insert(branch); 49 50 return branch; 51 } 52 53 //------------------------------------------------------------------------------ 54 55 void ExRootTreeWriter::AddInfo(const char *name, Double_t value) 56 { 57 if(!fTree) fTree = NewTree(); 58 fTree->GetUserInfo()->Add(new TParameter<Double_t>(name, value)); 50 59 } 51 60 -
external/ExRootAnalysis/ExRootTreeWriter.h
rf9517a5 rdc883b4 29 29 30 30 ExRootTreeBranch *NewBranch(const char *name, TClass *cl); 31 void AddInfo(const char *name, Double_t value); 31 32 32 33 void Clear();
Note:
See TracChangeset
for help on using the changeset viewer.