#include <FWCore/Modules/interface/IterateNTimesLooper.h>
Public Member Functions | |
virtual Status | duringLoop (const edm::Event &, const edm::EventSetup &) |
virtual Status | endOfLoop (const edm::EventSetup &, unsigned int) |
IterateNTimesLooper (const edm::ParameterSet &) | |
virtual void | startingNewLoop (unsigned int) |
virtual | ~IterateNTimesLooper () |
Private Member Functions | |
IterateNTimesLooper (const IterateNTimesLooper &) | |
const IterateNTimesLooper & | operator= (const IterateNTimesLooper &) |
Private Attributes | |
unsigned int | max_ |
bool | shouldStop_ |
unsigned int | times_ |
Usage: <usage>
Definition at line 29 of file IterateNTimesLooper.h.
IterateNTimesLooper::IterateNTimesLooper | ( | const edm::ParameterSet & | iConfig | ) |
Definition at line 32 of file IterateNTimesLooper.cc.
00032 : 00033 max_(iConfig.getParameter<unsigned int>("nTimes")), 00034 times_(0), 00035 shouldStop_(false) 00036 { 00037 }
IterateNTimesLooper::~IterateNTimesLooper | ( | ) | [virtual] |
IterateNTimesLooper::IterateNTimesLooper | ( | const IterateNTimesLooper & | ) | [private] |
edm::EDLooper::Status IterateNTimesLooper::duringLoop | ( | const edm::Event & | event, | |
const edm::EventSetup & | eventSetup | |||
) | [virtual] |
Implements edm::EDLooper.
Definition at line 72 of file IterateNTimesLooper.cc.
References edm::EDLooper::kContinue, edm::EDLooper::kStop, and shouldStop_.
00072 { 00073 return shouldStop_ ? kStop : kContinue; 00074 }
edm::EDLooper::Status IterateNTimesLooper::endOfLoop | ( | const edm::EventSetup & | es, | |
unsigned int | iCounter | |||
) | [virtual] |
Implements edm::EDLooper.
Definition at line 77 of file IterateNTimesLooper.cc.
References edm::EDLooper::kContinue, edm::EDLooper::kStop, max_, and times_.
const IterateNTimesLooper& IterateNTimesLooper::operator= | ( | const IterateNTimesLooper & | ) | [private] |
Implements edm::EDLooper.
Definition at line 64 of file IterateNTimesLooper.cc.
References max_, shouldStop_, and times_.
00064 { 00065 times_ = iIteration; 00066 if (iIteration >= max_ ) { 00067 shouldStop_ = true; 00068 } 00069 }
unsigned int IterateNTimesLooper::max_ [private] |
Definition at line 51 of file IterateNTimesLooper.h.
Referenced by endOfLoop(), and startingNewLoop().
bool IterateNTimesLooper::shouldStop_ [private] |
Definition at line 53 of file IterateNTimesLooper.h.
Referenced by duringLoop(), and startingNewLoop().
unsigned int IterateNTimesLooper::times_ [private] |
Definition at line 52 of file IterateNTimesLooper.h.
Referenced by endOfLoop(), and startingNewLoop().