CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
edm::EDLooperBase Class Referenceabstract

#include <EDLooperBase.h>

Inheritance diagram for edm::EDLooperBase:
edm::EDConsumerBase edm::EDLooper edm::NavigateEventsLooper FWFFLooper EcalEleCalibLooper edm::ESProducerLooper edm::IterateNTimesLooper InvRingCalib MuScleFit __class__< T > AlignmentProducer edmtest::DoodadEDLooper Pi0FixedMassWindowCalibration ZeeCalibration

Public Types

enum  Status { kContinue, kStop }
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Public Member Functions

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)
 

Protected Member Functions

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)
 

Private Member Functions

virtual void beginLuminosityBlock (LuminosityBlock const &, EventSetup const &)
 Called after all event modules have processed the begin of a LuminosityBlock. More...
 
virtual void beginRun (Run const &, EventSetup const &)
 Called after all event modules have processed the begin of a Run. More...
 
virtual Status duringLoop (Event const &, EventSetup const &, ProcessingController &)=0
 
void edPrefetchAsync (WaitingTaskHolder iTask, ServiceToken const &token, Principal const &iPrincipal) const
 
virtual void endLuminosityBlock (LuminosityBlock const &, EventSetup const &)
 Called after all event modules have processed the end of a LuminosityBlock. More...
 
virtual Status endOfLoop (EventSetup const &, unsigned int iCounter)=0
 
virtual void endRun (Run const &, EventSetup const &)
 Called after all event modules have processed the end of a Run. More...
 
virtual void startingNewLoop (unsigned int)=0
 

Private Attributes

ExceptionToActionTable const * act_table_
 
unsigned int iCounter_
 
ModuleCallingContext moduleCallingContext_
 
edm::propagate_const< ModuleChanger * > moduleChanger_
 
ModuleDescription moduleDescription_
 
edm::propagate_const< std::unique_ptr< ScheduleInfo > > scheduleInfo_
 

Detailed Description

Definition at line 80 of file EDLooperBase.h.

Member Enumeration Documentation

◆ Status

Enumerator
kContinue 
kStop 

Definition at line 82 of file EDLooperBase.h.

Constructor & Destructor Documentation

◆ EDLooperBase() [1/2]

EDLooperBase::EDLooperBase ( )

Definition at line 37 of file EDLooperBase.cc.

38  : iCounter_(0),
39  act_table_(nullptr),
40  moduleChanger_(nullptr),
41  moduleDescription_("Looper", "looper"),
ModuleCallingContext moduleCallingContext_
Definition: EDLooperBase.h:171
unsigned int iCounter_
Definition: EDLooperBase.h:164
ModuleDescription moduleDescription_
Definition: EDLooperBase.h:170
ExceptionToActionTable const * act_table_
Definition: EDLooperBase.h:165
edm::propagate_const< ModuleChanger * > moduleChanger_
Definition: EDLooperBase.h:168

◆ ~EDLooperBase()

EDLooperBase::~EDLooperBase ( )
overridenoexcept

Definition at line 43 of file EDLooperBase.cc.

43 {}

◆ EDLooperBase() [2/2]

edm::EDLooperBase::EDLooperBase ( EDLooperBase const &  )
delete

Member Function Documentation

◆ attachTo()

void EDLooperBase::attachTo ( ActivityRegistry )
virtual

Override this method if you need to monitor the state of the processing.

Reimplemented in FWFFLooper.

Definition at line 183 of file EDLooperBase.cc.

183 {}

◆ beginLuminosityBlock()

void EDLooperBase::beginLuminosityBlock ( LuminosityBlock const &  ,
EventSetup const &   
)
privatevirtual

Called after all event modules have processed the begin of a LuminosityBlock.

Reimplemented in AlignmentProducer.

Definition at line 180 of file EDLooperBase.cc.

Referenced by doBeginLuminosityBlock().

180 {}

◆ beginOfJob() [1/3]

void EDLooperBase::beginOfJob ( EventSetupImpl const &  iImpl)

Definition at line 94 of file EDLooperBase.cc.

