26 #include <type_traits> 29 namespace workerimpl {
81 template <
typename...
T>
95 template <
typename T,
typename P>
103 template <
typename T,
typename P>
112 template <
typename T>
118 template <
typename T>
121 template <
typename T>
123 return module_->wantsGlobalRuns();
126 template <
typename T>
128 return module_->wantsGlobalLuminosityBlocks();
131 template <
typename T>
133 return module_->wantsStreamRuns();
136 template <
typename T>
138 return module_->wantsStreamLuminosityBlocks();
141 template <
typename T>
145 template <
typename T>
151 return module_->globalRunsQueue();
155 return module_->globalLuminosityBlocksQueue();
159 return module_->globalRunsQueue();
163 return module_->globalLuminosityBlocksQueue();
167 return module_->globalRunsQueue();
171 return module_->globalLuminosityBlocksQueue();
175 return module_->globalRunsQueue();
179 return module_->globalLuminosityBlocksQueue();
184 return module_->globalRunsQueue();
188 return module_->globalLuminosityBlocksQueue();
192 return module_->globalRunsQueue();
196 return module_->globalLuminosityBlocksQueue();
200 return module_->globalRunsQueue();
204 return module_->globalLuminosityBlocksQueue();
208 return module_->globalRunsQueue();
212 return module_->globalLuminosityBlocksQueue();
215 template <
typename T>
221 template <
typename T>
259 template <
typename T>
264 template <
typename T>
270 template <
typename T>
281 return module_->prePrefetchSelection(
id, ep, mcc);
285 iItems =
module_->productsUsedBySelection();
297 return module_->prePrefetchSelection(
id, ep, mcc);
301 std::vector<ProductResolverIndexAndSkipBit>& iItems)
const {
302 iItems =
module_->productsUsedBySelection();
313 return module_->prePrefetchSelection(
id, ep, mcc);
317 std::vector<ProductResolverIndexAndSkipBit>& iItems)
const {
318 iItems =
module_->productsUsedBySelection();
329 return module_->prePrefetchSelection(
id, ep, mcc);
333 std::vector<ProductResolverIndexAndSkipBit>& iItems)
const {
334 iItems =
module_->productsUsedBySelection();
337 template <
typename T>
341 module_->doBeginRun(rp, c, mcc);
345 template <
typename T>
346 template <
typename D>
349 module_->doStreamBeginRun(
id, rp, c, mcc);
352 template <
typename T>
353 template <
typename D>
356 module_->doStreamEndRun(
id, rp, c, mcc);
359 template <
typename T>
368 might_call(
this,
id, rp, c, mcc);
372 template <
typename T>
381 might_call(
this,
id, rp, c, mcc);
385 template <
typename T>
391 template <
typename T>
395 module_->doBeginLuminosityBlock(lbp, c, mcc);
399 template <
typename T>
400 template <
typename D>
403 module_->doStreamBeginLuminosityBlock(
id, rp, c, mcc);
406 template <
typename T>
407 template <
typename D>
410 module_->doStreamEndLuminosityBlock(
id, rp, c, mcc);
413 template <
typename T>
422 might_call(
this,
id, lbp, c, mcc);
426 template <
typename T>
435 might_call(
this,
id, lbp, c, mcc);
440 template <
typename T>
444 module_->doEndLuminosityBlock(lbp, c, mcc);
448 template <
typename T>
453 template <
typename T>
458 template <
typename T>
463 template <
typename T>
464 template <
typename D>
469 template <
typename T>
473 might_call(
this,
id);
476 template <
typename T>
477 template <
typename D>
482 template <
typename T>
486 might_call(
this,
id);
489 template <
typename T>
491 module_->doRespondToOpenInputFile(fb);
494 template <
typename T>
496 module_->doRespondToCloseInputFile(fb);
499 template <
typename T>
502 module_->doRegisterThinnedAssociations(registry, helper);
505 template <
typename T>
511 return &(
module_->sharedResourcesAcquirer().serialQueueChain());
515 return &(
module_->sharedResourcesAcquirer().serialQueueChain());
519 return &(
module_->sharedResourcesAcquirer().serialQueueChain());
523 return &(
module_->sharedResourcesAcquirer().serialQueueChain());
527 return &(
module_->sharedResourcesAcquirer().serialQueueChain());
531 return &(
module_->sharedResourcesAcquirer().serialQueueChain());
535 return &(
module_->sharedResourcesAcquirer().serialQueueChain());
539 return &(
module_->sharedResourcesAcquirer().serialQueueChain());
559 template <
typename T>
560 bool mustPrefetchMayGet();
563 bool mustPrefetchMayGet<EDAnalyzer>() {
567 bool mustPrefetchMayGet<EDProducer>() {
571 bool mustPrefetchMayGet<EDFilter>() {
575 bool mustPrefetchMayGet<OutputModule>() {
580 bool mustPrefetchMayGet<edm::one::EDProducerBase>() {
584 bool mustPrefetchMayGet<edm::one::EDFilterBase>() {
588 bool mustPrefetchMayGet<edm::one::EDAnalyzerBase>() {
592 bool mustPrefetchMayGet<edm::one::OutputModuleBase>() {
597 bool mustPrefetchMayGet<edm::global::EDProducerBase>() {
601 bool mustPrefetchMayGet<edm::global::EDFilterBase>() {
605 bool mustPrefetchMayGet<edm::global::EDAnalyzerBase>() {
609 bool mustPrefetchMayGet<edm::global::OutputModuleBase>() {
614 bool mustPrefetchMayGet<edm::limited::EDProducerBase>() {
618 bool mustPrefetchMayGet<edm::limited::EDFilterBase>() {
622 bool mustPrefetchMayGet<edm::limited::EDAnalyzerBase>() {
626 bool mustPrefetchMayGet<edm::limited::OutputModuleBase>() {
631 bool mustPrefetchMayGet<edm::stream::EDProducerAdaptorBase>() {
635 bool mustPrefetchMayGet<edm::stream::EDFilterAdaptorBase>() {
639 bool mustPrefetchMayGet<edm::stream::EDAnalyzerAdaptorBase>() {
645 template <
typename T>
647 module_->updateLookup(iBranchType, iHelper, mustPrefetchMayGet<T>());
650 template <
typename T>
656 using ModuleToResolverIndicies =
657 std::unordered_multimap<std::string, std::tuple<edm::TypeID const*, const char*, edm::ProductResolverIndex>>;
658 void resolvePutIndiciesImpl(
void*,
660 ModuleToResolverIndicies
const& iIndicies,
667 ModuleToResolverIndicies
const& iIndicies,
674 ModuleToResolverIndicies
const& iIndicies,
680 ModuleToResolverIndicies
const& iIndicies,
685 std::vector<ProductResolverIndex> s_emptyIndexList;
687 std::vector<ProductResolverIndex>
const& itemsShouldPutInEventImpl(
void const*) {
return s_emptyIndexList; }
689 std::vector<ProductResolverIndex>
const& itemsShouldPutInEventImpl(
ProducerBase const* iProd) {
703 template <
typename T>
706 std::unordered_multimap<
std::string, std::tuple<TypeID const*, const char*, edm::ProductResolverIndex>>
const&
708 resolvePutIndiciesImpl(&
module(), iBranchType, iIndicies,
description().moduleLabel());
711 template <
typename T>
713 return itemsShouldPutInEventImpl(&
module());
void updateLookup(BranchType iBranchType, ProductResolverIndexHelper const &) final
static const char module_[]
bool wantsStreamLuminosityBlocks() const final
bool implDoEnd(RunPrincipal const &rp, EventSetupImpl const &c, ModuleCallingContext const *mcc) override
ModuleDescription const & description() const
SerialTaskQueue * globalRunsQueue() final
roAction_t actions[nactions]
bool implDoBegin(RunPrincipal const &rp, EventSetupImpl const &c, ModuleCallingContext const *mcc) override
void operator()(WorkerT< T > *iWorker, StreamID id, P const &rp, EventSetupImpl const &c, ModuleCallingContext const *mcc)
SerialTaskQueue * globalLuminosityBlocksQueue() final
void implEndJob() override
bool wantsGlobalRuns() const final
bool implDoStreamEnd(StreamID id, RunPrincipal const &rp, EventSetupImpl const &c, ModuleCallingContext const *mcc) override
ActivityRegistry * activityRegistry()
Types moduleType() const override
void resolvePutIndicies(BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
edm::propagate_const< std::shared_ptr< T > > module_
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts(BranchType iBranchType) const
void operator()(WorkerT< T > *iWorker, StreamID id, P const &rp, EventSetupImpl const &c, ModuleCallingContext const *mcc)
void callWorkerStreamBegin(D, StreamID id, RunPrincipal const &rp, EventSetupImpl const &c, ModuleCallingContext const *mcc)
void implRespondToOpenInputFile(FileBlock const &fb) override
bool implDoStreamBegin(StreamID id, RunPrincipal const &rp, EventSetupImpl const &c, ModuleCallingContext const *mcc) override
void callWorkerStreamEnd(D, StreamID id, RunPrincipal const &rp, EventSetupImpl const &c, ModuleCallingContext const *mcc)
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts(BranchType iBranchType) const
bool implDoPrePrefetchSelection(StreamID id, EventPrincipal const &ep, ModuleCallingContext const *mcc) override
bool wantsGlobalLuminosityBlocks() const final
void callWorkerEndStream(D, StreamID)
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
TaskQueueAdaptor serializeRunModule() override
void operator()(WorkerT< T > *iWorker, StreamID id)
std::vector< ProductResolverIndex > const & itemsShouldPutInEvent() const override
DecomposeProduct< arg, typename Div::arg > D
bool implNeedToRunSelection() const final
void implDoAcquire(EventPrincipal const &ep, EventSetupImpl const &c, ModuleCallingContext const *mcc, WaitingTaskWithArenaHolder &holder) final
void implEndStream(StreamID) override
void implBeginJob() override
void implRespondToCloseInputFile(FileBlock const &fb) override
std::pair< OmniClusterRef, TrackingParticleRef > P
void resolvePutIndicies(BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
void callWorkerBeginStream(D, StreamID)
void itemsToGetForSelection(std::vector< ProductResolverIndexAndSkipBit > &) const final
bool implDo(EventPrincipal const &ep, EventSetupImpl const &c, ModuleCallingContext const *mcc) override
void postDoEvent(EventPrincipal const &)
void implRegisterThinnedAssociations(ProductRegistry const &, ThinnedAssociationsHelper &) override
bool wantsStreamRuns() const final
std::string workerType() const override
WorkerT(std::shared_ptr< T >, ModuleDescription const &, ExceptionToActionTable const *actions)