- Timestamp:
- Jun 24, 2021, 9:02:43 PM (3 years ago)
- Branches:
- master
- Children:
- 5c257a5
- Parents:
- 71eba5e
- git-author:
- Julie Hogan <jmhogan@…> (06/24/21 21:02:43)
- git-committer:
- GitHub <noreply@…> (06/24/21 21:02:43)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
readers/DelphesCMSFWLite.cpp
r71eba5e r0799cd1 311 311 DelphesFactory *factory = 0; 312 312 TObjArray *allParticleOutputArray = 0, *stableParticleOutputArray = 0, *partonOutputArray = 0; 313 Int_t i ;313 Int_t i, maxEvents, skipEvents; 314 314 Long64_t eventCounter, numberOfEvents; 315 315 Bool_t firstEvent = kTRUE; … … 353 353 confReader = new ExRootConfReader; 354 354 confReader->ReadFile(argv[1]); 355 356 maxEvents = confReader->GetInt("::MaxEvents", 0); 357 skipEvents = confReader->GetInt("::SkipEvents", 0); 358 359 if(maxEvents < 0) 360 { 361 throw runtime_error("MaxEvents must be zero or positive"); 362 } 363 364 if(skipEvents < 0) 365 { 366 throw runtime_error("SkipEvents must be zero or positive"); 367 } 355 368 356 369 modularDelphes = new Delphes("Delphes"); … … 391 404 treeWriter->Clear(); 392 405 393 for(event.toBegin(); !event.atEnd() && !interrupted ; ++event)406 for(event.toBegin(); !event.atEnd() && !interrupted && (maxEvents <= 0 || eventCounter-skipEvents < maxEvents); ++event) 394 407 { 395 ConvertInput(event, eventCounter, branchEvent, branchWeight, factory, 396 allParticleOutputArray, stableParticleOutputArray, partonOutputArray, firstEvent); 397 modularDelphes->ProcessTask(); 398 399 firstEvent = kFALSE; 400 401 treeWriter->Fill(); 402 403 modularDelphes->Clear(); 404 treeWriter->Clear(); 408 if(eventCounter > skipEvents){ 409 ConvertInput(event, eventCounter, branchEvent, branchWeight, factory, 410 allParticleOutputArray, stableParticleOutputArray, partonOutputArray, firstEvent); 411 modularDelphes->ProcessTask(); 412 413 firstEvent = kFALSE; 414 415 treeWriter->Fill(); 416 417 modularDelphes->Clear(); 418 treeWriter->Clear(); 419 } 405 420 406 421 progressBar.Update(eventCounter, eventCounter);
Note:
See TracChangeset
for help on using the changeset viewer.