00001 #ifndef artdaq_Application_GeneratorMacros_hh
00002 #define artdaq_Application_GeneratorMacros_hh
00003
00004 #include "artdaq/Application/CommandableFragmentGenerator.hh"
00005 #include "fhiclcpp/fwd.h"
00006
00007 #include <memory>
00008
00009 namespace artdaq
00010 {
00016 typedef std::unique_ptr<artdaq::CommandableFragmentGenerator> makeFunc_t(fhicl::ParameterSet const& ps);
00017 }
00018
00019 #define DEFINE_ARTDAQ_COMMANDABLE_GENERATOR(klass) \
00020 extern "C" \
00021 std::unique_ptr<artdaq::CommandableFragmentGenerator> \
00022 make(fhicl::ParameterSet const & ps) { \
00023 return std::unique_ptr<artdaq::CommandableFragmentGenerator>(new klass(ps)); \
00024 }
00025
00026 #endif