CMS 3D CMS Logo

AbilityChecker.h
Go to the documentation of this file.
1 #ifndef FWCore_Framework_AbilityChecker_h
2 #define FWCore_Framework_AbilityChecker_h
3 // -*- C++ -*-
4 //
5 // Package: FWCore/Framework
6 // Class : AbilityChecker
7 //
16 //
17 // Original Author: Chris Jones
18 // Created: Sat, 03 Aug 2013 15:38:02 GMT
19 //
20 
21 // system include files
22 
23 // user include files
25 
26 // forward declarations
27 namespace edm {
28  namespace stream {
29  namespace impl {
30  struct LastCheck {};
31 
32  template<typename T, typename... U>
33  struct HasAbility;
34 
35  template<typename G, typename... U>
36  struct HasAbility<GlobalCache<G>, U...> : public HasAbility<U...> {
37  static constexpr bool kGlobalCache = true;
38  };
39 
40  template<typename R, typename... U>
41  struct HasAbility<RunCache<R>, U...> : public HasAbility<U...> {
42  static constexpr bool kRunCache = true;
43  };
44 
45  template<typename R, typename... U>
46  struct HasAbility<LuminosityBlockCache<R>, U...> : public HasAbility<U...> {
47  static constexpr bool kLuminosityBlockCache = true;
48  };
49 
50  template<typename R, typename... U>
51  struct HasAbility<RunSummaryCache<R>, U...> : public HasAbility<U...> {
52  static constexpr bool kRunSummaryCache = true;
53  };
54 
55  template<typename R, typename... U>
56  struct HasAbility<LuminosityBlockSummaryCache<R>, U...> : public HasAbility<U...> {
57  static constexpr bool kLuminosityBlockSummaryCache = true;
58  };
59 
60  template<typename... U>
61  struct HasAbility<edm::BeginRunProducer, U...> :public HasAbility<U...> {
62  static constexpr bool kBeginRunProducer = true;
63  };
64 
65  template<typename... U>
66  struct HasAbility<edm::EndRunProducer, U...> :public HasAbility<U...> {
67  static constexpr bool kEndRunProducer = true;
68  };
69 
70  template<typename... U>
72  static constexpr bool kBeginLuminosityBlockProducer = true;
73  };
74 
75  template<typename... U>
76  struct HasAbility<edm::EndLuminosityBlockProducer, U...> :public HasAbility<U...> {
77  static constexpr bool kEndLuminosityBlockProducer = true;
78  };
79 
80  template<typename... U>
81  struct HasAbility<edm::ExternalWork, U...> :public HasAbility<U...> {
82  static constexpr bool kExternalWork = true;
83  };
84 
85  template<>
87  static constexpr bool kGlobalCache = false;
88  static constexpr bool kRunCache = false;
89  static constexpr bool kLuminosityBlockCache = false;
90  static constexpr bool kRunSummaryCache = false;
91  static constexpr bool kLuminosityBlockSummaryCache = false;
92  static constexpr bool kBeginRunProducer = false;
93  static constexpr bool kEndRunProducer = false;
94  static constexpr bool kBeginLuminosityBlockProducer = false;
95  static constexpr bool kEndLuminosityBlockProducer = false;
96  static constexpr bool kExternalWork = false;
97  };
98  }
99  template<typename... T>
100  struct AbilityChecker : public impl::HasAbility<T...,impl::LastCheck>
101  {
102  };
103  }
104 }
105 
106 
107 #endif
108 
#define constexpr
HLT enums.
long double T