- Timestamp:
- May 30, 2013, 12:48:26 AM (11 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- a1f42b2
- Parents:
- 84a1f7d
- Location:
- readers
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
readers/DelphesHepMC.cpp
r84a1f7d r7b461f6 51 51 TObjArray *stableParticleOutputArray = 0, *allParticleOutputArray = 0, *partonOutputArray = 0; 52 52 DelphesHepMCReader *reader = 0; 53 Int_t i ;53 Int_t i, maxEvents, skipEvents; 54 54 Long64_t length, eventCounter; 55 55 … … 88 88 confReader = new ExRootConfReader; 89 89 confReader->ReadFile(argv[1]); 90 91 maxEvents = confReader->GetInt("::MaxEvents", 0); 92 skipEvents = confReader->GetInt("::SkipEvents", 0); 93 94 if(maxEvents < 0) 95 { 96 throw runtime_error("MaxEvents must be zero or positive"); 97 } 98 99 if(skipEvents < 0) 100 { 101 throw runtime_error("SkipEvents must be zero or positive"); 102 } 90 103 91 104 modularDelphes = new Delphes("Delphes"); … … 146 159 reader->Clear(); 147 160 readStopWatch.Start(); 148 while(reader->ReadBlock(factory, allParticleOutputArray, 161 while((maxEvents <= 0 || eventCounter - skipEvents < maxEvents) && 162 reader->ReadBlock(factory, allParticleOutputArray, 149 163 stableParticleOutputArray, partonOutputArray) && !interrupted) 150 164 { … … 154 168 155 169 readStopWatch.Stop(); 156 procStopWatch.Start(); 157 modularDelphes->ProcessTask(); 158 procStopWatch.Stop(); 159 160 reader->AnalyzeEvent(branchEvent, eventCounter, &readStopWatch, &procStopWatch); 161 162 treeWriter->Fill(); 163 164 treeWriter->Clear(); 170 171 if(eventCounter > skipEvents) 172 { 173 procStopWatch.Start(); 174 modularDelphes->ProcessTask(); 175 procStopWatch.Stop(); 176 177 reader->AnalyzeEvent(branchEvent, eventCounter, &readStopWatch, &procStopWatch); 178 179 treeWriter->Fill(); 180 181 treeWriter->Clear(); 182 } 183 165 184 modularDelphes->Clear(); 166 185 reader->Clear(); -
readers/DelphesLHEF.cpp
r84a1f7d r7b461f6 51 51 TObjArray *stableParticleOutputArray = 0, *allParticleOutputArray = 0, *partonOutputArray = 0; 52 52 DelphesLHEFReader *reader = 0; 53 Int_t i ;53 Int_t i, maxEvents, skipEvents; 54 54 Long64_t length, eventCounter; 55 55 … … 88 88 confReader = new ExRootConfReader; 89 89 confReader->ReadFile(argv[1]); 90 91 maxEvents = confReader->GetInt("::MaxEvents", 0); 92 skipEvents = confReader->GetInt("::SkipEvents", 0); 93 94 if(maxEvents < 0) 95 { 96 throw runtime_error("MaxEvents must be zero or positive"); 97 } 98 99 if(skipEvents < 0) 100 { 101 throw runtime_error("SkipEvents must be zero or positive"); 102 } 90 103 91 104 modularDelphes = new Delphes("Delphes"); … … 146 159 reader->Clear(); 147 160 readStopWatch.Start(); 148 while(reader->ReadBlock(factory, allParticleOutputArray, 161 while((maxEvents <= 0 || eventCounter - skipEvents < maxEvents) && 162 reader->ReadBlock(factory, allParticleOutputArray, 149 163 stableParticleOutputArray, partonOutputArray) && !interrupted) 150 164 { … … 154 168 155 169 readStopWatch.Stop(); 156 procStopWatch.Start(); 157 modularDelphes->ProcessTask(); 158 procStopWatch.Stop(); 159 160 reader->AnalyzeEvent(branchEvent, eventCounter, &readStopWatch, &procStopWatch); 161 162 treeWriter->Fill(); 163 164 treeWriter->Clear(); 170 171 if(eventCounter > skipEvents) 172 { 173 readStopWatch.Stop(); 174 procStopWatch.Start(); 175 modularDelphes->ProcessTask(); 176 procStopWatch.Stop(); 177 178 reader->AnalyzeEvent(branchEvent, eventCounter, &readStopWatch, &procStopWatch); 179 180 treeWriter->Fill(); 181 182 treeWriter->Clear(); 183 } 184 165 185 modularDelphes->Clear(); 166 186 reader->Clear(); -
readers/DelphesSTDHEP.cpp
r84a1f7d r7b461f6 51 51 TObjArray *stableParticleOutputArray = 0, *allParticleOutputArray = 0, *partonOutputArray = 0; 52 52 DelphesSTDHEPReader *reader = 0; 53 Int_t i ;53 Int_t i, maxEvents, skipEvents; 54 54 Long64_t length, eventCounter; 55 55 … … 88 88 confReader = new ExRootConfReader; 89 89 confReader->ReadFile(argv[1]); 90 91 maxEvents = confReader->GetInt("::MaxEvents", 0); 92 skipEvents = confReader->GetInt("::SkipEvents", 0); 93 94 if(maxEvents < 0) 95 { 96 throw runtime_error("MaxEvents must be zero or positive"); 97 } 98 99 if(skipEvents < 0) 100 { 101 throw runtime_error("SkipEvents must be zero or positive"); 102 } 90 103 91 104 modularDelphes = new Delphes("Delphes"); … … 146 159 reader->Clear(); 147 160 readStopWatch.Start(); 148 while(reader->ReadBlock(factory, allParticleOutputArray, 161 while((maxEvents <= 0 || eventCounter - skipEvents < maxEvents) && 162 reader->ReadBlock(factory, allParticleOutputArray, 149 163 stableParticleOutputArray, partonOutputArray) && !interrupted) 150 164 { … … 154 168 155 169 readStopWatch.Stop(); 156 procStopWatch.Start(); 157 modularDelphes->ProcessTask(); 158 procStopWatch.Stop(); 159 160 reader->AnalyzeEvent(branchEvent, eventCounter, &readStopWatch, &procStopWatch); 161 162 treeWriter->Fill(); 163 164 treeWriter->Clear(); 170 171 if(eventCounter > skipEvents) 172 { 173 procStopWatch.Start(); 174 modularDelphes->ProcessTask(); 175 procStopWatch.Stop(); 176 177 reader->AnalyzeEvent(branchEvent, eventCounter, &readStopWatch, &procStopWatch); 178 179 treeWriter->Fill(); 180 181 treeWriter->Clear(); 182 } 183 165 184 modularDelphes->Clear(); 166 185 reader->Clear();
Note:
See TracChangeset
for help on using the changeset viewer.