Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-09-11 22:29:28

0001 #ifndef FWCore_Framework_AbilityChecker_h
0002 #define FWCore_Framework_AbilityChecker_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     FWCore/Framework
0006 // Class  :     AbilityChecker
0007 //
0008 /**\class edm::stream::AbilityChecker AbilityChecker.h "FWCore/Framework/interface/stream/AbilityChecker.h"
0009 
0010  Description: [one line class summary]
0011 
0012  Usage:
0013     <usage>
0014 
0015 */
0016 //
0017 // Original Author:  Chris Jones
0018 //         Created:  Sat, 03 Aug 2013 15:38:02 GMT
0019 //
0020 
0021 // system include files
0022 
0023 // user include files
0024 #include "FWCore/Framework/interface/moduleAbilities.h"
0025 
0026 // forward declarations
0027 namespace edm {
0028   namespace stream {
0029     namespace impl {
0030       struct LastCheck {};
0031 
0032       template <typename T, typename... U>
0033       struct HasAbility;
0034 
0035       template <typename G, typename... U>
0036       struct HasAbility<GlobalCache<G>, U...> : public HasAbility<U...> {
0037         static constexpr bool kGlobalCache = true;
0038       };
0039 
0040       template <typename... CacheTypes, typename... U>
0041       struct HasAbility<InputProcessBlockCache<CacheTypes...>, U...> : public HasAbility<U...> {
0042         static constexpr bool kInputProcessBlockCache = true;
0043       };
0044 
0045       template <typename R, typename... U>
0046       struct HasAbility<RunCache<R>, U...> : public HasAbility<U...> {
0047         static constexpr bool kRunCache = true;
0048       };
0049 
0050       template <typename R, typename... U>
0051       struct HasAbility<LuminosityBlockCache<R>, U...> : public HasAbility<U...> {
0052         static constexpr bool kLuminosityBlockCache = true;
0053       };
0054 
0055       template <typename R, typename... U>
0056       struct HasAbility<RunSummaryCache<R>, U...> : public HasAbility<U...> {
0057         static constexpr bool kRunSummaryCache = true;
0058       };
0059 
0060       template <typename R, typename... U>
0061       struct HasAbility<LuminosityBlockSummaryCache<R>, U...> : public HasAbility<U...> {
0062         static constexpr bool kLuminosityBlockSummaryCache = true;
0063       };
0064 
0065       template <typename... U>
0066       struct HasAbility<edm::WatchProcessBlock, U...> : public HasAbility<U...> {
0067         static constexpr bool kWatchProcessBlock = true;
0068       };
0069 
0070       template <typename... U>
0071       struct HasAbility<edm::BeginProcessBlockProducer, U...> : public HasAbility<U...> {
0072         static constexpr bool kBeginProcessBlockProducer = true;
0073       };
0074 
0075       template <typename... U>
0076       struct HasAbility<edm::EndProcessBlockProducer, U...> : public HasAbility<U...> {
0077         static constexpr bool kEndProcessBlockProducer = true;
0078       };
0079 
0080       template <typename... U>
0081       struct HasAbility<edm::BeginRunProducer, U...> : public HasAbility<U...> {
0082         static constexpr bool kBeginRunProducer = true;
0083       };
0084 
0085       template <typename... U>
0086       struct HasAbility<edm::EndRunProducer, U...> : public HasAbility<U...> {
0087         static constexpr bool kEndRunProducer = true;
0088       };
0089 
0090       template <typename... U>
0091       struct HasAbility<edm::BeginLuminosityBlockProducer, U...> : public HasAbility<U...> {
0092         static constexpr bool kBeginLuminosityBlockProducer = true;
0093       };
0094 
0095       template <typename... U>
0096       struct HasAbility<edm::EndLuminosityBlockProducer, U...> : public HasAbility<U...> {
0097         static constexpr bool kEndLuminosityBlockProducer = true;
0098       };
0099 
0100       template <typename... U>
0101       struct HasAbility<edm::ExternalWork, U...> : public HasAbility<U...> {
0102         static constexpr bool kExternalWork = true;
0103       };
0104 
0105       template <typename... U>
0106       struct HasAbility<edm::Transformer, U...> : public HasAbility<U...> {
0107         static constexpr bool kTransformer = true;
0108       };
0109 
0110       template <typename... U>
0111       struct HasAbility<edm::Accumulator, U...> : public HasAbility<U...> {
0112         static constexpr bool kAccumulator = true;
0113       };
0114 
0115       template <>
0116       struct HasAbility<LastCheck> {
0117         static constexpr bool kGlobalCache = false;
0118         static constexpr bool kInputProcessBlockCache = false;
0119         static constexpr bool kRunCache = false;
0120         static constexpr bool kLuminosityBlockCache = false;
0121         static constexpr bool kRunSummaryCache = false;
0122         static constexpr bool kLuminosityBlockSummaryCache = false;
0123         static constexpr bool kWatchProcessBlock = false;
0124         static constexpr bool kBeginProcessBlockProducer = false;
0125         static constexpr bool kEndProcessBlockProducer = false;
0126         static constexpr bool kBeginRunProducer = false;
0127         static constexpr bool kEndRunProducer = false;
0128         static constexpr bool kBeginLuminosityBlockProducer = false;
0129         static constexpr bool kEndLuminosityBlockProducer = false;
0130         static constexpr bool kExternalWork = false;
0131         static constexpr bool kAccumulator = false;
0132         static constexpr bool kTransformer = false;
0133       };
0134     }  // namespace impl
0135     template <typename... T>
0136     struct AbilityChecker : public impl::HasAbility<T..., impl::LastCheck> {};
0137   }  // namespace stream
0138 }  // namespace edm
0139 
0140 #endif