CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
edm::IterateNTimesLooper Class Reference
Inheritance diagram for edm::IterateNTimesLooper:
edm::EDLooper edm::EDLooperBase edm::EDConsumerBase

Public Member Functions

Status duringLoop (Event const &, EventSetup const &) override
 
Status endOfLoop (EventSetup const &, unsigned int) override
 
 IterateNTimesLooper (ParameterSet const &)
 
 IterateNTimesLooper (IterateNTimesLooper const &)=delete
 
IterateNTimesLooper const & operator= (IterateNTimesLooper const &)=delete
 
void startingNewLoop (unsigned int) override
 
 ~IterateNTimesLooper () override
 
- Public Member Functions inherited from edm::EDLooper
 EDLooper ()
 
 EDLooper (EDLooper const &)=delete
 
EDLooperoperator= (EDLooper const &)=delete
 
 ~EDLooper () override
 
- 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...
 
void beginOfJob (EventSetupImpl const &)
 
virtual void beginOfJob (EventSetup const &)
 
virtual void beginOfJob ()
 
void copyInfo (ScheduleInfo const &)
 
void doBeginLuminosityBlock (LuminosityBlockPrincipal &, EventSetupImpl const &, ProcessContext *)
 
void doBeginRun (RunPrincipal &, EventSetupImpl const &, ProcessContext *)
 
Status doDuringLoop (EventPrincipal &eventPrincipal, EventSetupImpl const &es, ProcessingController &, StreamContext *)
 
void doEndLuminosityBlock (LuminosityBlockPrincipal &, EventSetupImpl const &, ProcessContext *)
 
Status doEndOfLoop (EventSetupImpl const &es)
 
void doEndRun (RunPrincipal &, EventSetupImpl const &, ProcessContext *)
 
void doStartingNewLoop ()
 
 EDLooperBase ()
 
 EDLooperBase (EDLooperBase const &)=delete
 
virtual void endOfJob ()
 
void esPrefetchAsync (WaitingTaskHolder iTask, EventSetupImpl const &iImpl, Transition iTrans, ServiceToken const &iToken) const
 
virtual std::set< eventsetup::EventSetupRecordKeymodifyingRecords () const
 
EDLooperBaseoperator= (EDLooperBase const &)=delete
 
void prefetchAsync (WaitingTaskHolder iTask, ServiceToken const &token, Transition iTrans, Principal const &iPrincipal, EventSetupImpl const &iImpl) const
 
void prepareForNextLoop (eventsetup::EventSetupProvider *esp)
 
void setActionTable (ExceptionToActionTable const *actionTable)
 
void setModuleChanger (ModuleChanger *)
 
 ~EDLooperBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const *> const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Attributes

unsigned int max_
 
bool shouldStop_
 
unsigned int times_
 

Additional Inherited Members

- Public Types inherited from edm::EDLooperBase
enum  Status { kContinue, kStop }
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- 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...
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

Definition at line 22 of file IterateNTimesLooper.cc.

Constructor & Destructor Documentation

◆ IterateNTimesLooper() [1/2]

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

Definition at line 49 of file IterateNTimesLooper.cc.

50  : max_(iConfig.getParameter<unsigned int>("nTimes")), times_(0), shouldStop_(false) {}

◆ IterateNTimesLooper() [2/2]

edm::IterateNTimesLooper::IterateNTimesLooper ( IterateNTimesLooper const &  )
delete

◆ ~IterateNTimesLooper()

edm::IterateNTimesLooper::~IterateNTimesLooper ( )
override

Definition at line 56 of file IterateNTimesLooper.cc.

56 {}

Member Function Documentation

◆ duringLoop()

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 79 of file IterateNTimesLooper.cc.

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

◆ endOfLoop()

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 83 of file IterateNTimesLooper.cc.

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

◆ operator=()

IterateNTimesLooper const& edm::IterateNTimesLooper::operator= ( IterateNTimesLooper const &  )
delete

◆ startingNewLoop()

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 72 of file IterateNTimesLooper.cc.

References max_, shouldStop_, and times_.

72  {
73  times_ = iIteration;
74  if (iIteration >= max_) {
75  shouldStop_ = true;
76  }
77  }

Member Data Documentation

◆ max_

unsigned int edm::IterateNTimesLooper::max_
private

Definition at line 40 of file IterateNTimesLooper.cc.

Referenced by endOfLoop(), and startingNewLoop().

◆ shouldStop_

bool edm::IterateNTimesLooper::shouldStop_
private

Definition at line 42 of file IterateNTimesLooper.cc.

Referenced by duringLoop(), and startingNewLoop().

◆ times_

unsigned int edm::IterateNTimesLooper::times_
private

Definition at line 41 of file IterateNTimesLooper.cc.

Referenced by endOfLoop(), and startingNewLoop().