References beginOfJob(), edm::BeginRun, edm::EDConsumerBase::esGetTokenIndices(), and moduleCallingContext_.

94  {
95  ESParentContext parentC(&moduleCallingContext_);
97  iImpl, static_cast<unsigned int>(Transition::BeginRun), esGetTokenIndices(Transition::BeginRun), parentC});
98  }
ModuleCallingContext moduleCallingContext_
Definition: EDLooperBase.h:171
ESResolverIndex const * esGetTokenIndices(edm::Transition iTrans) const
virtual void beginOfJob()

◆ beginOfJob() [2/3]

void EDLooperBase::beginOfJob ( EventSetup const &  )
virtual

Reimplemented in AlignmentProducer, and edmtest::DoodadEDLooper.

Definition at line 99 of file EDLooperBase.cc.

References beginOfJob().

99 { beginOfJob(); }
virtual void beginOfJob()

◆ beginOfJob() [3/3]

void EDLooperBase::beginOfJob ( )
virtual

Reimplemented in ZeeCalibration, Pi0FixedMassWindowCalibration, __class__< T >, EcalEleCalibLooper, and InvRingCalib.

Definition at line 100 of file EDLooperBase.cc.

Referenced by beginOfJob().

100 {}

◆ beginRun()

void EDLooperBase::beginRun ( Run const &  ,
EventSetup const &   
)
privatevirtual

Called after all event modules have processed the begin of a Run.

Reimplemented in FWFFLooper, AlignmentProducer, and edmtest::DoodadEDLooper.

Definition at line 178 of file EDLooperBase.cc.

Referenced by doBeginRun().

178 {}

◆ copyInfo()

void EDLooperBase::copyInfo ( ScheduleInfo const &  iInfo)

Definition at line 241 of file EDLooperBase.cc.

References scheduleInfo_.

241 { scheduleInfo_ = std::make_unique<ScheduleInfo>(iInfo); }
edm::propagate_const< std::unique_ptr< ScheduleInfo > > scheduleInfo_
Definition: EDLooperBase.h:167

◆ doBeginLuminosityBlock()

void EDLooperBase::doBeginLuminosityBlock ( LuminosityBlockPrincipal iLB,
EventSetupImpl const &  iES,
ProcessContext processContext 
)

Definition at line 137 of file EDLooperBase.cc.

References edm::BeginLuminosityBlock, beginLuminosityBlock(), edm::LuminosityBlockPrincipal::beginTime(), edm::EDConsumerBase::esGetTokenIndices(), edm::LuminosityBlockPrincipal::id(), edm::LuminosityBlockPrincipal::index(), edm::RunPrincipal::index(), edm::GlobalContext::kBeginLuminosityBlock, moduleCallingContext_, moduleDescription_, edm::LuminosityBlockPrincipal::runPrincipal(), and edm::LuminosityBlock::setConsumer().

139  {
140  GlobalContext globalContext(GlobalContext::Transition::kBeginLuminosityBlock,
141  iLB.id(),
142  iLB.runPrincipal().index(),
143  iLB.index(),
144  iLB.beginTime(),
145  processContext);
146  ParentContext parentContext(&globalContext);
147  ModuleContextSentry moduleContextSentry(&moduleCallingContext_, parentContext);
148  LuminosityBlock luminosityBlock(iLB, moduleDescription_, &moduleCallingContext_, false);
149  luminosityBlock.setConsumer(this);
150  ESParentContext parentC(&moduleCallingContext_);
151  const EventSetup es{iES,
152  static_cast<unsigned int>(Transition::BeginLuminosityBlock),
154  parentC};
155  beginLuminosityBlock(luminosityBlock, es);
156  }
ModuleCallingContext moduleCallingContext_
Definition: EDLooperBase.h:171
virtual void beginLuminosityBlock(LuminosityBlock const &, EventSetup const &)
Called after all event modules have processed the begin of a LuminosityBlock.
ModuleDescription moduleDescription_
Definition: EDLooperBase.h:170
ESResolverIndex const * esGetTokenIndices(edm::Transition iTrans) const

