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();
232 return module_->prePrefetchSelection(
id,ep,mcc);
238 iItems =
module_->productsUsedBySelection();
252 return module_->prePrefetchSelection(
id,ep,mcc);
258 iItems =
module_->productsUsedBySelection();
271 return module_->prePrefetchSelection(
id,ep,mcc);
277 iItems =
module_->productsUsedBySelection();
290 return module_->prePrefetchSelection(
id,ep,mcc);
296 iItems =
module_->productsUsedBySelection();
303 module_->doBeginRun(rp, c, mcc);
313 module_->doStreamBeginRun(
id, rp, c, mcc);
322 module_->doStreamEndRun(
id, rp, c, mcc);
334 might_call(
this,
id,rp,c, mcc);
346 might_call(
this,
id,rp,c, mcc);
364 module_->doBeginLuminosityBlock(lbp, c, mcc);
374 module_->doStreamBeginLuminosityBlock(
id, rp, c, mcc);
383 module_->doStreamEndLuminosityBlock(
id, rp, c, mcc);
395 might_call(
this,
id,lbp,c, mcc);
407 might_call(
this,
id,lbp,c,mcc);
417 module_->doEndLuminosityBlock(lbp, c, mcc);
478 module_->doRespondToOpenInputFile(fb);
485 module_->doRespondToCloseInputFile(fb);
493 module_->doRegisterThinnedAssociations(registry, helper);
502 return &(
module_->sharedResourcesAcquirer().serialQueueChain());
505 return &(
module_->sharedResourcesAcquirer().serialQueueChain());
508 return &(
module_->sharedResourcesAcquirer().serialQueueChain());
511 return &(
module_->sharedResourcesAcquirer().serialQueueChain());
514 return &(
module_->sharedResourcesAcquirer().serialQueueChain());
517 return &(
module_->sharedResourcesAcquirer().serialQueueChain());
520 return &(
module_->sharedResourcesAcquirer().serialQueueChain());
523 return &(
module_->sharedResourcesAcquirer().serialQueueChain());
540 template <
typename T>
bool mustPrefetchMayGet();
542 template<>
bool mustPrefetchMayGet<EDAnalyzer>() {
return true;}
543 template<>
bool mustPrefetchMayGet<EDProducer>() {
return true;}
544 template<>
bool mustPrefetchMayGet<EDFilter>() {
return true;}
545 template<>
bool mustPrefetchMayGet<OutputModule>() {
return true;}
547 template<>
bool mustPrefetchMayGet<edm::one::EDProducerBase>() {
return true;}
548 template<>
bool mustPrefetchMayGet<edm::one::EDFilterBase>() {
return true;}
549 template<>
bool mustPrefetchMayGet<edm::one::EDAnalyzerBase>() {
return true;}
550 template<>
bool mustPrefetchMayGet<edm::one::OutputModuleBase>() {
return true;}
552 template<>
bool mustPrefetchMayGet<edm::global::EDProducerBase>() {
return true;}
553 template<>
bool mustPrefetchMayGet<edm::global::EDFilterBase>() {
return true;}
554 template<>
bool mustPrefetchMayGet<edm::global::EDAnalyzerBase>() {
return true;}
555 template<>
bool mustPrefetchMayGet<edm::global::OutputModuleBase>() {
return true;}
557 template<>
bool mustPrefetchMayGet<edm::limited::EDProducerBase>() {
return true;}
558 template<>
bool mustPrefetchMayGet<edm::limited::EDFilterBase>() {
return true;}
559 template<>
bool mustPrefetchMayGet<edm::limited::EDAnalyzerBase>() {
return true;}
560 template<>
bool mustPrefetchMayGet<edm::limited::OutputModuleBase>() {
return true;}
562 template<>
bool mustPrefetchMayGet<edm::stream::EDProducerAdaptorBase>() {
return true;}
563 template<>
bool mustPrefetchMayGet<edm::stream::EDFilterAdaptorBase>() {
return true;}
564 template<>
bool mustPrefetchMayGet<edm::stream::EDAnalyzerAdaptorBase>() {
return true;}
572 module_->updateLookup(iBranchType,iHelper,mustPrefetchMayGet<T>());
576 using ModuleToResolverIndicies = std::unordered_multimap<
std::string,
577 std::tuple<edm::TypeID const*, const char*, edm::ProductResolverIndex>>;
578 void resolvePutIndiciesImpl(
void*,
580 ModuleToResolverIndicies
const& iIndicies,
581 std::string
const& iModuleLabel) {
587 ModuleToResolverIndicies
const& iIndicies,
588 std::string
const& iModuleLabel) {
594 ModuleToResolverIndicies
const& iIndicies,
595 std::string
const& iModuleLabel) {
600 ModuleToResolverIndicies
const& iIndicies,
601 std::string
const& iModuleLabel) {
605 std::vector<ProductResolverIndex> s_emptyIndexList;
607 std::vector<ProductResolverIndex>
const& itemsShouldPutInEventImpl(
void const*) {
608 return s_emptyIndexList;
611 std::vector<ProductResolverIndex>
const& itemsShouldPutInEventImpl(
ProducerBase const* iProd) {
628 std::tuple<TypeID const*, const char*, edm::ProductResolverIndex>>
const& iIndicies) {
629 resolvePutIndiciesImpl(&
module(), iBranchType,iIndicies,
description().moduleLabel());
634 std::vector<ProductResolverIndex>
const&
636 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
roAction_t actions[nactions]
void callWorkerStreamEnd(D, StreamID id, RunPrincipal const &rp, EventSetup const &c, ModuleCallingContext const *mcc)
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)