Changes between Version 23 and Version 24 of WorkBook/LibraryInterface
- Timestamp:
- Jun 22, 2012, 12:44:54 AM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WorkBook/LibraryInterface
v23 v24 34 34 == Simplified example == 35 35 36 {{{ReadEvent ()}}} and {{{ReadParticle()}}}should be implemented by the library's user.36 {{{ReadEvent}}}, {{{ReadParticle}}}, {{{ConvertInput}}} and {{{ConvertOutput}}} functions should be implemented by the library's user. 37 37 38 38 {{{ … … 55 55 56 56 void ConvertOutput(ExRootAnalysis *modularDelphes); 57 58 bool ReadEvent() { return true; } 59 60 bool ReadParticle() { return true; } 57 61 58 62 int main() … … 80 84 modularDelphes = new ExRootAnalysis("Delphes"); 81 85 modularDelphes->SetConfReader(confReader); 82 modularDelphes->SetTreeWriter(treeWriter);83 86 84 87 factory = modularDelphes->GetFactory(); … … 115 118 TLorentzVector candidateMomentum, candidatePosition; 116 119 Int_t pid, status; 117 Double_t px, py, pz, e, m; 120 Double_t px, py, pz, e, m; 118 121 Double_t x, y, z, t; 119 122 … … 146 149 void ConvertOutput(ExRootAnalysis *modularDelphes) 147 150 { 148 TObjArray *arrayJets = modularDelphes->ImportArray("FastJetFinder/jets");151 const TObjArray *arrayJets = modularDelphes->ImportArray("FastJetFinder/jets"); 149 152 TIter iteratorJets(arrayJets); 150 153 ExRootCandidate *candidate; 151 154 152 iteratorJets ->Reset();153 while((candidate = static_cast<ExRootCandidate*>(iteratorJets ->Next())))155 iteratorJets.Reset(); 156 while((candidate = static_cast<ExRootCandidate*>(iteratorJets.Next()))) 154 157 { 155 158 const TLorentzVector &momentum = candidate->GetMomentum();