1 #ifndef FWCore_Framework_stream_ProducingModuleAdaptor_h 2 #define FWCore_Framework_stream_ProducingModuleAdaptor_h 41 template <
typename T,
typename M,
typename B>
49 typename T::GlobalCache
const*
dummy =
nullptr;
51 typename T::InputProcessBlockCache
const* dummyInputProcessBlockCacheImpl =
nullptr;
62 return T::HasAbility::kWatchProcessBlock
or T::HasAbility::kBeginProcessBlockProducer
or 63 T::HasAbility::kEndProcessBlockProducer;
67 return T::HasAbility::kRunCache
or T::HasAbility::kRunSummaryCache
or T::HasAbility::kBeginRunProducer
or 68 T::HasAbility::kEndRunProducer;
73 return T::HasAbility::kLuminosityBlockCache
or T::HasAbility::kLuminosityBlockSummaryCache
or 74 T::HasAbility::kBeginLuminosityBlockProducer
or T::HasAbility::kEndLuminosityBlockProducer;
98 this->createStreamModules([
this](
unsigned int iStreamModule) -> M* {
136 if constexpr (T::HasAbility::kWatchProcessBlock
or T::HasAbility::kBeginProcessBlockProducer) {
137 ProcessBlock processBlock(pbp, this->moduleDescription(), mcc,
false);
141 if constexpr (T::HasAbility::kBeginProcessBlockProducer) {
144 this->commit(processBlock);
150 if constexpr (T::HasAbility::kInputProcessBlockCache) {
151 ProcessBlock processBlock(pbp, this->moduleDescription(), mcc,
false);
159 if constexpr (T::HasAbility::kWatchProcessBlock
or T::HasAbility::kEndProcessBlockProducer) {
160 ProcessBlock processBlock(pbp, this->moduleDescription(), mcc,
true);
164 if constexpr (T::HasAbility::kEndProcessBlockProducer) {
167 this->commit(processBlock);
173 if constexpr (T::HasAbility::kRunCache
or T::HasAbility::kRunSummaryCache
or T::HasAbility::kBeginRunProducer) {
175 Run r(rp, this->moduleDescription(), mcc,
false);
178 Run const& cnstR = r;
188 if constexpr (T::HasAbility::kBeginRunProducer) {
196 if constexpr (T::HasAbility::kRunCache
or T::HasAbility::kRunSummaryCache
or T::HasAbility::kEndRunProducer) {
198 Run r(rp, this->moduleDescription(), mcc,
true);
210 if constexpr (T::HasAbility::kEndRunProducer) {
219 if constexpr (T::HasAbility::kLuminosityBlockCache
or T::HasAbility::kLuminosityBlockSummaryCache
or 220 T::HasAbility::kBeginLuminosityBlockProducer) {
238 if constexpr (T::HasAbility::kBeginLuminosityBlockProducer) {
245 if constexpr (T::HasAbility::kLuminosityBlockCache
or T::HasAbility::kLuminosityBlockSummaryCache
or 246 T::HasAbility::kEndLuminosityBlockProducer) {
261 if constexpr (T::HasAbility::kEndLuminosityBlockProducer) {
static void endLuminosityBlock(edm::LuminosityBlock const &Lumi, edm::EventSetup const &iES, typename T::LuminosityBlockContext const *iContext)
bool wantsStreamRuns() const final
static void beginProcessBlock(edm::ProcessBlock const &iProcessBlock, typename T::GlobalCache *iGC)
static void beginRun(edm::Run const &iRun, edm::EventSetup const &iES, typename T::RunContext const *iRC, std::shared_ptr< typename T::RunSummaryCache > &oCache)
void setProducer(ProducerBase const *iProducer)
bool wantsGlobalLuminosityBlocks() const final
void doBeginProcessBlock(ProcessBlockPrincipal const &pbp, ModuleCallingContext const *mcc) final
void setConsumer(EDConsumerBase const *iConsumer)
std::unique_ptr< G > makeInputProcessBlockCacheImpl(G const *)
static void endRun(edm::Run const &iRun, edm::EventSetup const &iES, typename T::RunContext const *iContext)
impl::choose_unique_ptr< typename T::GlobalCache >::type m_global
void selectInputProcessBlocks(ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase) final
void doEndLuminosityBlock(LumiTransitionInfo const &info, ModuleCallingContext const *mcc) final
static void beginRun(edm::Run const &iRun, edm::EventSetup const &iES, typename T::GlobalCache const *iGC, std::shared_ptr< typename T::RunCache const > &oCache)
static void produce(edm::LuminosityBlock &Lumi, edm::EventSetup const &iES, typename T::LuminosityBlockContext const *iRC)
static void produce(edm::LuminosityBlock &, edm::EventSetup const &, typename T::LuminosityBlockContext const *, typename T::LuminosityBlockSummaryCache const *)
void streamEndLuminosityBlockSummary(M *iProd, edm::LuminosityBlock const &iLumi, edm::EventSetup const &iES) final
RunPrincipal const & runPrincipal() const
void doEndProcessBlock(ProcessBlockPrincipal const &pbp, ModuleCallingContext const *mcc) final
void preallocLumis(unsigned int iNLumis) final
impl::choose_mutex< typename T::LuminosityBlockSummaryCache >::type m_lumiSummaryLock
static void prevalidate(ConfigurationDescriptions &descriptions)
void streamEndRunSummary(M *iProd, edm::Run const &iRun, edm::EventSetup const &iES) final
static void streamEndRunSummary(B *iProd, edm::Run const &iRun, edm::EventSetup const &iES, typename T::RunSummaryCache *iCache)
const ProducingModuleAdaptor & operator=(const ProducingModuleAdaptor &)=delete
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
void doAccessInputProcessBlock(ProcessBlockPrincipal const &pbp, ModuleCallingContext const *mcc) final
bool hasAccumulator() const final
void doBeginRun(RunTransitionInfo const &info, ModuleCallingContext const *mcc) final
static void set(B *iProd, typename T::RunCache const *iCache)
impl::choose_mutex< typename T::RunSummaryCache >::type m_runSummaryLock
static void produce(edm::ProcessBlock &processBlock, typename T::GlobalCache *globalCache)
void setupStreamModules() final
static void beginLuminosityBlock(edm::LuminosityBlock const &Lumi, edm::EventSetup const &iES, typename T::RunContext const *iRC, std::shared_ptr< typename T::LuminosityBlockCache const > &oCache)
static void beginLuminosityBlock(edm::LuminosityBlock const &Lumi, edm::EventSetup const &iES, typename T::LuminosityBlockContext const *iRC, std::shared_ptr< typename T::LuminosityBlockSummaryCache > &oCache)
static void produce(edm::Run &iRun, edm::EventSetup const &iES, typename T::RunContext const *iRC)
ParameterSet const * m_pset
void setConsumer(EDConsumerBase const *iConsumer)
void preallocRuns(unsigned int iNRuns) final
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
impl::choose_shared_vec< typename T::RunSummaryCache >::type m_runSummaries
void doRespondToCloseOutputFile() final
std::unique_ptr< T > type
void doEndRun(RunTransitionInfo const &info, ModuleCallingContext const *mcc) final
impl::choose_shared_vec< typename T::LuminosityBlockSummaryCache >::type m_lumiSummaries
static void set(B *iProd, typename T::LuminosityBlockCache const *iCache)
void setupLuminosityBlock(M *iProd, LuminosityBlockIndex iIndex) final
void setupRun(M *iProd, RunIndex iIndex) final
bool hasAcquire() const final
impl::choose_unique_ptr< typename T::InputProcessBlockCache >::type m_inputProcessBlocks
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void setProducer(ProducerBase const *iProducer)
static void endJob(typename T::GlobalCache *iCache)
static void streamEndLuminosityBlockSummary(B *iProd, edm::LuminosityBlock const &iLumi, edm::EventSetup const &iES, typename T::LuminosityBlockSummaryCache *iCache)
bool wantsGlobalRuns() const final
static void globalEndRun(edm::Run const &iRun, edm::EventSetup const &iES, typename T::RunContext const *iContext, typename T::RunSummaryCache *iCache)
void setProducer(ProducerBase const *iProducer)
void doBeginLuminosityBlock(LumiTransitionInfo const &info, ModuleCallingContext const *mcc) final
impl::choose_shared_vec< typename T::RunCache const >::type m_runs
bool wantsProcessBlocks() const final
ProducingModuleAdaptor(edm::ParameterSet const &iPSet)
~ProducingModuleAdaptor() override
LuminosityBlockIndex index() const
static void fillDescriptions(ConfigurationDescriptions &descriptions)
static void produce(edm::Run &, edm::EventSetup const &, typename T::RunContext const *, typename T::RunSummaryCache const *)
impl::choose_shared_vec< typename T::LuminosityBlockCache const >::type m_lumis
static void beginJob(typename T::GlobalCache *iCache)
std::vector< std::shared_ptr< T > > type
bool wantsInputProcessBlocks() const final
static void globalEndLuminosityBlock(edm::LuminosityBlock const &Lumi, edm::EventSetup const &iES, typename T::LuminosityBlockContext const *iContext, typename T::LuminosityBlockSummaryCache *iCache)
bool wantsStreamLuminosityBlocks() const final
static void produce(edm::ProcessBlock &processBlock, typename T::GlobalCache *globalCache)
static void set(B *iProd, typename T::GlobalCache const *iCache)
static void endProcessBlock(edm::ProcessBlock const &iProcessBlock, typename T::GlobalCache *iGC)