◆ doBeginRun()

void EDLooperBase::doBeginRun ( RunPrincipal iRP,
EventSetupImpl const &  iES,
ProcessContext processContext 
)

Definition at line 104 of file EDLooperBase.cc.

References edm::BeginRun, beginRun(), edm::RunPrincipal::beginTime(), edm::EDConsumerBase::esGetTokenIndices(), edm::RunPrincipal::index(), edm::LuminosityBlockIndex::invalidLuminosityBlockIndex(), edm::GlobalContext::kBeginRun, moduleCallingContext_, moduleDescription_, writedatasetfile::run, and edm::RunPrincipal::run().

104  {
105  GlobalContext globalContext(GlobalContext::Transition::kBeginRun,
106  LuminosityBlockID(iRP.run(), 0),
107  iRP.index(),
109  iRP.beginTime(),
110  processContext);
111  ParentContext parentContext(&globalContext);
112  ModuleContextSentry moduleContextSentry(&moduleCallingContext_, parentContext);
114  run.setConsumer(this);
115  ESParentContext parentC(&moduleCallingContext_);
116  const EventSetup es{
117  iES, static_cast<unsigned int>(Transition::BeginRun), esGetTokenIndices(Transition::BeginRun), parentC};
118  beginRun(run, es);
119  }
ModuleCallingContext moduleCallingContext_
Definition: EDLooperBase.h:171
ModuleDescription moduleDescription_
Definition: EDLooperBase.h:170
ESResolverIndex const * esGetTokenIndices(edm::Transition iTrans) const
static LuminosityBlockIndex invalidLuminosityBlockIndex()
virtual void beginRun(Run const &, EventSetup const &)
Called after all event modules have processed the begin of a Run.

◆ doDuringLoop()

EDLooperBase::Status EDLooperBase::doDuringLoop ( edm::EventPrincipal eventPrincipal,
EventSetupImpl const &  es,
edm::ProcessingController ioController,
StreamContext streamContext 
)

Definition at line 47 of file EDLooperBase.cc.

References act_table_, writedatasetfile::action, duringLoop(), MillePedeFileConverter_cfg::e, edm::EDConsumerBase::esGetTokenIndices(), edm::Event, edmPickEvents::event, edm::ExceptionToActionTable::find(), edm::EventPrincipal::id(), edm::LuminosityBlockPrincipal::index(), edm::RunPrincipal::index(), kContinue, edm::StreamContext::kEvent, edm::EventPrincipal::luminosityBlockPrincipal(), moduleCallingContext_, moduleDescription_, edm::printCmsExceptionWarning(), edm::exception_actions::Rethrow, edm::LuminosityBlockPrincipal::runPrincipal(), edm::StreamContext::setEventID(), edm::StreamContext::setLuminosityBlockIndex(), edm::StreamContext::setRunIndex(), edm::StreamContext::setTimestamp(), edm::StreamContext::setTransition(), mps_update::status, and edm::EventPrincipal::time().

50  {
51  streamContext->setTransition(StreamContext::Transition::kEvent);
52  streamContext->setEventID(eventPrincipal.id());
53  streamContext->setRunIndex(eventPrincipal.luminosityBlockPrincipal().runPrincipal().index());
54  streamContext->setLuminosityBlockIndex(eventPrincipal.luminosityBlockPrincipal().index());
55  streamContext->setTimestamp(eventPrincipal.time());
56  ParentContext parentContext(streamContext);
57  ModuleContextSentry moduleContextSentry(&moduleCallingContext_, parentContext);
59  event.setConsumer(this);
60 
62  try {
63  ESParentContext parentC(&moduleCallingContext_);
64  const EventSetup es{
65  esi, static_cast<unsigned int>(Transition::Event), esGetTokenIndices(Transition::Event), parentC};
66  status = duringLoop(event, es, ioController);
67  } catch (cms::Exception& e) {
68  e.addContext("Calling the 'duringLoop' method of a looper");
71  edm::printCmsExceptionWarning("SkipEvent", e);
72  } else {
73  throw;
74  }
75  }
76  return status;
77  }
ModuleCallingContext moduleCallingContext_
Definition: EDLooperBase.h:171
RunPrincipal const & runPrincipal() const
Timestamp const & time() const
LuminosityBlockPrincipal const & luminosityBlockPrincipal() const
virtual Status duringLoop(Event const &, EventSetup const &, ProcessingController &)=0
ModuleDescription moduleDescription_
Definition: EDLooperBase.h:170
ESResolverIndex const * esGetTokenIndices(edm::Transition iTrans) const
RunIndex index() const
Definition: RunPrincipal.h:56
ExceptionToActionTable const * act_table_
Definition: EDLooperBase.h:165
exception_actions::ActionCodes find(const std::string &category) const
LuminosityBlockIndex index() const
EventID const & id() const
Definition: event.py:1
void printCmsExceptionWarning(char const *behavior, cms::Exception const &e)

