26 #include <type_traits> 29 namespace workerimpl {
81 template<
typename...
T>
99 template<
typename T,
typename P>
108 template<
typename T,
typename P>
133 return module_->wantsGlobalRuns();
138 return module_->wantsGlobalLuminosityBlocks();
143 return module_->wantsStreamRuns();
148 return module_->wantsStreamLuminosityBlocks();
161 return module_->globalRunsQueue();
165 return module_->globalLuminosityBlocksQueue();
169 return module_->globalRunsQueue();
173 return module_->globalLuminosityBlocksQueue();
177 return module_->globalRunsQueue();
181 return module_->globalLuminosityBlocksQueue();
185 return module_->globalRunsQueue();
189 return module_->globalLuminosityBlocksQueue();
194 return module_->globalRunsQueue();
198 return module_->globalLuminosityBlocksQueue();
202 return module_->globalRunsQueue();
206 return module_->globalLuminosityBlocksQueue();
210 return module_->globalRunsQueue();
214 return module_->globalLuminosityBlocksQueue();
218 return module_->globalRunsQueue();
222 return module_->globalLuminosityBlocksQueue();
307 return module_->prePrefetchSelection(
id,ep,mcc);
313 iItems =
module_->productsUsedBySelection();
327 return module_->prePrefetchSelection(
id,ep,mcc);
333 iItems =
module_->productsUsedBySelection();
346 return module_->prePrefetchSelection(
id,ep,mcc);
352 iItems =
module_->productsUsedBySelection();
365 return module_->prePrefetchSelection(
id,ep,mcc);
371 iItems =
module_->productsUsedBySelection();
378 module_->doBeginRun(rp, c, mcc);
388 module_->doStreamBeginRun(
id, rp, c, mcc);
397 module_->doStreamEndRun(
id, rp, c, mcc);
409 might_call(
this,
id,rp,c, mcc);
421 might_call(
this,
id,rp,c, mcc);
439 module_->doBeginLuminosityBlock(lbp, c, mcc);
449 module_->doStreamBeginLuminosityBlock(
id, rp, c, mcc);
458 module_->doStreamEndLuminosityBlock(
id, rp, c, mcc);
470 might_call(
this,
id,lbp,c, mcc);
482 might_call(
this,
id,lbp,c,mcc);
492 module_->doEndLuminosityBlock(lbp, c, mcc);
553 module_->doRespondToOpenInputFile(fb);
560 module_->doRespondToCloseInputFile(fb);
568 module_->doRegisterThinnedAssociations(registry, helper);
577 return &(
module_->sharedResourcesAcquirer().serialQueueChain());
580 return &(
module_->sharedResourcesAcquirer().serialQueueChain());
583 return &(
module_->sharedResourcesAcquirer().serialQueueChain());
586 return &(
module_->sharedResourcesAcquirer().serialQueueChain());
589 return &(
module_->sharedResourcesAcquirer().serialQueueChain());
592 return &(
module_->sharedResourcesAcquirer().serialQueueChain());
595 return &(
module_->sharedResourcesAcquirer().serialQueueChain());
598 return &(
module_->sharedResourcesAcquirer().serialQueueChain());
615 template <
typename T>
bool mustPrefetchMayGet();
617 template<>
bool mustPrefetchMayGet<EDAnalyzer>() {
return true;}
618 template<>
bool mustPrefetchMayGet<EDProducer>() {
return true;}
619 template<>
bool mustPrefetchMayGet<EDFilter>() {
return true;}
620 template<>
bool mustPrefetchMayGet<OutputModule>() {
return true;}
622 template<>
bool mustPrefetchMayGet<edm::one::EDProducerBase>() {
return true;}
623 template<>
bool mustPrefetchMayGet<edm::one::EDFilterBase>() {
return true;}
624 template<>
bool mustPrefetchMayGet<edm::one::EDAnalyzerBase>() {
return true;}
625 template<>
bool mustPrefetchMayGet<edm::one::OutputModuleBase>() {
return true;}
627 template<>
bool mustPrefetchMayGet<edm::global::EDProducerBase>() {
return true;}
628 template<>
bool mustPrefetchMayGet<edm::global::EDFilterBase>() {
return true;}
629 template<>
bool mustPrefetchMayGet<edm::global::EDAnalyzerBase>() {
return true;}
630 template<>
bool mustPrefetchMayGet<edm::global::OutputModuleBase>() {
return true;}
632 template<>
bool mustPrefetchMayGet<edm::limited::EDProducerBase>() {
return true;}
633 template<>
bool mustPrefetchMayGet<edm::limited::EDFilterBase>() {
return true;}
634 template<>
bool mustPrefetchMayGet<edm::limited::EDAnalyzerBase>() {
return true;}
635 template<>
bool mustPrefetchMayGet<edm::limited::OutputModuleBase>() {
return true;}
637 template<>
bool mustPrefetchMayGet<edm::stream::EDProducerAdaptorBase>() {
return true;}
638 template<>
bool mustPrefetchMayGet<edm::stream::EDFilterAdaptorBase>() {
return true;}
639 template<>
bool mustPrefetchMayGet<edm::stream::EDAnalyzerAdaptorBase>() {
return true;}
647 module_->updateLookup(iBranchType,iHelper,mustPrefetchMayGet<T>());
651 using ModuleToResolverIndicies = std::unordered_multimap<
std::string,
652 std::tuple<edm::TypeID const*, const char*, edm::ProductResolverIndex>>;
653 void resolvePutIndiciesImpl(
void*,
655 ModuleToResolverIndicies
const& iIndicies,
656 std::string
const& iModuleLabel) {
662 ModuleToResolverIndicies
const& iIndicies,
663 std::string
const& iModuleLabel) {
669 ModuleToResolverIndicies
const& iIndicies,
670 std::string
const& iModuleLabel) {
675 ModuleToResolverIndicies
const& iIndicies,
676 std::string
const& iModuleLabel) {
680 std::vector<ProductResolverIndex> s_emptyIndexList;
682 std::vector<ProductResolverIndex>
const& itemsShouldPutInEventImpl(
void const*) {
683 return s_emptyIndexList;
686 std::vector<ProductResolverIndex>
const& itemsShouldPutInEventImpl(
ProducerBase const* iProd) {
703 std::tuple<TypeID const*, const char*, edm::ProductResolverIndex>>
const& iIndicies) {
704 resolvePutIndiciesImpl(&
module(), iBranchType,iIndicies,
description().moduleLabel());
709 std::vector<ProductResolverIndex>
const&
711 return itemsShouldPutInEventImpl(&
module());
bool implDoStreamEnd(StreamID id, RunPrincipal const &rp, EventSetup const &c, ModuleCallingContext const *mcc) override
static const char module_[]
bool wantsStreamLuminosityBlocks() const final
ModuleDescription const & description() const
SerialTaskQueue * globalRunsQueue() final
roAction_t actions[nactions]
void callWorkerStreamEnd(D, StreamID id, RunPrincipal const &rp, EventSetup const &c, ModuleCallingContext const *mcc)
SerialTaskQueue * globalLuminosityBlocksQueue() final
void implEndJob() override
bool wantsGlobalRuns() const final
void updateLookup(BranchType iBranchType, ProductResolverIndexHelper const &) override
bool implDoStreamBegin(StreamID id, RunPrincipal const &rp, EventSetup const &c, ModuleCallingContext const *mcc) override
ActivityRegistry * activityRegistry()
bool implDo(EventPrincipal const &ep, EventSetup const &c, ModuleCallingContext const *mcc) override
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 implRespondToOpenInputFile(FileBlock const &fb) override
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
TaskQueueAdaptor serializeRunModule() override
void resolvePutIndicies(BranchType iBranchType, std::unordered_multimap< std::string, std::tuple< TypeID const *, const char *, edm::ProductResolverIndex >> const &iIndicies) override
void operator()(WorkerT< T > *iWorker, StreamID id)
void callWorkerStreamBegin(D, StreamID id, RunPrincipal const &rp, EventSetup const &c, ModuleCallingContext const *mcc)
bool implDoBegin(RunPrincipal const &rp, EventSetup const &c, ModuleCallingContext const *mcc) override
std::vector< ProductResolverIndex > const & itemsShouldPutInEvent() const override
DecomposeProduct< arg, typename Div::arg > D
bool implNeedToRunSelection() const 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 implDoAcquire(EventPrincipal const &ep, EventSetup const &c, ModuleCallingContext const *mcc, WaitingTaskWithArenaHolder &holder) final
void itemsToGetForSelection(std::vector< ProductResolverIndexAndSkipBit > &) const final
void postDoEvent(EventPrincipal const &)
void implRegisterThinnedAssociations(ProductRegistry const &, ThinnedAssociationsHelper &) override
bool implDoEnd(RunPrincipal const &rp, EventSetup const &c, ModuleCallingContext const *mcc) override
bool wantsStreamRuns() const final
std::string workerType() const override
WorkerT(std::shared_ptr< T >, ModuleDescription const &, ExceptionToActionTable const *actions)