File indexing completed on 2024-04-06 12:11:59
0001 #ifndef FWCore_Framework_stream_CacheContexts_h
0002 #define FWCore_Framework_stream_CacheContexts_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024 #include "FWCore/Framework/interface/InputProcessBlockCacheImpl.h"
0025 #include "FWCore/Framework/interface/moduleAbilities.h"
0026
0027
0028 namespace edm {
0029 namespace stream {
0030 namespace impl {
0031 struct Last {};
0032
0033 template <typename T, typename... U>
0034 struct AbilityToCache : public AbilityToCache<U...> {};
0035
0036 template <typename G, typename... U>
0037 struct AbilityToCache<GlobalCache<G>, U...> : public AbilityToCache<U...> {
0038 using GlobalCache = G;
0039 };
0040
0041 template <typename... CacheTypes, typename... U>
0042 struct AbilityToCache<InputProcessBlockCache<CacheTypes...>, U...> : public AbilityToCache<U...> {
0043 using InputProcessBlockCache = edm::impl::InputProcessBlockCacheImpl<CacheTypes...>;
0044 };
0045
0046 template <typename R, typename... U>
0047 struct AbilityToCache<RunCache<R>, U...> : public AbilityToCache<U...> {
0048 using RunCache = R;
0049 };
0050
0051 template <typename L, typename... U>
0052 struct AbilityToCache<LuminosityBlockCache<L>, U...> : public AbilityToCache<U...> {
0053 using LuminosityBlockCache = L;
0054 };
0055
0056 template <typename R, typename... U>
0057 struct AbilityToCache<RunSummaryCache<R>, U...> : public AbilityToCache<U...> {
0058 using RunSummaryCache = R;
0059 };
0060
0061 template <typename L, typename... U>
0062 struct AbilityToCache<LuminosityBlockSummaryCache<L>, U...> : public AbilityToCache<U...> {
0063 using LuminosityBlockSummaryCache = L;
0064 };
0065
0066 template <>
0067 struct AbilityToCache<Last> {
0068 using GlobalCache = void;
0069 using InputProcessBlockCache = void;
0070 using RunCache = void;
0071 using LuminosityBlockCache = void;
0072 using RunSummaryCache = void;
0073 using LuminosityBlockSummaryCache = void;
0074 };
0075
0076 }
0077 template <typename... T>
0078 struct CacheContexts : public impl::AbilityToCache<T..., impl::Last> {};
0079 }
0080 }
0081
0082 #endif