Fork me on GitHub

Changes in / [781edf86:24d49b4] in git


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • readers/DelphesROOT.cpp

    r781edf86 r24d49b4  
    8585  Candidate *candidate;
    8686  Int_t pdgCode;
     87  Int_t maxEvents;
    8788
    8889  const Double_t c_light = 2.99792458E8;
     
    125126    confReader = new ExRootConfReader;
    126127    confReader->ReadFile(argv[1]);
     128   
     129    maxEvents = confReader->GetInt("::MaxEvents", 0);
     130
     131    if(maxEvents < 0)
     132    {
     133      throw runtime_error("MaxEvents must be zero or positive");
     134    }
    127135
    128136    modularDelphes = new Delphes("Delphes");
     
    170178      {
    171179   
     180        if(entry >= maxEvents) break;
    172181        treeReader->ReadEntry(entry);
    173182       
Note: See TracChangeset for help on using the changeset viewer.