File indexing completed on 2024-09-07 04:36:22
0001 #ifndef FWCore_Framework_stream_makeGlobal_h
0002 #define FWCore_Framework_stream_makeGlobal_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021 #include <memory>
0022
0023 #include "FWCore/Framework/interface/stream/dummy_helpers.h"
0024
0025 namespace edm {
0026 class ParameterSet;
0027 namespace stream {
0028 namespace impl {
0029 template <typename T, typename G>
0030 std::unique_ptr<G> makeGlobal(edm::ParameterSet const& iPSet, G const*) {
0031 return T::initializeGlobalCache(iPSet);
0032 }
0033 template <typename T>
0034 dummy_ptr makeGlobal(edm::ParameterSet const& iPSet, void const*) {
0035 return dummy_ptr();
0036 }
0037
0038 template <typename T, typename G>
0039 T* makeStreamModule(edm::ParameterSet const& iPSet, G const* iGlobal) {
0040 return new T(iPSet, iGlobal);
0041 }
0042
0043 template <typename T>
0044 T* makeStreamModule(edm::ParameterSet const& iPSet, void const*) {
0045 return new T(iPSet);
0046 }
0047
0048 template <typename G>
0049 inline std::unique_ptr<G> makeInputProcessBlockCacheImpl(G const*) {
0050 return std::make_unique<G>();
0051 }
0052
0053 inline dummy_ptr makeInputProcessBlockCacheImpl(void const*) { return dummy_ptr(); }
0054
0055 }
0056 }
0057 }
0058 #endif