◆ doEndLuminosityBlock()

void EDLooperBase::doEndLuminosityBlock ( LuminosityBlockPrincipal iLB,
EventSetupImpl const &  iES,
ProcessContext processContext 
)

Definition at line 157 of file EDLooperBase.cc.

References edm::LuminosityBlockPrincipal::beginTime(), edm::EndLuminosityBlock, endLuminosityBlock(), edm::EDConsumerBase::esGetTokenIndices(), edm::LuminosityBlockPrincipal::id(), edm::LuminosityBlockPrincipal::index(), edm::RunPrincipal::index(), edm::GlobalContext::kEndLuminosityBlock, moduleCallingContext_, moduleDescription_, edm::LuminosityBlockPrincipal::runPrincipal(), and edm::LuminosityBlock::setConsumer().

159  {
160  GlobalContext globalContext(GlobalContext::Transition::kEndLuminosityBlock,
161  iLB.id(),
162  iLB.runPrincipal().index(),
163  iLB.index(),
164  iLB.beginTime(),
165  processContext);
166  ParentContext parentContext(&globalContext);
167  ModuleContextSentry moduleContextSentry(&moduleCallingContext_, parentContext);
168  LuminosityBlock luminosityBlock(iLB, moduleDescription_, &moduleCallingContext_, true);
169  luminosityBlock.setConsumer(this);
170  ESParentContext parentC(&moduleCallingContext_);
171  const EventSetup es{iES,
172  static_cast<unsigned int>(Transition::EndLuminosityBlock),
174  parentC};
175  endLuminosityBlock(luminosityBlock, es);
176  }
ModuleCallingContext moduleCallingContext_
Definition: EDLooperBase.h:171
ModuleDescription moduleDescription_
Definition: EDLooperBase.h:170
ESResolverIndex const * esGetTokenIndices(edm::Transition iTrans) const
virtual void endLuminosityBlock(LuminosityBlock const &, EventSetup const &)
Called after all event modules have processed the end of a LuminosityBlock.

◆ doEndOfLoop()

EDLooperBase::Status EDLooperBase::doEndOfLoop ( EventSetupImpl const &  es)

Definition at line 79 of file EDLooperBase.cc.

References endOfLoop(), edm::EndRun, edm::EDConsumerBase::esGetTokenIndices(), iCounter_, and moduleCallingContext_.

79  {
80  ESParentContext parentC(&moduleCallingContext_);
81  const EventSetup es{
82  esi, static_cast<unsigned int>(Transition::EndRun), esGetTokenIndices(Transition::EndRun), parentC};
83  return endOfLoop(es, iCounter_);
84  }
virtual Status endOfLoop(EventSetup const &, unsigned int iCounter)=0
ModuleCallingContext moduleCallingContext_
Definition: EDLooperBase.h:171
unsigned int iCounter_
Definition: EDLooperBase.h:164
ESResolverIndex const * esGetTokenIndices(edm::Transition iTrans) const

◆ doEndRun()

void EDLooperBase::doEndRun ( RunPrincipal iRP,
EventSetupImpl const &  iES,
ProcessContext processContext 
)

