File indexing completed on 2024-05-11 03:34:11
0001 #ifndef FWCore_Framework_one_EDProducer_h
0002 #define FWCore_Framework_one_EDProducer_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024 #include "FWCore/Framework/interface/one/producerAbilityToImplementor.h"
0025
0026
0027 namespace edm {
0028 namespace one {
0029 template <typename... T>
0030 class EDProducer : public virtual EDProducerBase, public producer::AbilityToImplementor<T>::Type... {
0031 public:
0032 static_assert(not(CheckAbility<module::Abilities::kRunCache, T...>::kHasIt and
0033 CheckAbility<module::Abilities::kOneWatchRuns, T...>::kHasIt),
0034 "Cannot use both WatchRuns and RunCache");
0035 static_assert(not(CheckAbility<module::Abilities::kLuminosityBlockCache, T...>::kHasIt and
0036 CheckAbility<module::Abilities::kOneWatchLuminosityBlocks, T...>::kHasIt),
0037 "Cannot use both WatchLuminosityBlocks and LuminosityBLockCache");
0038
0039 EDProducer() = default;
0040 EDProducer(const EDProducer&) = delete;
0041 const EDProducer& operator=(const EDProducer&) = delete;
0042
0043 #ifdef __INTEL_COMPILER
0044 virtual ~EDProducer() = default;
0045 #endif
0046
0047
0048
0049 bool wantsProcessBlocks() const noexcept final { return WantsProcessBlockTransitions<T...>::value; }
0050 bool wantsInputProcessBlocks() const noexcept final { return WantsInputProcessBlockTransitions<T...>::value; }
0051 bool wantsGlobalRuns() const noexcept final { return WantsGlobalRunTransitions<T...>::value; }
0052 bool wantsGlobalLuminosityBlocks() const noexcept final {
0053 return WantsGlobalLuminosityBlockTransitions<T...>::value;
0054 }
0055
0056 bool hasAbilityToProduceInBeginProcessBlocks() const final {
0057 return HasAbilityToProduceInBeginProcessBlocks<T...>::value;
0058 }
0059 bool hasAbilityToProduceInEndProcessBlocks() const final {
0060 return HasAbilityToProduceInEndProcessBlocks<T...>::value;
0061 }
0062
0063 bool hasAbilityToProduceInBeginRuns() const final { return HasAbilityToProduceInBeginRuns<T...>::value; }
0064 bool hasAbilityToProduceInEndRuns() const final { return HasAbilityToProduceInEndRuns<T...>::value; }
0065
0066 bool hasAbilityToProduceInBeginLumis() const final { return HasAbilityToProduceInBeginLumis<T...>::value; }
0067 bool hasAbilityToProduceInEndLumis() const final { return HasAbilityToProduceInEndLumis<T...>::value; }
0068
0069 SerialTaskQueue* globalRunsQueue() final { return globalRunsQueue_.queue(); }
0070 SerialTaskQueue* globalLuminosityBlocksQueue() final { return globalLuminosityBlocksQueue_.queue(); }
0071
0072
0073
0074
0075
0076 private:
0077
0078 impl::OptionalSerialTaskQueueHolder<WantsSerialGlobalRunTransitions<T...>::value> globalRunsQueue_;
0079 impl::OptionalSerialTaskQueueHolder<WantsSerialGlobalLuminosityBlockTransitions<T...>::value>
0080 globalLuminosityBlocksQueue_;
0081 };
0082
0083 }
0084 }
0085
0086 #endif