File indexing completed on 2024-04-06 12:12:00
0001 #ifndef FWCore_Framework_stream_EDFilterAdaptor_h
0002 #define FWCore_Framework_stream_EDFilterAdaptor_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/stream/EDFilterAdaptorBase.h"
0025 #include "FWCore/Framework/interface/stream/ProducingModuleAdaptor.h"
0026 #include "FWCore/Framework/interface/maker/MakeModuleHelper.h"
0027
0028
0029
0030 namespace edm {
0031 namespace stream {
0032
0033 template <typename T>
0034 using EDFilterAdaptor = ProducingModuleAdaptor<T, EDFilterBase, EDFilterAdaptorBase>;
0035
0036 template <typename ABase, typename ModType>
0037 struct BaseToAdaptor;
0038
0039 template <typename ModType>
0040 struct BaseToAdaptor<EDFilterAdaptorBase, ModType> {
0041 typedef EDFilterAdaptor<ModType> Type;
0042 };
0043 }
0044
0045 template <>
0046 class MakeModuleHelper<edm::stream::EDFilterAdaptorBase> {
0047 typedef edm::stream::EDFilterAdaptorBase Base;
0048
0049 public:
0050 template <typename ModType>
0051 static std::unique_ptr<Base> makeModule(ParameterSet const& pset) {
0052 typedef typename stream::BaseToAdaptor<Base, ModType>::Type Adaptor;
0053 auto module = std::make_unique<Adaptor>(pset);
0054 return std::unique_ptr<Base>(module.release());
0055 }
0056 };
0057
0058 }
0059
0060 #endif