22 #include <type_traits> 25 namespace workerimpl {
87 template <
typename...
T>
101 template <
typename T,
typename INFOTYPE>
108 template <
typename T,
typename INFOTYPE>
116 template <
typename T>
122 template <
typename T>
125 template <
typename T>
127 return module_->wantsProcessBlocks();
130 template <
typename T>
132 return module_->wantsInputProcessBlocks();
135 template <
typename T>
137 return module_->wantsGlobalRuns();
140 template <
typename T>
142 return module_->wantsGlobalLuminosityBlocks();
145 template <
typename T>
147 return module_->wantsStreamRuns();
150 template <
typename T>
152 return module_->wantsStreamLuminosityBlocks();
155 template <
typename T>
159 template <
typename T>
167 return module_->globalRunsQueue();
171 return module_->globalLuminosityBlocksQueue();
175 return module_->globalRunsQueue();
179 return module_->globalLuminosityBlocksQueue();
183 return module_->globalRunsQueue();
187 return module_->globalLuminosityBlocksQueue();
191 return module_->globalRunsQueue();
195 return module_->globalLuminosityBlocksQueue();
198 template <
typename T>
201 std::shared_ptr<Worker> sentry(
this, [&
ep](
Worker*
obj) {
obj->postDoEvent(
ep); });
202 return module_->doEvent(
info, activityRegistry(), mcc);
205 template <
typename T>
214 module_->doAcquire(
info, activityRegistry(), mcc, holder);
221 module_->doAcquire(
info, activityRegistry(), mcc, holder);
228 module_->doAcquire(
info, activityRegistry(), mcc, holder);
235 module_->doAcquire(
info, activityRegistry(), mcc, holder);
242 module_->doAcquire(
info, activityRegistry(), mcc, holder);
245 template <
typename T>
247 size_t iTransformIndex,
256 module_->doTransformAsync(iTask, iTransformIndex,
iEvent, activityRegistry(), mcc, weakToken);
258 iTask.doneWaiting(std::current_exception());
261 iTask.doneWaiting(std::exception_ptr());
266 size_t iTransformIndex,
272 size_t iTransformIndex,
278 size_t iTransformIndex,
284 size_t iTransformIndex,
290 size_t iTransformIndex,
296 size_t iTransformIndex,
302 size_t iTransformIndex,
308 template <
typename T>
314 return module_->transformIndex_(iBranch);
318 return module_->transformIndex_(iBranch);
323 return module_->transformIndex_(iBranch);
327 return module_->transformIndex_(iBranch);
331 return module_->transformIndex_(iBranch);
335 return module_->transformIndex_(iBranch);
339 return module_->transformIndex_(iBranch);
342 template <
typename T>
348 size_t iTransformIndex)
const noexcept {
349 return module_->transformPrefetch_(iTransformIndex);
353 size_t iTransformIndex)
const noexcept {
354 return module_->transformPrefetch_(iTransformIndex);
358 size_t iTransformIndex)
const noexcept {
359 return module_->transformPrefetch_(iTransformIndex);
363 size_t iTransformIndex)
const noexcept {
364 return module_->transformPrefetch_(iTransformIndex);
368 size_t iTransformIndex)
const noexcept {
369 return module_->transformPrefetch_(iTransformIndex);
373 return module_->transformPrefetch_(iTransformIndex);
377 size_t iTransformIndex)
const noexcept {
378 return module_->transformPrefetch_(iTransformIndex);
381 template <
typename T>
386 template <
typename T>
392 template <
typename T>
404 return module_->prePrefetchSelection(
id,
ep, mcc);
408 std::vector<ProductResolverIndexAndSkipBit>& iItems)
const {
409 iItems =
module_->productsUsedBySelection();
420 return module_->prePrefetchSelection(
id,
ep, mcc);
424 std::vector<ProductResolverIndexAndSkipBit>& iItems)
const {
425 iItems =
module_->productsUsedBySelection();
436 return module_->prePrefetchSelection(
id,
ep, mcc);
440 std::vector<ProductResolverIndexAndSkipBit>& iItems)
const {
441 iItems =
module_->productsUsedBySelection();
444 template <
typename T>
446 module_->doBeginProcessBlock(pbp, mcc);
450 template <
typename T>
452 module_->doAccessInputProcessBlock(pbp, mcc);
456 template <
typename T>
458 module_->doEndProcessBlock(pbp, mcc);
462 template <
typename T>
468 template <
typename T>
469 template <
typename D>
477 template <
typename T>
478 template <
typename D>
483 template <
typename T>
491 might_call(
this,
id,
info, mcc);
495 template <
typename T>
501 might_call(
this,
id,
info, mcc);
505 template <
typename T>
511 template <
typename T>
517 template <
typename T>
518 template <
typename D>
523 module_->doStreamBeginLuminosityBlock(
id,
info, mcc);
526 template <
typename T>
527 template <
typename D>
529 module_->doStreamEndLuminosityBlock(
id,
info, mcc);
532 template <
typename T>
540 might_call(
this,
id,
info, mcc);
544 template <
typename T>
552 might_call(
this,
id,
info, mcc);
557 template <
typename T>
563 template <
typename T>
568 template <
typename T>
573 template <
typename T>
578 template <
typename T>
579 template <
typename D>
584 template <
typename T>
591 might_call(
this,
id);
594 template <
typename T>
595 template <
typename D>
600 template <
typename T>
607 might_call(
this,
id);
610 template <
typename T>
612 module_->doRespondToOpenInputFile(fb);
615 template <
typename T>
617 module_->doRespondToCloseInputFile(fb);
620 template <
typename T>
622 module_->doRespondToCloseOutputFile();
625 template <
typename T>
631 template <
typename T>
637 return &(
module_->sharedResourcesAcquirer().serialQueueChain());
641 return &(
module_->sharedResourcesAcquirer().serialQueueChain());
645 return &(
module_->sharedResourcesAcquirer().serialQueueChain());
649 return &(
module_->sharedResourcesAcquirer().serialQueueChain());
669 template <
typename T>
670 bool mustPrefetchMayGet();
673 bool mustPrefetchMayGet<edm::one::EDProducerBase>() {
677 bool mustPrefetchMayGet<edm::one::EDFilterBase>() {
681 bool mustPrefetchMayGet<edm::one::EDAnalyzerBase>() {
685 bool mustPrefetchMayGet<edm::one::OutputModuleBase>() {
690 bool mustPrefetchMayGet<edm::global::EDProducerBase>() {
694 bool mustPrefetchMayGet<edm::global::EDFilterBase>() {
698 bool mustPrefetchMayGet<edm::global::EDAnalyzerBase>() {
702 bool mustPrefetchMayGet<edm::global::OutputModuleBase>() {
707 bool mustPrefetchMayGet<edm::limited::EDProducerBase>() {
711 bool mustPrefetchMayGet<edm::limited::EDFilterBase>() {
715 bool mustPrefetchMayGet<edm::limited::EDAnalyzerBase>() {
719 bool mustPrefetchMayGet<edm::limited::OutputModuleBase>() {
724 bool mustPrefetchMayGet<edm::stream::EDProducerAdaptorBase>() {
728 bool mustPrefetchMayGet<edm::stream::EDFilterAdaptorBase>() {
732 bool mustPrefetchMayGet<edm::stream::EDAnalyzerAdaptorBase>() {
738 template <
typename T>
740 module_->updateLookup(iBranchType, iHelper, mustPrefetchMayGet<T>());
743 template <
typename T>
748 template <
typename T>
751 module_->selectInputProcessBlocks(productRegistry, processBlockHelperBase);
755 using ModuleToResolverIndicies =
756 std::unordered_multimap<std::string, std::tuple<edm::TypeID const*, const char*, edm::ProductResolverIndex>>;
757 void resolvePutIndiciesImpl(
void*,
759 ModuleToResolverIndicies
const& iIndicies,
764 void resolvePutIndiciesImpl(ProducerBase* iProd,
766 ModuleToResolverIndicies
const& iIndicies,
768 iProd->resolvePutIndicies(iBranchType, iIndicies, iModuleLabel);
773 ModuleToResolverIndicies
const& iIndicies,
779 ModuleToResolverIndicies
const& iIndicies,
786 template <
typename T>
789 std::unordered_multimap<
std::string, std::tuple<TypeID const*, const char*, edm::ProductResolverIndex>>
const&
void updateLookup(BranchType iBranchType, ProductResolverIndexHelper const &) final
static const char module_[]
void operator()(WorkerT< T > *iWorker, StreamID id, INFOTYPE const &info, ModuleCallingContext const *mcc)
bool wantsGlobalLuminosityBlocks() const noexcept final
bool implDoEndProcessBlock(ProcessBlockPrincipal const &, ModuleCallingContext const *) override
SerialTaskQueue * globalRunsQueue() final
roAction_t actions[nactions]
void implDoTransformAsync(WaitingTaskHolder, size_t iTransformIndex, EventPrincipal const &, ParentContext const &, ServiceWeakToken const &) noexcept final
unsigned int ProductResolverIndex
SerialTaskQueue * globalLuminosityBlocksQueue() final
void operator()(WorkerT< T > *iWorker, StreamID id, INFOTYPE const &info, ModuleCallingContext const *mcc)
void implEndJob() override
std::string workerType() const override
void callWorkerStreamEnd(D, StreamID, RunTransitionInfo const &, ModuleCallingContext const *)
bool implDoStreamEnd(StreamID, RunTransitionInfo const &, ModuleCallingContext const *) override
bool implDoPrePrefetchSelection(StreamID, EventPrincipal const &, ModuleCallingContext const *) override
ProductResolverIndex itemToGetForTransform(size_t iTransformIndex) const noexcept final
bool implDoAccessInputProcessBlock(ProcessBlockPrincipal const &, ModuleCallingContext const *) override
void callWorkerStreamBegin(D, StreamID, RunTransitionInfo const &, ModuleCallingContext const *)
edm::propagate_const< std::shared_ptr< T > > module_
void itemsToGetForSelection(std::vector< ProductResolverIndexAndSkipBit > &) const final
void implRespondToOpenInputFile(FileBlock const &fb) override
void implRespondToCloseOutputFile() override
Types moduleType() const override
void callWorkerEndStream(D, StreamID)
bool wantsGlobalRuns() const noexcept final
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
void operator()(WorkerT< T > *iWorker, StreamID id)
void operator()(const T &...)
void implBeginStream(StreamID) override
void resolvePutIndicies(BranchType iBranchType, std::unordered_multimap< std::string, std::tuple< TypeID const *, const char *, edm::ProductResolverIndex >> const &iIndicies) final
bool implDoStreamBegin(StreamID, RunTransitionInfo const &, ModuleCallingContext const *) override
bool implNeedToRunSelection() const noexcept final
bool wantsStreamRuns() const noexcept final
TaskQueueAdaptor serializeRunModule() override
void operator()(WorkerT< T > *iWorker, StreamID id)
bool implDoBeginProcessBlock(ProcessBlockPrincipal const &, ModuleCallingContext const *) override
DecomposeProduct< arg, typename Div::arg > D
void implEndStream(StreamID) override
void implBeginJob() override
void implRespondToCloseInputFile(FileBlock const &fb) override
bool implDoEnd(RunTransitionInfo const &, ModuleCallingContext const *) override
void resolvePutIndicies(BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
void callWorkerBeginStream(D, StreamID)
bool wantsProcessBlocks() const noexcept final
size_t transformIndex(edm::BranchDescription const &) const noexcept final
void implDoAcquire(EventTransitionInfo const &, ModuleCallingContext const *, WaitingTaskWithArenaHolder &) final
void implRegisterThinnedAssociations(ProductRegistry const &, ThinnedAssociationsHelper &) override
bool implDoBegin(RunTransitionInfo const &, ModuleCallingContext const *) override
bool wantsInputProcessBlocks() const noexcept final
WorkerT(std::shared_ptr< T >, ModuleDescription const &, ExceptionToActionTable const *actions)
void selectInputProcessBlocks(ProductRegistry const &, ProcessBlockHelperBase const &) final
bool wantsStreamLuminosityBlocks() const noexcept final
ConcurrencyTypes moduleConcurrencyType() const override
bool implDo(EventTransitionInfo const &, ModuleCallingContext const *) override