|
![CMS Logo](/cmsdoxygen/common/rightImage.jpg) |
Go to the documentation of this file.
35 #include "tbb/global_control.h"
42 moduleChanger_(nullptr),
43 moduleDescription_(
"Looper",
"looper"),
44 moduleCallingContext_(&moduleDescription_) {}
61 event.setConsumer(
this);
70 e.addContext(
"Calling the 'duringLoop' method of a looper");
119 run.setConsumer(
this);
136 run.setConsumer(
this);
211 bool skipCurrentProcess =
item.skipCurrentProcess();
239 if UNLIKELY (tbb::global_control::active_value(tbb::global_control::max_allowed_parallelism) == 1) {
240 auto taskGroup = iTask.
group();
242 taskGroup->run([
this,
task =
std::move(iTask), iTrans, &iImpl, weakToken]() {
243 std::exception_ptr exceptPtr{};
244 iImpl.
taskArena()->execute([
this, iTrans, &iImpl, weakToken, &exceptPtr]() {
250 for (
size_t i = 0;
i !=
items.size(); ++
i) {
261 auto tempTask =
task;
262 tempTask.doneWaiting(exceptPtr);
270 holder.doneWaiting(*iExcept);
272 holder.doneWaiting(std::exception_ptr{});
278 for (
size_t i = 0;
i !=
items.size(); ++
i) {
291 return std::set<eventsetup::EventSetupRecordKey>();
Timestamp const & endTime() const
RunPrincipal const & runPrincipal() const
eventsetup::EventSetupRecordImpl const * findImpl(const eventsetup::EventSetupRecordKey &) const
unsigned int ProductResolverIndex
LuminosityBlockPrincipal const & luminosityBlockPrincipal() const
void setTransition(Transition v)
void copyInfo(ScheduleInfo const &)
void printCmsExceptionWarning(char const *behavior, cms::Exception const &e)
void setTimestamp(Timestamp const &v)
void setLuminosityBlockIndex(LuminosityBlockIndex const &v)
std::vector< ESProxyIndex > const & esGetTokenIndicesVector(edm::Transition iTrans) const
void doBeginRun(RunPrincipal &, EventSetupImpl const &, ProcessContext *)
void prepareForNextLoop(eventsetup::EventSetupProvider *esp)
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom(BranchType iType) const
~EDLooperBase() noexcept(false) override
EventID const & id() const
void prefetchAsync(WaitingTaskHolder iTask, ESProxyIndex iProxyIndex, EventSetupImpl const *, ServiceToken const &, ESParentContext) const
prefetch the data to setup for subsequent calls to getImplementation
void setModuleChanger(ModuleChanger *)
void resetRecordPlusDependentRecords(EventSetupRecordKey const &)
Used when we need to force a Record to reset all its proxies.
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
ExceptionToActionTable const * act_table_
Timestamp const & beginTime() const
Timestamp const & time() const
edm::propagate_const< ModuleChanger * > moduleChanger_
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector(edm::Transition iTrans) const
virtual void endRun(Run const &, EventSetup const &)
Called after all event modules have processed the end of a Run.
ScheduleInfo const * scheduleInfo() const
This returns a non-zero value after the constructor has been called.
virtual void beginRun(Run const &, EventSetup const &)
Called after all event modules have processed the begin of a Run.
BranchType const & branchType() const
tbb::task_arena * taskArena() const
virtual void startingNewLoop(unsigned int)=0
void prefetchAsync(WaitingTaskHolder iTask, ServiceToken const &token, Transition iTrans, Principal const &iPrincipal, EventSetupImpl const &iImpl) const
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.
ModuleDescription moduleDescription_
FunctorWaitingTask< F > * make_waiting_task(F f)
static LuminosityBlockIndex invalidLuminosityBlockIndex()
void setConsumer(EDConsumerBase const *iConsumer)
ModuleChanger * moduleChanger()
This only returns a non-zero value during the call to endOfLoop.
void doEndLuminosityBlock(LuminosityBlockPrincipal &, EventSetupImpl const &, ProcessContext *)
virtual Status endOfLoop(EventSetup const &, unsigned int iCounter)=0
ModuleCallingContext moduleCallingContext_
Status doDuringLoop(EventPrincipal &eventPrincipal, EventSetupImpl const &es, ProcessingController &, StreamContext *)
void setEventID(EventID const &v)
ServiceToken lock() const
Status doEndOfLoop(EventSetupImpl const &es)
void doEndRun(RunPrincipal &, EventSetupImpl const &, ProcessContext *)
void setRunIndex(RunIndex const &v)
LuminosityBlockID id() const
ESProxyIndex const * esGetTokenIndices(edm::Transition iTrans) const
virtual Status duringLoop(Event const &, EventSetup const &, ProcessingController &)=0
virtual void attachTo(ActivityRegistry &)
Override this method if you need to monitor the state of the processing.
exception_actions::ActionCodes find(const std::string &category) const
virtual std::set< eventsetup::EventSetupRecordKey > modifyingRecords() const
std::exception_ptr syncWait(F &&iFunc)
LuminosityBlockIndex index() const
Timestamp const & beginTime() const
void prefetchAsync(WaitingTaskHolder waitTask, ProductResolverIndex index, bool skipCurrentProcess, ServiceToken const &token, ModuleCallingContext const *mcc) const
edm::propagate_const< std::unique_ptr< ScheduleInfo > > scheduleInfo_
tbb::task_group * group() const noexcept
void doBeginLuminosityBlock(LuminosityBlockPrincipal &, EventSetupImpl const &, ProcessContext *)
virtual void beginOfJob()
void esPrefetchAsync(WaitingTaskHolder iTask, EventSetupImpl const &iImpl, Transition iTrans, ServiceToken const &iToken) const
virtual void beginLuminosityBlock(LuminosityBlock const &, EventSetup const &)
Called after all event modules have processed the begin of a LuminosityBlock.