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 typedef std::unique_ptr<artdaq::FragmentGenerator>
00011 (makeFunc_t) (fhicl::ParameterSet const & ps);
00012 }
00013
00014 #define DEFINE_ARTDAQ_GENERATOR(klass) \
00015 extern "C" \
00016 std::unique_ptr<artdaq::FragmentGenerator> \
00017 make(fhicl::ParameterSet const & ps) { \
00018 return std::unique_ptr<artdaq::FragmentGenerator>(new klass(ps)); \
00019 }
00020
00021 #endif