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  }
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 T>
48  struct RunCache {
50  typedef T Type;
51  };
52 
53  template<typename T>
56  typedef T Type;
57  };
58 
59  template<typename T>
60  struct RunSummaryCache {
62  typedef T Type;
63  };
64 
65  template<typename T>
68  typedef T Type;
69  };
70 
74  };
75 
76  struct EndRunProducer {
79  };
80 
84  };
85 
89  };
90 
91  struct WatchInputFiles {
94  };
95 
96  struct ExternalWork {
99  };
100 
101  struct Accumulator {
104  };
105 
106  //Recursively checks VArgs template arguments looking for the ABILITY
107  template<module::Abilities ABILITY, typename... VArgs> struct CheckAbility;
108 
109  template<module::Abilities ABILITY, typename T, typename... VArgs>
110  struct CheckAbility<ABILITY,T,VArgs...> {
111  static constexpr bool kHasIt = (T::kAbilities==ABILITY) | CheckAbility<ABILITY,VArgs...>::kHasIt;
112  typedef std::conditional_t<(T::kAbilities==ABILITY),
113  typename T::Type,
115  };
116 
117  //End of the recursion
118  template<module::Abilities ABILITY>
119  struct CheckAbility<ABILITY> {
120  static constexpr bool kHasIt=false;
122  };
123 
124  template<typename... VArgs>
130  };
131 
132  template<typename... VArgs>
138  };
139 
140  template<typename... VArgs>
144  };
145 
146  template<typename... VArgs>
150  };
151 
152  template<typename... VArgs>
154  static constexpr bool value =
157  };
158 
159  template<typename... VArgs>
161  static constexpr bool value =
164  };
165 }
166 
167 #endif
module::Empty Type
#define constexpr
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
Definition: value.py:1
module::Empty Type
module::Empty Type
std::conditional_t<(T::kAbilities==ABILITY), typename T::Type, typename CheckAbility< ABILITY, VArgs... >::Type > Type
HLT enums.
long double T
Definition: vlib.h:208