Definition at line 121 of file EDLooperBase.cc.

References edm::EndRun, endRun(), edm::RunPrincipal::endTime(), edm::EDConsumerBase::esGetTokenIndices(), edm::RunPrincipal::index(), edm::LuminosityBlockIndex::invalidLuminosityBlockIndex(), edm::GlobalContext::kEndRun, moduleCallingContext_, moduleDescription_, writedatasetfile::run, and edm::RunPrincipal::run().

121  {
122  GlobalContext globalContext(GlobalContext::Transition::kEndRun,
123  LuminosityBlockID(iRP.run(), 0),
124  iRP.index(),
126  iRP.endTime(),
127  processContext);
128  ParentContext parentContext(&globalContext);
129  ModuleContextSentry moduleContextSentry(&moduleCallingContext_, parentContext);
131  run.setConsumer(this);
132  ESParentContext parentC(&moduleCallingContext_);
133  const EventSetup es{
134  iES, static_cast<unsigned int>(Transition::EndRun), esGetTokenIndices(Transition::EndRun), parentC};
135  endRun(run, es);
136  }
ModuleCallingContext moduleCallingContext_
Definition: EDLooperBase.h:171
ModuleDescription moduleDescription_
Definition: EDLooperBase.h:170
ESResolverIndex const * esGetTokenIndices(edm::Transition iTrans) const
static LuminosityBlockIndex invalidLuminosityBlockIndex()
virtual void endRun(Run const &, EventSetup const &)
Called after all event modules have processed the end of a Run.

◆ doStartingNewLoop()

void EDLooperBase::doStartingNewLoop ( )

Definition at line 45 of file EDLooperBase.cc.

References iCounter_, and startingNewLoop().

unsigned int iCounter_
Definition: EDLooperBase.h:164
virtual void startingNewLoop(unsigned int)=0

◆ duringLoop()

virtual Status edm::EDLooperBase::duringLoop ( Event const &  ,
EventSetup const &  ,
ProcessingController  
)
privatepure virtual

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

Implemented in FWFFLooper, edm::EDLooper, and edm::NavigateEventsLooper.

Referenced by doDuringLoop().

◆ edPrefetchAsync()

void EDLooperBase::edPrefetchAsync ( WaitingTaskHolder  iTask,
ServiceToken const &  token,
Principal const &  iPrincipal 
) const
private

Definition at line 194 of file EDLooperBase.cc.

References edm::Principal::branchType(), B2GTnPMonitor_cfi::item, mps_monitormerge::items, edm::EDConsumerBase::itemsToGetFrom(), moduleCallingContext_, edm::Principal::prefetchAsync(), edm::ProductResolverIndexAmbiguous, and unpackBuffers-CaloStage2::token.

Referenced by prefetchAsync().

196  {
197  //Based on Worker edPrefetchAsync
198 
199  // Prefetch products the module declares it consumes
200  std::vector<ProductResolverIndexAndSkipBit> const& items = itemsToGetFrom(iPrincipal.branchType());
201 
202  for (auto const& item : items) {
203  ProductResolverIndex productResolverIndex = item.productResolverIndex();
204  bool skipCurrentProcess = item.skipCurrentProcess();
205  if (productResolverIndex != ProductResolverIndexAmbiguous) {
206  iPrincipal.prefetchAsync(iTask, productResolverIndex, skipCurrentProcess, token, &moduleCallingContext_);
207  }
208  }
209  }
unsigned int ProductResolverIndex
ModuleCallingContext moduleCallingContext_
Definition: EDLooperBase.h:171
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom(BranchType iType) const

◆ endLuminosityBlock()

void EDLooperBase::endLuminosityBlock ( LuminosityBlock const &  ,
EventSetup const &   
)
privatevirtual

Called after all event modules have processed the end of a LuminosityBlock.

Reimplemented in AlignmentProducer.

Definition at line 181 of file EDLooperBase.cc.

Referenced by doEndLuminosityBlock().

181 {}

◆ endOfJob()

void EDLooperBase::endOfJob ( )
virtual

