CMS 3D CMS Logo

moduleAbilities.h
Go to the documentation of this file.
1 #ifndef FWCore_Framework_moduleAbilities_h
2 #define FWCore_Framework_moduleAbilities_h
3 // -*- C++ -*-
4 //
5 // Package: FWCore/Framework
6 // Class : moduleAbilities
7 //
16 //
17 // Original Author: Chris Jones
18 // Created: Tue, 07 May 2013 19:19:53 GMT
19 //
20 
21 // system include files
22 #include <type_traits>
23 
24 // user include files
26 
27 // forward declarations
28 
29 namespace edm {
30  namespace module {
31  //Used in the case where ability is not available
32  struct Empty {};
33  } // namespace module
34 
35  template <typename T>
36  struct GlobalCache {
38  typedef T Type;
39  };
40 
41  template <typename T>
42  struct StreamCache {
44  typedef T Type;
45  };
46 
47  template <typename... CacheTypes>
50  };
51 
52  template <typename T>
53  struct RunCache {
55  typedef T Type;
56  };
57 
58  template <typename T>
61  typedef T Type;
62  };
63 
64  template <typename T>
65  struct RunSummaryCache {
67  typedef T Type;
68  };
69 
70  template <typename T>
73  typedef T Type;
74  };
75 
79  };
80 
84  };
85 
89  };
90 
94  };
95 
96  struct EndRunProducer {
99  };
100 
104  };
105 
109  };
110 
114  };
115 
116  struct ExternalWork {
119  };
120 
121  struct Accumulator {
124  };
125 
126  //Recursively checks VArgs template arguments looking for the ABILITY
127  template <module::Abilities ABILITY, typename... VArgs>
128  struct CheckAbility;
129 
130  template <module::Abilities ABILITY, typename T, typename... VArgs>
131  struct CheckAbility<ABILITY, T, VArgs...> {
132  static constexpr bool kHasIt = (T::kAbilities == ABILITY) | CheckAbility<ABILITY, VArgs...>::kHasIt;
133  };
134 
135  //End of the recursion
136  template <module::Abilities ABILITY>
137  struct CheckAbility<ABILITY> {
138  static constexpr bool kHasIt = false;
139  };
140 
141  template <typename... VArgs>
143  static constexpr bool value = CheckAbility<module::Abilities::kWatchProcessBlock, VArgs...>::kHasIt or
146  };
147 
148  template <typename... VArgs>
150  static constexpr bool value = CheckAbility<module::Abilities::kInputProcessBlockCache, VArgs...>::kHasIt;
151  };
152 
153  template <typename... VArgs>
155  static constexpr bool value = CheckAbility<module::Abilities::kRunCache, VArgs...>::kHasIt or
159  };
160 
161  template <typename... VArgs>
163  static constexpr bool value = CheckAbility<module::Abilities::kLuminosityBlockCache, VArgs...>::kHasIt or
167  };
168 
169  template <typename... VArgs>
171  static constexpr bool value = CheckAbility<module::Abilities::kStreamCache, VArgs...>::kHasIt or
173  };
174 
175  template <typename... VArgs>
177  static constexpr bool value = CheckAbility<module::Abilities::kStreamCache, VArgs...>::kHasIt or
179  };
180 
181  template <typename... VArgs>
183  static constexpr bool value = CheckAbility<module::Abilities::kBeginProcessBlockProducer, VArgs...>::kHasIt;
184  };
185 
186  template <typename... VArgs>
188  static constexpr bool value = CheckAbility<module::Abilities::kEndProcessBlockProducer, VArgs...>::kHasIt;
189  };
190 
191  template <typename... VArgs>
193  static constexpr bool value = CheckAbility<module::Abilities::kBeginRunProducer, VArgs...>::kHasIt;
194  };
195 
196  template <typename... VArgs>
198  static constexpr bool value = CheckAbility<module::Abilities::kEndRunProducer, VArgs...>::kHasIt;
199  };
200 
201  template <typename... VArgs>
203  static constexpr bool value = CheckAbility<module::Abilities::kBeginLuminosityBlockProducer, VArgs...>::kHasIt;
204  };
205 
206  template <typename... VArgs>
208  static constexpr bool value = CheckAbility<module::Abilities::kEndLuminosityBlockProducer, VArgs...>::kHasIt;
209  };
210 
211 } // namespace edm
212 
213 #endif
edm::GlobalCache
Definition: moduleAbilities.h:36
edm::StreamCache::kAbilities
static constexpr module::Abilities kAbilities
Definition: moduleAbilities.h:43
edm::BeginLuminosityBlockProducer::kAbilities
static constexpr module::Abilities kAbilities
Definition: moduleAbilities.h:102
edm::BeginProcessBlockProducer
Definition: moduleAbilities.h:81
edm::EndLuminosityBlockProducer::Type
module::Empty Type
Definition: moduleAbilities.h:108
edm::GlobalCache::Type
T Type
Definition: moduleAbilities.h:38
edm::BeginLuminosityBlockProducer
Definition: moduleAbilities.h:101
edm::module::Abilities::kRunCache
edm::WatchProcessBlock::Type
module::Empty Type
Definition: moduleAbilities.h:78
edm::BeginRunProducer::kAbilities
static constexpr module::Abilities kAbilities
Definition: moduleAbilities.h:92
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::module::Abilities::kExternalWork
edm::HasAbilityToProduceInEndRuns
Definition: moduleAbilities.h:197
edm::InputProcessBlockCache
Definition: moduleAbilities.h:48
edm::CheckAbility
Definition: moduleAbilities.h:128
edm::HasAbilityToProduceInEndLumis
Definition: moduleAbilities.h:207
edm::Accumulator::Type
module::Empty Type
Definition: moduleAbilities.h:123
edm::WatchInputFiles
Definition: moduleAbilities.h:111
edm::BeginLuminosityBlockProducer::Type
module::Empty Type
Definition: moduleAbilities.h:103
edm::RunCache::kAbilities
static constexpr module::Abilities kAbilities
Definition: moduleAbilities.h:54
edm::LuminosityBlockSummaryCache::kAbilities
static constexpr module::Abilities kAbilities
Definition: moduleAbilities.h:72
edm::EndRunProducer::Type
module::Empty Type
Definition: moduleAbilities.h:98
edm::module::Abilities::kWatchInputFiles
edm::WantsGlobalLuminosityBlockTransitions
Definition: moduleAbilities.h:162
edm::BeginProcessBlockProducer::kAbilities
static constexpr module::Abilities kAbilities
Definition: moduleAbilities.h:82
moduleAbilityEnums.h
edm::EndLuminosityBlockProducer
Definition: moduleAbilities.h:106
edm::module::Abilities::kWatchProcessBlock
edm::LuminosityBlockCache
Definition: moduleAbilities.h:59
edm::WantsGlobalRunTransitions
Definition: moduleAbilities.h:154
edm::RunSummaryCache::kAbilities
static constexpr module::Abilities kAbilities
Definition: moduleAbilities.h:66
edm::module::Empty
Definition: moduleAbilities.h:32
edm::Accumulator
Definition: moduleAbilities.h:121
edm::module::Abilities::kBeginRunProducer
edm::module::Abilities::kRunSummaryCache
edm::LuminosityBlockSummaryCache
Definition: moduleAbilities.h:71
edm::WantsInputProcessBlockTransitions
Definition: moduleAbilities.h:149
edm::module::Abilities::kLuminosityBlockCache
edm::RunCache::Type
T Type
Definition: moduleAbilities.h:55
edm::HasAbilityToProduceInBeginLumis
Definition: moduleAbilities.h:202
edm::module::Abilities::kInputProcessBlockCache
edm::RunCache
Definition: moduleAbilities.h:53
edm::ExternalWork::Type
module::Empty Type
Definition: moduleAbilities.h:118
edm::WatchProcessBlock::kAbilities
static constexpr module::Abilities kAbilities
Definition: moduleAbilities.h:77
edm::BeginRunProducer
Definition: moduleAbilities.h:91
edm::Accumulator::kAbilities
static constexpr module::Abilities kAbilities
Definition: moduleAbilities.h:122
edm::BeginRunProducer::Type
module::Empty Type
Definition: moduleAbilities.h:93
edm::EndRunProducer::kAbilities
static constexpr module::Abilities kAbilities
Definition: moduleAbilities.h:97
edm::InputProcessBlockCache::kAbilities
static constexpr module::Abilities kAbilities
Definition: moduleAbilities.h:49
edm::module::Abilities::kEndRunProducer
edm::module::Abilities::kBeginLuminosityBlockProducer
edm::WantsStreamLuminosityBlockTransitions
Definition: moduleAbilities.h:176
edm::EndLuminosityBlockProducer::kAbilities
static constexpr module::Abilities kAbilities
Definition: moduleAbilities.h:107
edm::ExternalWork
Definition: moduleAbilities.h:116
edm::WantsProcessBlockTransitions
Definition: moduleAbilities.h:142
edm::EndProcessBlockProducer
Definition: moduleAbilities.h:86
value
Definition: value.py:1
edm::module::Abilities
Abilities
Definition: moduleAbilityEnums.h:30
edm::LuminosityBlockCache::Type
T Type
Definition: moduleAbilities.h:61
edm::HasAbilityToProduceInBeginProcessBlocks
Definition: moduleAbilities.h:182
edm::module::Abilities::kLuminosityBlockSummaryCache
edm::HasAbilityToProduceInEndProcessBlocks
Definition: moduleAbilities.h:187
edm::StreamCache
Definition: moduleAbilities.h:42
callgraph.module
module
Definition: callgraph.py:61
edm::module::Abilities::kAccumulator
edm::StreamCache::Type
T Type
Definition: moduleAbilities.h:44
edm::GlobalCache::kAbilities
static constexpr module::Abilities kAbilities
Definition: moduleAbilities.h:37
edm::WatchInputFiles::kAbilities
static constexpr module::Abilities kAbilities
Definition: moduleAbilities.h:112
edm::WantsStreamRunTransitions
Definition: moduleAbilities.h:170
edm::BeginProcessBlockProducer::Type
module::Empty Type
Definition: moduleAbilities.h:83
edm::RunSummaryCache
Definition: moduleAbilities.h:65
T
long double T
Definition: Basic3DVectorLD.h:48
edm::RunSummaryCache::Type
T Type
Definition: moduleAbilities.h:67
edm::LuminosityBlockSummaryCache::Type
T Type
Definition: moduleAbilities.h:73
edm::module::Abilities::kStreamCache
or
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
edm::ExternalWork::kAbilities
static constexpr module::Abilities kAbilities
Definition: moduleAbilities.h:117
edm::module::Abilities::kGlobalCache
edm::EndRunProducer
Definition: moduleAbilities.h:96
edm::module::Abilities::kEndLuminosityBlockProducer
edm::WatchProcessBlock
Definition: moduleAbilities.h:76
edm::HasAbilityToProduceInBeginRuns
Definition: moduleAbilities.h:192
edm::LuminosityBlockCache::kAbilities
static constexpr module::Abilities kAbilities
Definition: moduleAbilities.h:60
edm::EndProcessBlockProducer::kAbilities
static constexpr module::Abilities kAbilities
Definition: moduleAbilities.h:87
edm::WatchInputFiles::Type
module::Empty Type
Definition: moduleAbilities.h:113
edm::module::Abilities::kBeginProcessBlockProducer
edm::EndProcessBlockProducer::Type
module::Empty Type
Definition: moduleAbilities.h:88
edm::module::Abilities::kEndProcessBlockProducer