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>
276 template <
typename T>
282 template <
typename T>
294 return module_->prePrefetchSelection(
id,
ep, mcc);
298 std::vector<ProductResolverIndexAndSkipBit>& iItems)
const {
299 iItems =
module_->productsUsedBySelection();
310 return module_->prePrefetchSelection(
id,
ep, mcc);
314 std::vector<ProductResolverIndexAndSkipBit>& iItems)
const {
315 iItems =
module_->productsUsedBySelection();
326 return module_->prePrefetchSelection(
id,
ep, mcc);
330 std::vector<ProductResolverIndexAndSkipBit>& iItems)
const {
331 iItems =
module_->productsUsedBySelection();
334 template <
typename T>
336 module_->doBeginProcessBlock(pbp, mcc);
340 template <
typename T>
342 module_->doAccessInputProcessBlock(pbp, mcc);
346 template <
typename T>
348 module_->doEndProcessBlock(pbp, mcc);
352 template <
typename T>
358 template <
typename T>
359 template <
typename D>
367 template <
typename T>
368 template <
typename D>
373 template <
typename T>
381 might_call(
this,
id,
info, mcc);
385 template <
typename T>
391 might_call(
this,
id,
info, mcc);
395 template <
typename T>
401 template <
typename T>
407 template <
typename T>
408 template <
typename D>
413 module_->doStreamBeginLuminosityBlock(
id,
info, mcc);
416 template <
typename T>
417 template <
typename D>
419 module_->doStreamEndLuminosityBlock(
id,
info, mcc);
422 template <
typename T>
430 might_call(
this,
id,
info, mcc);
434 template <
typename T>
442 might_call(
this,
id,
info, mcc);
447 template <
typename T>
453 template <
typename T>
458 template <
typename T>
463 template <
typename T>
468 template <
typename T>
469 template <
typename D>
474 template <
typename T>
481 might_call(
this,
id);
484 template <
typename T>
485 template <
typename D>
490 template <
typename T>
497 might_call(
this,
id);
500 template <
typename T>
502 module_->doRespondToOpenInputFile(fb);
505 template <
typename T>
507 module_->doRespondToCloseInputFile(fb);
510 template <
typename T>
512 module_->doRespondToCloseOutputFile();
515 template <
typename T>
521 template <
typename T>
527 return &(
module_->sharedResourcesAcquirer().serialQueueChain());
531 return &(
module_->sharedResourcesAcquirer().serialQueueChain());
535 return &(
module_->sharedResourcesAcquirer().serialQueueChain());
539 return &(
module_->sharedResourcesAcquirer().serialQueueChain());
543 return &(
module_->sharedResourcesAcquirer().serialQueueChain());
547 return &(
module_->sharedResourcesAcquirer().serialQueueChain());
551 return &(
module_->sharedResourcesAcquirer().serialQueueChain());
571 template <
typename T>
572 bool mustPrefetchMayGet();
575 bool mustPrefetchMayGet<EDAnalyzer>() {
579 bool mustPrefetchMayGet<EDProducer>() {
583 bool mustPrefetchMayGet<EDFilter>() {
588 bool mustPrefetchMayGet<edm::one::EDProducerBase>() {
592 bool mustPrefetchMayGet<edm::one::EDFilterBase>() {
596 bool mustPrefetchMayGet<edm::one::EDAnalyzerBase>() {
600 bool mustPrefetchMayGet<edm::one::OutputModuleBase>() {
605 bool mustPrefetchMayGet<edm::global::EDProducerBase>() {
609 bool mustPrefetchMayGet<edm::global::EDFilterBase>() {
613 bool mustPrefetchMayGet<edm::global::EDAnalyzerBase>() {
617 bool mustPrefetchMayGet<edm::global::OutputModuleBase>() {
622 bool mustPrefetchMayGet<edm::limited::EDProducerBase>() {
626 bool mustPrefetchMayGet<edm::limited::EDFilterBase>() {
630 bool mustPrefetchMayGet<edm::limited::EDAnalyzerBase>() {
634 bool mustPrefetchMayGet<edm::limited::OutputModuleBase>() {
639 bool mustPrefetchMayGet<edm::stream::EDProducerAdaptorBase>() {
643 bool mustPrefetchMayGet<edm::stream::EDFilterAdaptorBase>() {
647 bool mustPrefetchMayGet<edm::stream::EDAnalyzerAdaptorBase>() {
653 template <
typename T>
655 module_->updateLookup(iBranchType, iHelper, mustPrefetchMayGet<T>());
658 template <
typename T>
663 template <
typename T>
666 module_->selectInputProcessBlocks(productRegistry, processBlockHelperBase);
670 using ModuleToResolverIndicies =
671 std::unordered_multimap<std::string, std::tuple<edm::TypeID const*, const char*, edm::ProductResolverIndex>>;
672 void resolvePutIndiciesImpl(
void*,
674 ModuleToResolverIndicies
const& iIndicies,
679 void resolvePutIndiciesImpl(ProducerBase* iProd,
681 ModuleToResolverIndicies
const& iIndicies,
683 iProd->resolvePutIndicies(iBranchType, iIndicies, iModuleLabel);
688 ModuleToResolverIndicies
const& iIndicies,
694 ModuleToResolverIndicies
const& iIndicies,
699 std::vector<ProductResolverIndex> s_emptyIndexList;
701 std::vector<ProductResolverIndex>
const& itemsShouldPutInEventImpl(
void const*) {
return s_emptyIndexList; }
703 std::vector<ProductResolverIndex>
const& itemsShouldPutInEventImpl(ProducerBase
const* iProd) {
717 template <
typename T>
720 std::unordered_multimap<
std::string, std::tuple<TypeID const*, const char*, edm::ProductResolverIndex>>
const&
725 template <
typename T>
727 return itemsShouldPutInEventImpl(&
module());
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]
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
void implRespondToOpenInputFile(FileBlock const &fb) override
void implRespondToCloseOutputFile() override
Types moduleType() const override
void callWorkerEndStream(D, StreamID)
std::vector< ProductResolverIndex > const & itemsShouldPutInEvent() const override
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
void operator()(WorkerT< T > *iWorker, StreamID id)
bool wantsGlobalLuminosityBlocks() const final
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts(BranchType iBranchType) const
bool implDoBeginProcessBlock(ProcessBlockPrincipal const &, ModuleCallingContext const *) override
DecomposeProduct< arg, typename Div::arg > D
void implEndStream(StreamID) override
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
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