Changeset 466 in svn for trunk/src/HEPEVTConverter.cc
- Timestamp:
- Jul 10, 2009, 4:54:59 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/HEPEVTConverter.cc
r443 r466 57 57 //------------------------------------------------------------------------------ 58 58 59 //Nevents not yet implemented! 08.03.200960 61 59 HEPTreeReader::HEPTreeReader(TTree *tree, HEPEvent *event) : fChain(tree), fCurrentTree(-1), fEvent(event) 62 60 { … … 174 172 { 175 173 string buffer; 174 int nevt_already_processed=0; 176 175 177 176 gROOT->SetBatch(); … … 190 189 while(1) 191 190 { 192 191 if (Nevt>0 && nevt_already_processed >=Nevt) break; // enough events already processed 193 192 TChain *chain = new TChain("h101"); 194 193 infile >> buffer; … … 203 202 else checking_the_file.close(); 204 203 205 if(!infile.good()) break; 204 if(!infile.good()) break; // end of the list 206 205 chain->Add(buffer.c_str()); 207 206 … … 214 213 215 214 TRootC::GenParticle *element; 216 allEntries = (Nevt<0)?allEntries:min((int)allEntries,Nevt); // do not miss the "+1"215 allEntries = (Nevt<0)?allEntries:min((int)allEntries,Nevt); 217 216 // Loop over all events 218 217 for(entry = 0; entry < allEntries; ++entry) 219 218 { 219 if (Nevt>0 && nevt_already_processed >=Nevt) break; // enough events already processed 220 220 // Load selected branches with data from specified event 221 221 treeReader->ReadEntry(entry); … … 253 253 } 254 254 treeWriter->Fill(); 255 ++nevt_already_processed; 255 256 } 256 257 delete chain;
Note:
See TracChangeset
for help on using the changeset viewer.