CMS 3D CMS Logo

IterateNTimesLooper Class Reference

Description: <one line="" class="" summary>="">. More...

#include <FWCore/Modules/interface/IterateNTimesLooper.h>

Inheritance diagram for IterateNTimesLooper:

edm::EDLooper

List of all members.

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 IterateNTimesLooperoperator= (const IterateNTimesLooper &)

Private Attributes

unsigned int max_
bool shouldStop_
unsigned int times_


Detailed Description

Description: <one line="" class="" summary>="">.

Usage: <usage>

Definition at line 29 of file IterateNTimesLooper.h.


Constructor & Destructor Documentation

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]

Definition at line 44 of file IterateNTimesLooper.cc.

00045 {
00046 }

IterateNTimesLooper::IterateNTimesLooper ( const IterateNTimesLooper  )  [private]


Member Function Documentation

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_.

00077                                                                              {
00078   ++times_;
00079   return (times_ < max_ ) ? kContinue : kStop;
00080 }

const IterateNTimesLooper& IterateNTimesLooper::operator= ( const IterateNTimesLooper  )  [private]

void IterateNTimesLooper::startingNewLoop ( unsigned int  iIteration  )  [virtual]

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 }


Member Data Documentation

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().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:25:59 2009 for CMSSW by  doxygen 1.5.4