◆ endOfLoop()

virtual Status edm::EDLooperBase::endOfLoop ( EventSetup const &  ,
unsigned int  iCounter 
)
privatepure virtual

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.

Implemented in MuScleFit, ZeeCalibration, FWFFLooper, Pi0FixedMassWindowCalibration, EcalEleCalibLooper, InvRingCalib, edm::NavigateEventsLooper, edmtest::DoodadEDLooper, AlignmentProducer, and edm::IterateNTimesLooper.

Referenced by doEndOfLoop().

◆ endRun()

void EDLooperBase::endRun ( Run const &  ,
EventSetup const &   
)
privatevirtual

Called after all event modules have processed the end of a Run.

Reimplemented in AlignmentProducer.

Definition at line 179 of file EDLooperBase.cc.

Referenced by doEndRun().

179 {}

◆ esPrefetchAsync()

void EDLooperBase::esPrefetchAsync ( WaitingTaskHolder  iTask,
EventSetupImpl const &  iImpl,
Transition  iTrans,
ServiceToken const &  iToken 
) const

Definition at line 211 of file EDLooperBase.cc.

References cms::cuda::assert(), edm::EDConsumerBase::esGetTokenIndicesVector(), edm::EDConsumerBase::esGetTokenRecordIndicesVector(), edm::EventSetupImpl::findImpl(), mps_fire::i, mps_monitormerge::items, moduleCallingContext_, edm::NumberOfEventSetupTransitions, and edm::eventsetup::EventSetupRecordImpl::prefetchAsync().

Referenced by prefetchAsync().

214  {
215  //Based on Worker::esPrefetchAsync
217  return;
218  }
219  auto const& recs = esGetTokenRecordIndicesVector(iTrans);
220  auto const& items = esGetTokenIndicesVector(iTrans);
221 
222  assert(items.size() == recs.size());
223  if (items.empty()) {
224  return;
225  }
226 
227  for (size_t i = 0; i != items.size(); ++i) {
228  if (recs[i] != ESRecordIndex{}) {
229  auto rec = iImpl.findImpl(recs[i]);
230  if (rec) {
231  rec->prefetchAsync(iTask, items[i], &iImpl, iToken, ESParentContext(&moduleCallingContext_));
232  }
233  }
234  }
235  }
ModuleCallingContext moduleCallingContext_
Definition: EDLooperBase.h:171
assert(be >=bs)
std::vector< ESResolverIndex > const & esGetTokenIndicesVector(edm::Transition iTrans) const
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector(edm::Transition iTrans) const

◆ modifyingRecords()

std::set< eventsetup::EventSetupRecordKey > EDLooperBase::modifyingRecords ( ) const
virtual

Reimplemented in edm::ESProducerLooper.

Definition at line 237 of file EDLooperBase.cc.

Referenced by prepareForNextLoop().

237  {
238  return std::set<eventsetup::EventSetupRecordKey>();
239  }

◆ moduleChanger()

ModuleChanger * EDLooperBase::moduleChanger ( )
protected

This only returns a non-zero value during the call to endOfLoop.

Definition at line 244 of file EDLooperBase.cc.

References moduleChanger_.

Referenced by FWFFLooper::endOfLoop().

244 { return moduleChanger_; }
edm::propagate_const< ModuleChanger * > moduleChanger_
Definition: EDLooperBase.h:168

◆ operator=()

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

◆ prefetchAsync()

void EDLooperBase::prefetchAsync ( WaitingTaskHolder  iTask,
ServiceToken const &  token,
Transition  iTrans,
Principal const &  iPrincipal,
EventSetupImpl const &  iImpl 
) const

Definition at line 185 of file EDLooperBase.cc.

References edPrefetchAsync(), esPrefetchAsync(), eostools::move(), and unpackBuffers-CaloStage2::token.

