00001 #ifndef artdaq_Application_Routing_PolicyMacros_hh
00002 #define artdaq_Application_Routing_PolicyMacros_hh
00003
00004 #include "artdaq/Application/Routing/RoutingMasterPolicy.hh"
00005 #include "fhiclcpp/fwd.h"
00006 #include "cetlib/compiler_macros.h"
00007
00008 #include <memory>
00009
00010 namespace artdaq
00011 {
00017 typedef std::unique_ptr<artdaq::RoutingMasterPolicy> makeFunc_t(fhicl::ParameterSet const& ps);
00018 }
00019
00020 #ifndef EXTERN_C_FUNC_DECLARE_START
00021 #define EXTERN_C_FUNC_DECLARE_START extern "C" {
00022 #endif
00023
00024 #define DEFINE_ARTDAQ_ROUTING_POLICY(klass) \
00025 EXTERN_C_FUNC_DECLARE_START \
00026 std::unique_ptr<artdaq::RoutingMasterPolicy> \
00027 make(fhicl::ParameterSet const & ps) { \
00028 return std::unique_ptr<artdaq::RoutingMasterPolicy>(new klass(ps)); \
00029 }}
00030
00031 #endif