Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef FWCore_Framework_limited_filterAbilityToImplementor_h
0002 #define FWCore_Framework_limited_filterAbilityToImplementor_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     FWCore/Framework
0006 // File  :     filterAbilityToImplementor
0007 //
0008 /**\file  filterAbilityToImplementor.h "FWCore/Framework/interface/limited/filterAbilityToImplementor.h"
0009 
0010  Description: Class used to pair a module Ability to the actual base class used to implement that ability
0011 
0012  Usage:
0013     <usage>
0014 
0015 */
0016 //
0017 // Original Author:  Chris Jones
0018 //         Created:  Thu, 18 Jul 2013 11:51:33 GMT
0019 //
0020 
0021 // system include files
0022 
0023 // user include files
0024 #include "FWCore/Framework/interface/moduleAbilities.h"
0025 #include "FWCore/Framework/interface/limited/implementors.h"
0026 #include "FWCore/Framework/interface/limited/EDFilterBase.h"
0027 
0028 // forward declarations
0029 namespace edm {
0030   namespace limited {
0031     namespace filter {
0032       template <typename T>
0033       struct AbilityToImplementor;
0034 
0035       template <typename C>
0036       struct AbilityToImplementor<edm::StreamCache<C>> {
0037         using Type = edm::limited::impl::StreamCacheHolder<edm::limited::EDFilterBase, C>;
0038       };
0039 
0040       template <typename... Cs>
0041       struct AbilityToImplementor<edm::InputProcessBlockCache<Cs...>> {
0042         using Type = edm::limited::impl::InputProcessBlockCacheHolder<edm::limited::EDFilterBase, Cs...>;
0043       };
0044 
0045       template <typename C>
0046       struct AbilityToImplementor<edm::RunCache<C>> {
0047         using Type = edm::limited::impl::RunCacheHolder<edm::limited::EDFilterBase, C>;
0048       };
0049 
0050       template <typename C>
0051       struct AbilityToImplementor<edm::RunSummaryCache<C>> {
0052         using Type = edm::limited::impl::RunSummaryCacheHolder<edm::limited::EDFilterBase, C>;
0053       };
0054 
0055       template <typename C>
0056       struct AbilityToImplementor<edm::LuminosityBlockCache<C>> {
0057         using Type = edm::limited::impl::LuminosityBlockCacheHolder<edm::limited::EDFilterBase, C>;
0058       };
0059 
0060       template <typename C>
0061       struct AbilityToImplementor<edm::LuminosityBlockSummaryCache<C>> {
0062         using Type = edm::limited::impl::LuminosityBlockSummaryCacheHolder<edm::limited::EDFilterBase, C>;
0063       };
0064 
0065       template <>
0066       struct AbilityToImplementor<edm::WatchProcessBlock> {
0067         using Type = edm::limited::impl::WatchProcessBlock<edm::limited::EDFilterBase>;
0068       };
0069 
0070       template <>
0071       struct AbilityToImplementor<edm::BeginProcessBlockProducer> {
0072         using Type = edm::limited::impl::BeginProcessBlockProducer<edm::limited::EDFilterBase>;
0073       };
0074 
0075       template <>
0076       struct AbilityToImplementor<edm::EndProcessBlockProducer> {
0077         using Type = edm::limited::impl::EndProcessBlockProducer<edm::limited::EDFilterBase>;
0078       };
0079 
0080       template <>
0081       struct AbilityToImplementor<edm::BeginRunProducer> {
0082         using Type = edm::limited::impl::BeginRunProducer<edm::limited::EDFilterBase>;
0083       };
0084 
0085       template <>
0086       struct AbilityToImplementor<edm::EndRunProducer> {
0087         using Type = edm::limited::impl::EndRunProducer<edm::limited::EDFilterBase>;
0088       };
0089 
0090       template <>
0091       struct AbilityToImplementor<edm::BeginLuminosityBlockProducer> {
0092         using Type = edm::limited::impl::BeginLuminosityBlockProducer<edm::limited::EDFilterBase>;
0093       };
0094 
0095       template <>
0096       struct AbilityToImplementor<edm::EndLuminosityBlockProducer> {
0097         using Type = edm::limited::impl::EndLuminosityBlockProducer<edm::limited::EDFilterBase>;
0098       };
0099 
0100       template <>
0101       struct AbilityToImplementor<edm::Transformer> {
0102         using Type = edm::limited::impl::Transformer<edm::limited::EDFilterBase>;
0103       };
0104 
0105       template <bool, bool, typename T>
0106       struct SpecializeAbilityToImplementor {
0107         using Type = typename AbilityToImplementor<T>::Type;
0108       };
0109 
0110       template <bool B, typename C>
0111       struct SpecializeAbilityToImplementor<true, B, edm::RunSummaryCache<C>> {
0112         using Type = typename edm::limited::impl::EndRunSummaryProducer<edm::limited::EDFilterBase, C>;
0113       };
0114 
0115       template <bool B>
0116       struct SpecializeAbilityToImplementor<true, B, edm::EndRunProducer> {
0117         using Type = edm::limited::impl::EmptyType;
0118       };
0119 
0120       template <bool B, typename C>
0121       struct SpecializeAbilityToImplementor<B, true, edm::LuminosityBlockSummaryCache<C>> {
0122         using Type = typename edm::limited::impl::EndLuminosityBlockSummaryProducer<edm::limited::EDFilterBase, C>;
0123       };
0124 
0125       template <bool B>
0126       struct SpecializeAbilityToImplementor<B, true, edm::EndLuminosityBlockProducer> {
0127         using Type = edm::limited::impl::EmptyType;
0128       };
0129     }  // namespace filter
0130   }    // namespace limited
0131 }  // namespace edm
0132 
0133 #endif