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 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>
108  struct CheckAbility;
109 
110  template <module::Abilities ABILITY, typename T, typename... VArgs>
111  struct CheckAbility<ABILITY, T, VArgs...> {
112  static constexpr bool kHasIt = (T::kAbilities == ABILITY) | CheckAbility<ABILITY, VArgs...>::kHasIt;
113  typedef std::
114  conditional_t<(T::kAbilities == ABILITY), typename T::Type, typename CheckAbility<ABILITY, VArgs...>::Type>
116  };
117 
118  //End of the recursion
119  template <module::Abilities ABILITY>
120  struct CheckAbility<ABILITY> {
121  static constexpr bool kHasIt = false;
123  };
124 
125  template <typename... VArgs>
127  static constexpr bool value = CheckAbility<module::Abilities::kRunCache, VArgs...>::kHasIt or
131  };
132 
133  template <typename... VArgs>
139  };
140 
141  template <typename... VArgs>
145  };
146 
147  template <typename... VArgs>
151  };
152 
153  template <typename... VArgs>
157  };
158 
159  template <typename... VArgs>
163  };
164 } // namespace edm
165 
166 #endif
module::Empty Type
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
std::conditional_t<(T::kAbilities==ABILITY), typename T::Type, typename CheckAbility< ABILITY, VArgs... >::Type > Type
module::Empty Type
module::Empty Type
HLT enums.
long double T
Definition: vlib.h:208
#define constexpr