189  {
190  esPrefetchAsync(iTask, iImpl, iTrans, token);
191  edPrefetchAsync(std::move(iTask), token, iPrincipal);
192  }
void esPrefetchAsync(WaitingTaskHolder iTask, EventSetupImpl const &iImpl, Transition iTrans, ServiceToken const &iToken) const
def move(src, dest)
Definition: eostools.py:511
void edPrefetchAsync(WaitingTaskHolder iTask, ServiceToken const &token, Principal const &iPrincipal) const

◆ prepareForNextLoop()

void EDLooperBase::prepareForNextLoop ( eventsetup::EventSetupProvider esp)

Definition at line 86 of file EDLooperBase.cc.

References edm::for_all(), iCounter_, relativeConstraints::keys, modifyingRecords(), and edm::eventsetup::EventSetupProvider::resetRecordPlusDependentRecords().

86  {
87  ++iCounter_;
88 
89  std::set<edm::eventsetup::EventSetupRecordKey> const& keys = modifyingRecords();
90  for_all(keys,
91  std::bind(&eventsetup::EventSetupProvider::resetRecordPlusDependentRecords, esp, std::placeholders::_1));
92  }
unsigned int iCounter_
Definition: EDLooperBase.h:164
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:14
virtual std::set< eventsetup::EventSetupRecordKey > modifyingRecords() const
void resetRecordPlusDependentRecords(EventSetupRecordKey const &)
Used when we need to force a Record to reset all its proxies.

◆ scheduleInfo()

const ScheduleInfo * EDLooperBase::scheduleInfo ( ) const
protected

This returns a non-zero value after the constructor has been called.

Definition at line 245 of file EDLooperBase.cc.

References scheduleInfo_.

Referenced by FWFFLooper::startingNewLoop().

245 { return scheduleInfo_.get(); }
edm::propagate_const< std::unique_ptr< ScheduleInfo > > scheduleInfo_
Definition: EDLooperBase.h:167

◆ setActionTable()

void edm::EDLooperBase::setActionTable ( ExceptionToActionTable const *  actionTable)
inline

Definition at line 120 of file EDLooperBase.h.

References act_table_.

120 { act_table_ = actionTable; }
ExceptionToActionTable const * act_table_
Definition: EDLooperBase.h:165

◆ setModuleChanger()

void EDLooperBase::setModuleChanger ( ModuleChanger iChanger)

Definition at line 242 of file EDLooperBase.cc.

References moduleChanger_.

242 { moduleChanger_ = iChanger; }
edm::propagate_const< ModuleChanger * > moduleChanger_
Definition: EDLooperBase.h:168

◆ startingNewLoop()

virtual void edm::EDLooperBase::startingNewLoop ( unsigned  int)
privatepure virtual

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.

Implemented in MuScleFit, ZeeCalibration, FWFFLooper, Pi0FixedMassWindowCalibration, __class__< T >, EcalEleCalibLooper, InvRingCalib, edm::NavigateEventsLooper, edm::IterateNTimesLooper, AlignmentProducer, and edmtest::DoodadEDLooper.

Referenced by doStartingNewLoop().

Member Data Documentation

◆ act_table_

ExceptionToActionTable const* edm::EDLooperBase::act_table_
private

Definition at line 165 of file EDLooperBase.h.

Referenced by doDuringLoop(), and setActionTable().

◆ iCounter_

unsigned int edm::EDLooperBase::iCounter_
private

Definition at line 164 of file EDLooperBase.h.

Referenced by doEndOfLoop(), doStartingNewLoop(), and prepareForNextLoop().

◆ moduleCallingContext_

ModuleCallingContext edm::EDLooperBase::moduleCallingContext_
private

◆ moduleChanger_

edm::propagate_const<ModuleChanger*> edm::EDLooperBase::moduleChanger_
private

Definition at line 168 of file EDLooperBase.h.

Referenced by moduleChanger(), and setModuleChanger().

◆ moduleDescription_

ModuleDescription edm::EDLooperBase::moduleDescription_
private

◆ scheduleInfo_

edm::propagate_const<std::unique_ptr<ScheduleInfo> > edm::EDLooperBase::scheduleInfo_
private

Definition at line 167 of file EDLooperBase.h.

Referenced by copyInfo(), and scheduleInfo().