Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-05-11 03:34:11

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