Fork me on GitHub

Changeset e576ef60 in git for readers


Ignore:
Timestamp:
Apr 3, 2017, 5:37:42 PM (8 years ago)
Author:
Michele Selvaggi <michele.selvaggi@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
24d49b4
Parents:
81bedba
Message:

fix maxEvents in DelphesROOT reader

File:
1 edited

Legend:

Unmodified
Added
Removed
  • readers/DelphesROOT.cpp

    r81bedba re576ef60  
    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.