Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef FWCore_Framework_one_moduleAbilities_h
0002 #define FWCore_Framework_one_moduleAbilities_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     FWCore/Framework
0006 // Class  :     moduleAbilities
0007 //
0008 /**\file moduleAbilities moduleAbilities.h "FWCore/Framework/interface/one/moduleAbilities.h"
0009 
0010  Description: Template arguments which only apply to one::{Module} classes
0011 
0012  Usage:
0013     <usage>
0014 
0015 */
0016 //
0017 // Original Author:  Chris Jones
0018 //         Created:  Tue, 07 May 2013 19:38:53 GMT
0019 //
0020 
0021 // system include files
0022 
0023 // user include files
0024 #include "FWCore/Framework/interface/moduleAbilities.h"
0025 
0026 // forward declarations
0027 
0028 namespace edm {
0029   namespace one {
0030     struct SharedResources {
0031       static constexpr module::Abilities kAbilities = module::Abilities::kOneSharedResources;
0032       typedef module::Empty Type;
0033     };
0034 
0035     struct WatchRuns {
0036       static constexpr module::Abilities kAbilities = module::Abilities::kOneWatchRuns;
0037       typedef module::Empty Type;
0038     };
0039 
0040     struct WatchLuminosityBlocks {
0041       static constexpr module::Abilities kAbilities = module::Abilities::kOneWatchLuminosityBlocks;
0042       typedef module::Empty Type;
0043     };
0044 
0045     template <typename... VArgs>
0046     struct WantsGlobalRunTransitions {
0047       static constexpr bool value = CheckAbility<module::Abilities::kRunCache, VArgs...>::kHasIt or
0048                                     CheckAbility<module::Abilities::kOneWatchRuns, VArgs...>::kHasIt or
0049                                     CheckAbility<module::Abilities::kBeginRunProducer, VArgs...>::kHasIt or
0050                                     CheckAbility<module::Abilities::kEndRunProducer, VArgs...>::kHasIt;
0051     };
0052 
0053     template <typename... VArgs>
0054     struct WantsGlobalLuminosityBlockTransitions {
0055       static constexpr bool value = CheckAbility<module::Abilities::kLuminosityBlockCache, VArgs...>::kHasIt or
0056                                     CheckAbility<module::Abilities::kOneWatchLuminosityBlocks, VArgs...>::kHasIt or
0057                                     CheckAbility<module::Abilities::kBeginLuminosityBlockProducer, VArgs...>::kHasIt or
0058                                     CheckAbility<module::Abilities::kEndLuminosityBlockProducer, VArgs...>::kHasIt;
0059     };
0060 
0061     //RunCache and LuminosityBlockCache do not require serializing their
0062     // respective transitions
0063     template <typename... VArgs>
0064     struct WantsSerialGlobalRunTransitions {
0065       static constexpr bool value = WantsGlobalRunTransitions<VArgs...>::value and
0066                                     not CheckAbility<module::Abilities::kRunCache, VArgs...>::kHasIt;
0067     };
0068 
0069     template <typename... VArgs>
0070     struct WantsSerialGlobalLuminosityBlockTransitions {
0071       static constexpr bool value = WantsGlobalLuminosityBlockTransitions<VArgs...>::value and
0072                                     not CheckAbility<module::Abilities::kLuminosityBlockCache, VArgs...>::kHasIt;
0073     };
0074   }  // namespace one
0075 }  // namespace edm
0076 
0077 #endif