00001 #ifndef artdaq_core_Generators_GeneratorMacros_hh
00002 #define artdaq_core_Generators_GeneratorMacros_hh
00003
00004 #include "artdaq-core/Generators/FragmentGenerator.hh"
00005 #include "fhiclcpp/fwd.h"
00006
00007 #include <memory>
00008
00009 namespace artdaq
00010 {
00016 typedef std::unique_ptr<artdaq::FragmentGenerator> makeFunc_t(fhicl::ParameterSet const& ps);
00017 }
00018
00019 #define DEFINE_ARTDAQ_GENERATOR(klass) \
00020 \
00025 extern "C" \
00026 std::unique_ptr<artdaq::FragmentGenerator> \
00027 make(fhicl::ParameterSet const & ps) { \
00028 return std::unique_ptr<artdaq::FragmentGenerator>(new klass(ps)); \
00029 }
00030
00031 #endif