CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
edm::IterateNTimesLooper Class Reference
Inheritance diagram for edm::IterateNTimesLooper:
edm::EDLooper edm::EDLooperBase

Public Member Functions

virtual Status duringLoop (Event const &, EventSetup const &) override
 
virtual Status endOfLoop (EventSetup const &, unsigned int) override
 
 IterateNTimesLooper (ParameterSet const &)
 
virtual void startingNewLoop (unsigned int) override
 
virtual ~IterateNTimesLooper ()
 
- Public Member Functions inherited from edm::EDLooper
 EDLooper ()
 
 EDLooper (EDLooper const &)=delete
 
EDLooperoperator= (EDLooper const &)=delete
 
virtual ~EDLooper ()
 
- Public Member Functions inherited from edm::EDLooperBase
virtual void attachTo (ActivityRegistry &)
 Override this method if you need to monitor the state of the processing. More...
 
virtual void beginOfJob (EventSetup const &)
 
virtual void beginOfJob ()
 
void copyInfo (ScheduleInfo const &)
 
void doBeginLuminosityBlock (LuminosityBlockPrincipal &, EventSetup const &, ProcessContext *)
 
void doBeginRun (RunPrincipal &, EventSetup const &, ProcessContext *)
 
Status doDuringLoop (EventPrincipal &eventPrincipal, EventSetup const &es, ProcessingController &, StreamContext *)
 
void doEndLuminosityBlock (LuminosityBlockPrincipal &, EventSetup const &, ProcessContext *)
 
Status doEndOfLoop (EventSetup const &es)
 
void doEndRun (RunPrincipal &, EventSetup const &, ProcessContext *)
 
void doStartingNewLoop ()
 
 EDLooperBase ()
 
 EDLooperBase (EDLooperBase const &)=delete
 
virtual void endOfJob ()
 
virtual std::set
< eventsetup::EventSetupRecordKey
modifyingRecords () const
 
EDLooperBaseoperator= (EDLooperBase const &)=delete
 
void prepareForNextLoop (eventsetup::EventSetupProvider *esp)
 
void setActionTable (ExceptionToActionTable const *actionTable)
 
void setModuleChanger (ModuleChanger *)
 
virtual ~EDLooperBase ()
 

Private Member Functions

 IterateNTimesLooper (IterateNTimesLooper const &)
 
IterateNTimesLooper const & operator= (IterateNTimesLooper const &)
 

Private Attributes

unsigned int max_
 
bool shouldStop_
 
unsigned int times_
 

Additional Inherited Members

- Public Types inherited from edm::EDLooperBase
enum  Status { kContinue, kStop }
 
- Protected Member Functions inherited from edm::EDLooperBase
ModuleChangermoduleChanger ()
 This only returns a non-zero value during the call to endOfLoop. More...
 
ScheduleInfo const * scheduleInfo () const
 This returns a non-zero value after the constructor has been called. More...
 

Detailed Description

Definition at line 22 of file IterateNTimesLooper.cc.

Constructor & Destructor Documentation

edm::IterateNTimesLooper::IterateNTimesLooper ( ParameterSet const &  iConfig)

Definition at line 52 of file IterateNTimesLooper.cc.

52  :
53  max_(iConfig.getParameter<unsigned int>("nTimes")),
54  times_(0),
55  shouldStop_(false) {
56  }
edm::IterateNTimesLooper::~IterateNTimesLooper ( )
virtual

Definition at line 62 of file IterateNTimesLooper.cc.

62  {
63  }
edm::IterateNTimesLooper::IterateNTimesLooper ( IterateNTimesLooper const &  )
private

Member Function Documentation

EDLooper::Status edm::IterateNTimesLooper::duringLoop ( Event const &  ,
EventSetup const &   
)
overridevirtual

Called after all event modules have had a chance to process the edm::Event.

Implements edm::EDLooper.

Definition at line 88 of file IterateNTimesLooper.cc.

References edm::EDLooperBase::kContinue, edm::EDLooperBase::kStop, and shouldStop_.

EDLooper::Status edm::IterateNTimesLooper::endOfLoop ( EventSetup const &  ,
unsigned  iCounter 
)
overridevirtual

Called after the system has finished one loop over the events. Thar argument is a count of how many loops have been processed before this loo. For the first time through the events the argument will be 0.

Implements edm::EDLooperBase.

Definition at line 93 of file IterateNTimesLooper.cc.

References edm::EDLooperBase::kContinue, edm::EDLooperBase::kStop, max_, and times_.

IterateNTimesLooper const& edm::IterateNTimesLooper::operator= ( IterateNTimesLooper const &  )
private
void edm::IterateNTimesLooper::startingNewLoop ( unsigned  int)
overridevirtual

Called before system starts to loop over the events. The argument is a count of how many loops have been processed. For the first time through the events the argument will be 0.

Implements edm::EDLooperBase.

Definition at line 80 of file IterateNTimesLooper.cc.

References max_, shouldStop_, and times_.

80  {
81  times_ = iIteration;
82  if(iIteration >= max_) {
83  shouldStop_ = true;
84  }
85  }

Member Data Documentation

unsigned int edm::IterateNTimesLooper::max_
private

Definition at line 43 of file IterateNTimesLooper.cc.

Referenced by endOfLoop(), and startingNewLoop().

bool edm::IterateNTimesLooper::shouldStop_
private

Definition at line 45 of file IterateNTimesLooper.cc.

Referenced by duringLoop(), and startingNewLoop().

unsigned int edm::IterateNTimesLooper::times_
private

Definition at line 44 of file IterateNTimesLooper.cc.

Referenced by endOfLoop(), and startingNewLoop().