Fork me on GitHub

Changes in / [5c257a5:910bd98] in git


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • readers/DelphesCMSFWLite.cpp

    r5c257a5 r910bd98  
    311311  DelphesFactory *factory = 0;
    312312  TObjArray *allParticleOutputArray = 0, *stableParticleOutputArray = 0, *partonOutputArray = 0;
    313   Int_t i, maxEvents, skipEvents;
     313  Int_t i;
    314314  Long64_t eventCounter, numberOfEvents;
    315315  Bool_t firstEvent = kTRUE;
     
    353353    confReader = new ExRootConfReader;
    354354    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     }
    368355
    369356    modularDelphes = new Delphes("Delphes");
     
    404391      treeWriter->Clear();
    405392
    406       for(event.toBegin(); !event.atEnd() && !interrupted && (maxEvents <= 0 || eventCounter-skipEvents < maxEvents); ++event)
     393      for(event.toBegin(); !event.atEnd() && !interrupted; ++event)
    407394      {
    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         }
     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();
    420405
    421406        progressBar.Update(eventCounter, eventCounter);
Note: See TracChangeset for help on using the changeset viewer.