Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-07-30 02:33:04

0001 #ifndef FWCore_Framework_one_EDFilter_h
0002 #define FWCore_Framework_one_EDFilter_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     FWCore/Framework
0006 // Class  :     edm::one::EDFilter
0007 //
0008 /**\class edm::one::EDFilter EDFilter.h "FWCore/Framework/interface/one/EDFilter.h"
0009 
0010  Description: [one line class summary]
0011 
0012  Usage:
0013     <usage>
0014 
0015 */
0016 //
0017 // Original Author:  Chris Jones
0018 //         Created:  Thu, 09 May 2013 19:53:55 GMT
0019 //
0020 
0021 // system include files
0022 
0023 // user include files
0024 #include "FWCore/Framework/interface/one/filterAbilityToImplementor.h"
0025 
0026 // forward declarations
0027 namespace edm {
0028   namespace one {
0029     template <typename... T>
0030     class EDFilter : public filter::AbilityToImplementor<T>::Type..., public virtual EDFilterBase {
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       EDFilter() = default;
0039       EDFilter(const EDFilter&) = delete;
0040       const EDFilter& operator=(const EDFilter&) = delete;
0041 
0042       //virtual ~EDFilter();
0043 
0044       // ---------- const member functions ---------------------
0045       bool wantsProcessBlocks() const final { return WantsProcessBlockTransitions<T...>::value; }
0046       bool wantsInputProcessBlocks() const final { return WantsInputProcessBlockTransitions<T...>::value; }
0047       bool wantsGlobalRuns() const final { return WantsGlobalRunTransitions<T...>::value; }
0048       bool wantsGlobalLuminosityBlocks() const final { return WantsGlobalLuminosityBlockTransitions<T...>::value; }
0049 
0050       bool hasAbilityToProduceInBeginProcessBlocks() const final {
0051         return HasAbilityToProduceInBeginProcessBlocks<T...>::value;
0052       }
0053       bool hasAbilityToProduceInEndProcessBlocks() const final {
0054         return HasAbilityToProduceInEndProcessBlocks<T...>::value;
0055       }
0056 
0057       bool hasAbilityToProduceInBeginRuns() const final { return HasAbilityToProduceInBeginRuns<T...>::value; }
0058       bool hasAbilityToProduceInEndRuns() const final { return HasAbilityToProduceInEndRuns<T...>::value; }
0059 
0060       bool hasAbilityToProduceInBeginLumis() const final { return HasAbilityToProduceInBeginLumis<T...>::value; }
0061       bool hasAbilityToProduceInEndLumis() const final { return HasAbilityToProduceInEndLumis<T...>::value; }
0062 
0063       // ---------- static member functions --------------------
0064 
0065       // ---------- member functions ---------------------------
0066       SerialTaskQueue* globalRunsQueue() final { return globalRunsQueue_.queue(); }
0067       SerialTaskQueue* globalLuminosityBlocksQueue() final { return globalLuminosityBlocksQueue_.queue(); }
0068 
0069     private:
0070       // ---------- member data --------------------------------
0071       impl::OptionalSerialTaskQueueHolder<WantsSerialGlobalRunTransitions<T...>::value> globalRunsQueue_;
0072       impl::OptionalSerialTaskQueueHolder<WantsSerialGlobalLuminosityBlockTransitions<T...>::value>
0073           globalLuminosityBlocksQueue_;
0074     };
0075 
0076   }  // namespace one
0077 }  // namespace edm
0078 
0079 #endif