Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:11:57

0001 #ifndef FWCore_Framework_limited_EDProducer_h
0002 #define FWCore_Framework_limited_EDProducer_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     FWCore/Framework
0006 // Class  :     edm::limited::EDProducer
0007 //
0008 /**\class edm::limited::EDProducer EDProducer.h "FWCore/Framework/interface/limited/EDProducer.h"
0009 
0010  Description: [one line class summary]
0011 
0012  Usage:
0013     <usage>
0014 
0015 */
0016 //
0017 // Original Author:  Chris Jones
0018 //         Created:  Thu, 18 Jul 2013 11:51:07 GMT
0019 //
0020 
0021 // system include files
0022 
0023 // user include files
0024 #include "FWCore/Framework/interface/limited/producerAbilityToImplementor.h"
0025 #include "FWCore/Framework/interface/moduleAbilities.h"
0026 
0027 // forward declarations
0028 
0029 namespace edm {
0030   namespace limited {
0031     template <typename... T>
0032     class EDProducer : public producer::SpecializeAbilityToImplementor<
0033                            CheckAbility<edm::module::Abilities::kRunSummaryCache, T...>::kHasIt &
0034                                CheckAbility<edm::module::Abilities::kEndRunProducer, T...>::kHasIt,
0035                            CheckAbility<edm::module::Abilities::kLuminosityBlockSummaryCache, T...>::kHasIt &
0036                                CheckAbility<edm::module::Abilities::kEndLuminosityBlockProducer, T...>::kHasIt,
0037                            T>::Type...,
0038                        public virtual EDProducerBase {
0039     public:
0040       EDProducer(edm::ParameterSet const& iPSet)
0041           : EDProducerBase(iPSet),
0042             producer::SpecializeAbilityToImplementor<
0043                 CheckAbility<edm::module::Abilities::kRunSummaryCache, T...>::kHasIt &
0044                     CheckAbility<edm::module::Abilities::kEndRunProducer, T...>::kHasIt,
0045                 CheckAbility<edm::module::Abilities::kLuminosityBlockSummaryCache, T...>::kHasIt &
0046                     CheckAbility<edm::module::Abilities::kEndLuminosityBlockProducer, T...>::kHasIt,
0047                 T>::Type(iPSet)... {}
0048 
0049       // ---------- const member functions ---------------------
0050       bool wantsProcessBlocks() const final { return WantsProcessBlockTransitions<T...>::value; }
0051       bool wantsInputProcessBlocks() const final { return WantsInputProcessBlockTransitions<T...>::value; }
0052       bool wantsGlobalRuns() const final { return WantsGlobalRunTransitions<T...>::value; }
0053       bool wantsGlobalLuminosityBlocks() const final { return WantsGlobalLuminosityBlockTransitions<T...>::value; }
0054       bool wantsStreamRuns() const final { return WantsStreamRunTransitions<T...>::value; }
0055       bool wantsStreamLuminosityBlocks() const final { return WantsStreamLuminosityBlockTransitions<T...>::value; }
0056 
0057       bool hasAbilityToProduceInBeginProcessBlocks() const final {
0058         return HasAbilityToProduceInBeginProcessBlocks<T...>::value;
0059       }
0060       bool hasAbilityToProduceInEndProcessBlocks() const final {
0061         return HasAbilityToProduceInEndProcessBlocks<T...>::value;
0062       }
0063 
0064       bool hasAbilityToProduceInBeginRuns() const final { return HasAbilityToProduceInBeginRuns<T...>::value; }
0065       bool hasAbilityToProduceInEndRuns() const final { return HasAbilityToProduceInEndRuns<T...>::value; }
0066 
0067       bool hasAbilityToProduceInBeginLumis() const final { return HasAbilityToProduceInBeginLumis<T...>::value; }
0068       bool hasAbilityToProduceInEndLumis() const final { return HasAbilityToProduceInEndLumis<T...>::value; }
0069 
0070       // ---------- static member functions --------------------
0071 
0072       // ---------- member functions ---------------------------
0073 
0074     private:
0075       EDProducer(const EDProducer&) = delete;
0076 
0077       const EDProducer& operator=(const EDProducer&) = delete;
0078 
0079       // ---------- member data --------------------------------
0080     };
0081 
0082   }  // namespace limited
0083 }  // namespace edm
0084 
0085 #endif