25 #include <type_traits> 28 namespace workerimpl {
31 static bool constexpr
value =
false;
36 static bool constexpr
value =
true;
41 static bool constexpr
value =
true;
46 static bool constexpr
value =
true;
51 static bool constexpr
value =
true;
56 static bool constexpr
value =
true;
61 static bool constexpr
value =
true;
66 static bool constexpr
value =
true;
71 static bool constexpr
value =
true;
76 static bool constexpr
value =
true;
81 static bool constexpr
value =
false;
86 static bool constexpr
value =
true;
90 template <
typename...
T>
104 template <
typename T,
typename INFOTYPE>
111 template <
typename T,
typename INFOTYPE>
119 template <
typename T>
125 template <
typename T>
128 template <
typename T>
130 return module_->wantsProcessBlocks();
133 template <
typename T>
135 return module_->wantsInputProcessBlocks();
138 template <
typename T>
140 return module_->wantsGlobalRuns();
143 template <
typename T>
145 return module_->wantsGlobalLuminosityBlocks();
148 template <
typename T>
150 return module_->wantsStreamRuns();
153 template <
typename T>
155 return module_->wantsStreamLuminosityBlocks();
158 template <
typename T>
162 template <
typename T>
168 return module_->globalRunsQueue();
172 return module_->globalLuminosityBlocksQueue();
176 return module_->globalRunsQueue();
180 return module_->globalLuminosityBlocksQueue();
184 return module_->globalRunsQueue();
188 return module_->globalLuminosityBlocksQueue();
193 return module_->globalRunsQueue();
197 return module_->globalLuminosityBlocksQueue();
201 return module_->globalRunsQueue();
205 return module_->globalLuminosityBlocksQueue();
209 return module_->globalRunsQueue();
213 return module_->globalLuminosityBlocksQueue();
217 return module_->globalRunsQueue();
221 return module_->globalLuminosityBlocksQueue();
224 template <
typename T>
227 std::shared_ptr<Worker> sentry(
this, [&
ep](
Worker*
obj) {
obj->postDoEvent(
ep); });
228 return module_->doEvent(
info, activityRegistry(), mcc);
231 template <
typename T>
240 module_->doAcquire(
info, activityRegistry(), mcc, holder);
247 module_->doAcquire(
info, activityRegistry(), mcc, holder);
254 module_->doAcquire(
info, activityRegistry(), mcc, holder);
261 module_->doAcquire(
info, activityRegistry(), mcc, holder);
268 module_->doAcquire(
info, activityRegistry(), mcc, holder);
271 template <
typename T>
273 size_t iTransformIndex,
282 module_->doTransformAsync(iTask, iTransformIndex,
iEvent, activityRegistry(), &mcc, weakToken);
292 size_t iTransformIndex,
298 size_t iTransformIndex,
304 size_t iTransformIndex,
310 size_t iTransformIndex,
316 size_t iTransformIndex,
322 size_t iTransformIndex,
328 size_t iTransformIndex,
334 size_t iTransformIndex,
340 size_t iTransformIndex,
346 size_t iTransformIndex,
351 template <
typename T>
357 return module_->transformIndex_(iBranch);
361 return module_->transformIndex_(iBranch);
365 return module_->transformIndex_(iBranch);
369 return module_->transformIndex_(iBranch);
373 return module_->transformIndex_(iBranch);
377 return module_->transformIndex_(iBranch);
381 return module_->transformIndex_(iBranch);
384 template <
typename T>
390 return module_->transformPrefetch_(iTransformIndex);
394 return module_->transformPrefetch_(iTransformIndex);
398 size_t iTransformIndex)
const {
399 return module_->transformPrefetch_(iTransformIndex);
403 return module_->transformPrefetch_(iTransformIndex);
407 return module_->transformPrefetch_(iTransformIndex);
411 return module_->transformPrefetch_(iTransformIndex);
415 return module_->transformPrefetch_(iTransformIndex);
418 template <
typename T>
423 template <
typename T>
429 template <
typename T>
441 return module_->prePrefetchSelection(
id,
ep, mcc);
445 std::vector<ProductResolverIndexAndSkipBit>& iItems)
const {
446 iItems =
module_->productsUsedBySelection();
457 return module_->prePrefetchSelection(
id,
ep, mcc);
461 std::vector<ProductResolverIndexAndSkipBit>& iItems)
const {
462 iItems =
module_->productsUsedBySelection();
473 return module_->prePrefetchSelection(
id,
ep, mcc);
477 std::vector<ProductResolverIndexAndSkipBit>& iItems)
const {
478 iItems =
module_->productsUsedBySelection();
481 template <
typename T>
483 module_->doBeginProcessBlock(pbp, mcc);
487 template <
typename T>
489 module_->doAccessInputProcessBlock(pbp, mcc);
493 template <
typename T>
495 module_->doEndProcessBlock(pbp, mcc);
499 template <
typename T>
505 template <
typename T>
506 template <
typename D>
514 template <
typename T>
515 template <
typename D>
520 template <
typename T>
528 might_call(
this,
id,
info, mcc);
532 template <
typename T>
538 might_call(
this,
id,
info, mcc);
542 template <
typename T>
548 template <
typename T>
554 template <
typename T>
555 template <
typename D>
560 module_->doStreamBeginLuminosityBlock(
id,
info, mcc);
563 template <
typename T>
564 template <
typename D>
566 module_->doStreamEndLuminosityBlock(
id,
info, mcc);
569 template <
typename T>
577 might_call(
this,
id,
info, mcc);
581 template <
typename T>
589 might_call(
this,
id,
info, mcc);
594 template <
typename T>
600 template <
typename T>
605 template <
typename T>
610 template <
typename T>
615 template <
typename T>
616 template <
typename D>
621 template <
typename T>
628 might_call(
this,
id);
631 template <
typename T>
632 template <
typename D>
637 template <
typename T>
644 might_call(
this,
id);
647 template <
typename T>
649 module_->doRespondToOpenInputFile(fb);
652 template <
typename T>
654 module_->doRespondToCloseInputFile(fb);
657 template <
typename T>
659 module_->doRespondToCloseOutputFile();
662 template <
typename T>
668 template <
typename T>
674 return &(
module_->sharedResourcesAcquirer().serialQueueChain());
678 return &(
module_->sharedResourcesAcquirer().serialQueueChain());
682 return &(
module_->sharedResourcesAcquirer().serialQueueChain());
686 return &(
module_->sharedResourcesAcquirer().serialQueueChain());
690 return &(
module_->sharedResourcesAcquirer().serialQueueChain());
694 return &(
module_->sharedResourcesAcquirer().serialQueueChain());
698 return &(
module_->sharedResourcesAcquirer().serialQueueChain());
718 template <
typename T>
719 bool mustPrefetchMayGet();
722 bool mustPrefetchMayGet<EDAnalyzer>() {
726 bool mustPrefetchMayGet<EDProducer>() {
730 bool mustPrefetchMayGet<EDFilter>() {
735 bool mustPrefetchMayGet<edm::one::EDProducerBase>() {
739 bool mustPrefetchMayGet<edm::one::EDFilterBase>() {
743 bool mustPrefetchMayGet<edm::one::EDAnalyzerBase>() {
747 bool mustPrefetchMayGet<edm::one::OutputModuleBase>() {
752 bool mustPrefetchMayGet<edm::global::EDProducerBase>() {
756 bool mustPrefetchMayGet<edm::global::EDFilterBase>() {
760 bool mustPrefetchMayGet<edm::global::EDAnalyzerBase>() {
764 bool mustPrefetchMayGet<edm::global::OutputModuleBase>() {
769 bool mustPrefetchMayGet<edm::limited::EDProducerBase>() {
773 bool mustPrefetchMayGet<edm::limited::EDFilterBase>() {
777 bool mustPrefetchMayGet<edm::limited::EDAnalyzerBase>() {
781 bool mustPrefetchMayGet<edm::limited::OutputModuleBase>() {
786 bool mustPrefetchMayGet<edm::stream::EDProducerAdaptorBase>() {
790 bool mustPrefetchMayGet<edm::stream::EDFilterAdaptorBase>() {
794 bool mustPrefetchMayGet<edm::stream::EDAnalyzerAdaptorBase>() {
800 template <
typename T>
802 module_->updateLookup(iBranchType, iHelper, mustPrefetchMayGet<T>());
805 template <
typename T>
810 template <
typename T>
813 module_->selectInputProcessBlocks(productRegistry, processBlockHelperBase);
817 using ModuleToResolverIndicies =
818 std::unordered_multimap<std::string, std::tuple<edm::TypeID const*, const char*, edm::ProductResolverIndex>>;
819 void resolvePutIndiciesImpl(
void*,
821 ModuleToResolverIndicies
const& iIndicies,
826 void resolvePutIndiciesImpl(ProducerBase* iProd,
828 ModuleToResolverIndicies
const& iIndicies,
830 iProd->resolvePutIndicies(iBranchType, iIndicies, iModuleLabel);
835 ModuleToResolverIndicies
const& iIndicies,
841 ModuleToResolverIndicies
const& iIndicies,
848 template <
typename T>
851 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 implDoEndProcessBlock(ProcessBlockPrincipal const &, ModuleCallingContext const *) override
SerialTaskQueue * globalRunsQueue() final
roAction_t actions[nactions]
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 wantsStreamLuminosityBlocks() const final
bool implNeedToRunSelection() const final
bool implDoStreamEnd(StreamID, RunTransitionInfo const &, ModuleCallingContext const *) override
bool implDoPrePrefetchSelection(StreamID, EventPrincipal const &, ModuleCallingContext const *) override
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
size_t transformIndex(edm::BranchDescription const &) const final
void implRespondToOpenInputFile(FileBlock const &fb) override
void implRespondToCloseOutputFile() override
Types moduleType() const override
void doneWaiting(std::exception_ptr iExcept)
void callWorkerEndStream(D, StreamID)
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 wantsInputProcessBlocks() const final
TaskQueueAdaptor serializeRunModule() override
ServiceToken lock() const
void operator()(WorkerT< T > *iWorker, StreamID id)
bool wantsGlobalLuminosityBlocks() const final
bool implDoBeginProcessBlock(ProcessBlockPrincipal const &, ModuleCallingContext const *) override
DecomposeProduct< arg, typename Div::arg > D
void implEndStream(StreamID) override
void implDoTransformAsync(WaitingTaskHolder, size_t iTransformIndex, EventPrincipal const &, ParentContext const &, ServiceWeakToken const &) final
void implBeginJob() override
bool wantsProcessBlocks() const final
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)
void implDoAcquire(EventTransitionInfo const &, ModuleCallingContext const *, WaitingTaskWithArenaHolder &) final
ProductResolverIndex itemToGetForTransform(size_t iTransformIndex) const final
bool wantsGlobalRuns() const final
bool wantsStreamRuns() const final
void implRegisterThinnedAssociations(ProductRegistry const &, ThinnedAssociationsHelper &) override
bool implDoBegin(RunTransitionInfo const &, ModuleCallingContext const *) override
WorkerT(std::shared_ptr< T >, ModuleDescription const &, ExceptionToActionTable const *actions)
void selectInputProcessBlocks(ProductRegistry const &, ProcessBlockHelperBase const &) final
ConcurrencyTypes moduleConcurrencyType() const override
bool implDo(EventTransitionInfo const &, ModuleCallingContext const *) override