1 #ifndef FWCore_Framework_stream_callAbilities_h
2 #define FWCore_Framework_stream_callAbilities_h
23 #include <type_traits>
41 namespace callGlobalDetail {
42 template <
typename,
typename = std::
void_t<>>
48 template <
typename T,
bool>
51 static void set(
B* iProd,
typename T::GlobalCache
const* iCache) {
52 static_cast<T*
>(iProd)->setGlobalCache(iCache);
54 static void beginJob(
typename T::GlobalCache* iCache) {
56 T::globalBeginJob(iCache);
59 static void endJob(
typename T::GlobalCache* iCache) { T::globalEndJob(iCache); }
63 static void set(
void* iProd,
void const* iCache) {}
74 template <
typename T,
bool,
bool>
78 unsigned int iStreamModule) {
79 iProd->setProcessBlockCache(iCaches->get());
80 if (iStreamModule == 0 && iProd->cacheFillersRegistered()) {
81 (*iCaches)->moveProcessBlockCacheFiller(iProd->tokenInfos(), iProd->cacheFillers());
83 iProd->clearRegistration();
91 iCaches->selectInputProcessBlocks(productRegistry, processBlockHelperBase, edConsumerBase);
96 typename T::GlobalCache* iGC,
98 iCaches->accessInputProcessBlock(processBlock);
99 T::accessInputProcessBlock(processBlock, iGC);
103 iCaches->clearCaches();
107 template <
typename T>
111 unsigned int iStreamModule) {
112 iProd->setProcessBlockCache(iCaches->get());
113 if (iStreamModule == 0 && iProd->cacheFillersRegistered()) {
114 (*iCaches)->moveProcessBlockCacheFiller(iProd->tokenInfos(), iProd->cacheFillers());
116 iProd->clearRegistration();
124 iCaches->selectInputProcessBlocks(productRegistry, processBlockHelperBase, edConsumerBase);
129 typename T::GlobalCache*,
131 iCaches->accessInputProcessBlock(processBlock);
132 T::accessInputProcessBlock(processBlock);
136 iCaches->clearCaches();
140 template <
typename T>
142 static void set(
void*,
void const*,
unsigned int) {}
150 typename T::GlobalCache*,
156 template <
typename T>
158 static void set(
void*,
void const*,
unsigned int) {}
165 typename T::GlobalCache*,
171 template <
typename T>
178 template <
typename T,
bool>
182 typename T::GlobalCache
const* iGC,
183 std::shared_ptr<typename T::RunCache const>& oCache) {
184 oCache = T::globalBeginRun(iRun, iES, iGC);
187 template <
typename B>
188 static void set(
B* iProd,
typename T::RunCache
const* iCache) {
189 static_cast<T*
>(iProd)->setRunCache(iCache);
193 T::globalEndRun(iRun, iES, iContext);
197 template <
typename T>
200 static void set(
void* iProd,
typename T::RunCache
const* iCache) {}
204 template <
typename T>
210 template <
typename T,
bool>
214 typename T::RunContext
const* iRC,
215 std::shared_ptr<typename T::RunSummaryCache>& oCache) {
216 oCache = T::globalBeginRunSummary(iRun, iES, iRC);
218 template <
typename B>
222 typename T::RunSummaryCache* iCache) {
223 static_cast<T*
>(iProd)->endRunSummary(iRun, iES, iCache);
228 typename T::RunContext
const* iContext,
229 typename T::RunSummaryCache* iCache) {
230 T::globalEndRunSummary(iRun, iES, iContext, iCache);
234 template <
typename T>
240 typename T::RunSummaryCache
const* iCache) {}
243 typename T::RunContext
const*,
244 typename T::RunSummaryCache*) {}
247 template <
typename T>
253 template <
typename T,
bool>
257 typename T::RunContext
const* iRC,
258 std::shared_ptr<typename T::LuminosityBlockCache const>& oCache) {
259 oCache = T::globalBeginLuminosityBlock(Lumi, iES, iRC);
262 template <
typename B>
263 static void set(
B* iProd,
typename T::LuminosityBlockCache
const* iCache) {
264 static_cast<T*
>(iProd)->setLuminosityBlockCache(iCache);
269 typename T::LuminosityBlockContext
const* iContext) {
270 T::globalEndLuminosityBlock(Lumi, iES, iContext);
274 template <
typename T>
278 typename T::RunContext
const*,
280 static void set(
void* iProd,
typename T::LuminosityBlockCache
const* iCache) {}
283 typename T::LuminosityBlockContext
const*) {}
285 template <
typename T>
291 template <
typename T,
bool>
295 typename T::LuminosityBlockContext
const* iRC,
296 std::shared_ptr<typename T::LuminosityBlockSummaryCache>& oCache) {
297 oCache = T::globalBeginLuminosityBlockSummary(Lumi, iES, iRC);
299 template <
typename B>
303 typename T::LuminosityBlockSummaryCache* iCache) {
304 static_cast<T*
>(iProd)->endLuminosityBlockSummary(iLumi, iES, iCache);
309 typename T::LuminosityBlockContext
const* iContext,
310 typename T::LuminosityBlockSummaryCache* iCache) {
311 T::globalEndLuminosityBlockSummary(Lumi, iES, iContext, iCache);
315 template <
typename T>
319 typename T::LuminosityBlockContext
const*,
324 typename T::LuminosityBlockSummaryCache* iCache) {}
327 typename T::LuminosityBlockContext
const*,
328 typename T::LuminosityBlockSummaryCache*) {}
331 template <
typename T>
338 template <
typename T,
bool,
bool>
341 T::beginProcessBlock(iProcessBlock, iGC);
345 T::endProcessBlock(iProcessBlock, iGC);
349 template <
typename T>
352 T::beginProcessBlock(processBlock);
356 T::endProcessBlock(processBlock);
360 template <
typename T>
366 template <
typename T>
372 template <
typename T>
379 template <
typename T,
bool,
bool>
382 T::beginProcessBlockProduce(processBlock, globalCache);
386 template <
typename T>
389 T::beginProcessBlockProduce(processBlock);
393 template <
typename T>
398 template <
typename T>
403 template <
typename T>
410 template <
typename T,
bool,
bool>
413 T::endProcessBlockProduce(processBlock, globalCache);
417 template <
typename T>
420 T::endProcessBlockProduce(processBlock);
424 template <
typename T>
429 template <
typename T>
434 template <
typename T>
441 template <
typename T,
bool>
444 T::globalBeginRunProduce(iRun, iES, iRC);
448 template <
typename T>
453 template <
typename T>
459 template <
typename T,
bool bProduce,
bool bSummary>
463 typename T::RunContext
const*,
464 typename T::RunSummaryCache
const*) {}
467 template <
typename T>
471 typename T::RunContext
const* iRC,
472 typename T::RunSummaryCache
const*) {
473 T::globalEndRunProduce(iRun, iES, iRC);
477 template <
typename T>
481 typename T::RunContext
const* iRC,
482 typename T::RunSummaryCache
const* iRS) {
483 T::globalEndRunProduce(iRun, iES, iRC, iRS);
487 template <
typename T>
493 template <
typename T,
bool>
497 typename T::LuminosityBlockContext
const* iRC) {
498 T::globalBeginLuminosityBlockProduce(Lumi, iES, iRC);
502 template <
typename T>
506 typename T::LuminosityBlockContext
const* iRC) {}
509 template <
typename T>
516 template <
typename T,
bool bProduce,
bool bSummary>
520 typename T::LuminosityBlockContext
const*,
521 typename T::LuminosityBlockSummaryCache
const*) {}
524 template <
typename T>
528 typename T::LuminosityBlockContext
const* iRC,
529 typename T::LuminosityBlockSummaryCache
const*) {
530 T::globalEndLuminosityBlockProduce(Lumi, iES, iRC);
534 template <
typename T>
538 typename T::LuminosityBlockContext
const* iRC,
539 typename T::LuminosityBlockSummaryCache
const* iRS) {
540 T::globalEndLuminosityBlockProduce(Lumi, iES, iRC, iRS);
544 template <
typename T>
546 CallEndLuminosityBlockProduceImpl<
T,
547 T::HasAbility::kEndLuminosityBlockProducer,
static void endLuminosityBlock(edm::LuminosityBlock const &Lumi, edm::EventSetup const &iES, typename T::LuminosityBlockContext const *iContext)
static void produce(edm::LuminosityBlock &Lumi, edm::EventSetup const &iES, typename T::LuminosityBlockContext const *iRC)
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)
static void globalEndLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &, typename T::LuminosityBlockContext const *, typename T::LuminosityBlockSummaryCache *)
static void endProcessBlock(edm::ProcessBlock const &, typename T::GlobalCache *)
static void endRun(edm::Run const &iRun, edm::EventSetup const &iES, typename T::RunContext const *iContext)
static void set(void *iProd, typename T::LuminosityBlockCache const *iCache)
CallBeginLuminosityBlockProduceImpl< T, T::HasAbility::kBeginLuminosityBlockProducer > CallBeginLuminosityBlockProduce
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 *)
static void produce(edm::ProcessBlock &, typename T::GlobalCache *)
static void produce(edm::ProcessBlock &, typename T::GlobalCache *)
static void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &, typename T::LuminosityBlockContext const *, impl::dummy_ptr)
static void endProcessBlock(edm::ProcessBlock const &processBlock, typename T::GlobalCache *)
static void endProcessBlock(edm::ProcessBlock const &, typename T::GlobalCache *)
static void set(void *iProd, typename T::RunCache const *iCache)
CallWatchProcessBlockImpl< T, T::HasAbility::kWatchProcessBlock, T::HasAbility::kGlobalCache > CallWatchProcessBlock
static void streamEndRunSummary(B *iProd, edm::Run const &iRun, edm::EventSetup const &iES, typename T::RunSummaryCache *iCache)
static void set(void *iProd, void const *iCache)
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
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::Run &iRun, edm::EventSetup const &iES, typename T::RunContext const *iRC)
static void set(B *iProd, typename T::RunCache const *iCache)
static void produce(edm::ProcessBlock &processBlock, typename T::GlobalCache *globalCache)
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)
static void globalEndRun(edm::Run const &, edm::EventSetup const &, typename T::RunContext const *, typename T::RunSummaryCache *)
static void beginRun(edm::Run const &, edm::EventSetup const &, typename T::GlobalCache const *, impl::dummy_ptr)
static void endLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &, typename T::LuminosityBlockContext const *)
static void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &, typename T::RunContext const *, impl::dummy_ptr)
static void beginRun(edm::Run const &, edm::EventSetup const &, typename T::RunContext const *, impl::dummy_ptr)
static void produce(edm::ProcessBlock &, typename T::GlobalCache *)
static void beginProcessBlock(edm::ProcessBlock const &, typename T::GlobalCache *)
static void produce(edm::Run &iRun, edm::EventSetup const &iES, typename T::RunContext const *iRC, typename T::RunSummaryCache const *iRS)
std::unique_ptr< T > type
CallBeginProcessBlockProduceImpl< T, T::HasAbility::kBeginProcessBlockProducer, T::HasAbility::kGlobalCache > CallBeginProcessBlockProduce
static void streamEndRunSummary(void *iProd, edm::Run const &, edm::EventSetup const &, typename T::RunSummaryCache const *iCache)
static const std::string B
static void set(B *iProd, typename T::LuminosityBlockCache const *iCache)
CallInputProcessBlockImpl< T, T::HasAbility::kInputProcessBlockCache, T::HasAbility::kGlobalCache > CallInputProcessBlock
static void endJob(typename T::GlobalCache *iCache)
static void produce(edm::LuminosityBlock &Lumi, edm::EventSetup const &iES, typename T::LuminosityBlockContext const *iRC, typename T::LuminosityBlockSummaryCache const *iRS)
static void streamEndLuminosityBlockSummary(B *iProd, edm::LuminosityBlock const &iLumi, edm::EventSetup const &iES, typename T::LuminosityBlockSummaryCache *iCache)
static void produce(edm::ProcessBlock &processBlock, typename T::GlobalCache *)
static void globalEndRun(edm::Run const &iRun, edm::EventSetup const &iES, typename T::RunContext const *iContext, typename T::RunSummaryCache *iCache)
static void endJob(void *iCache)
static void beginJob(void *iCache)
static void produce(edm::ProcessBlock &, typename T::GlobalCache *)
static void streamEndLuminosityBlockSummary(void *iProd, edm::LuminosityBlock const &, edm::EventSetup const &, typename T::LuminosityBlockSummaryCache *iCache)
CallEndProcessBlockProduceImpl< T, T::HasAbility::kEndProcessBlockProducer, T::HasAbility::kGlobalCache > CallEndProcessBlockProduce
CallEndLuminosityBlockProduceImpl< T, T::HasAbility::kEndLuminosityBlockProducer, T::HasAbility::kLuminosityBlockSummaryCache > CallEndLuminosityBlockProduce
static void produce(edm::Run &iRun, edm::EventSetup const &iES, typename T::RunContext const *iRC, typename T::RunSummaryCache const *)
static void produce(edm::Run &, edm::EventSetup const &, typename T::RunContext const *, typename T::RunSummaryCache const *)
static void beginJob(typename T::GlobalCache *iCache)
static void beginProcessBlock(edm::ProcessBlock const &processBlock, typename T::GlobalCache *)
static void produce(edm::LuminosityBlock &Lumi, edm::EventSetup const &iES, typename T::LuminosityBlockContext const *iRC, typename T::LuminosityBlockSummaryCache const *)
static void produce(edm::ProcessBlock &processBlock, typename T::GlobalCache *)
static void beginProcessBlock(edm::ProcessBlock const &, typename T::GlobalCache *)
static void globalEndLuminosityBlock(edm::LuminosityBlock const &Lumi, edm::EventSetup const &iES, typename T::LuminosityBlockContext const *iContext, typename T::LuminosityBlockSummaryCache *iCache)
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 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)
static void endRun(edm::Run const &, edm::EventSetup const &, typename T::RunContext const *)
CallGlobalLuminosityBlockSummaryImpl< T, T::HasAbility::kLuminosityBlockSummaryCache > CallGlobalLuminosityBlockSummary