otsdaq  v2_05_02_indev
InterfacePluginMacros.h
1 #ifndef _ots_InterfacePluginMacro_h_
2 #define _ots_InterfacePluginMacro_h_
3 
4 #include <memory>
5 #include "otsdaq/FECore/FEVInterface.h"
6 #include "cetlib/compiler_macros.h"
7 
8 #ifndef EXTERN_C_FUNC_DECLARE_START
9 #define EXTERN_C_FUNC_DECLARE_START extern "C" {
10 #endif
11 
12 #define DEFINE_OTS_INTERFACE(klass) \
13  EXTERN_C_FUNC_DECLARE_START \
14 std::unique_ptr<ots::FEVInterface> make( \
15  const std::string& interfaceUID, const ots::ConfigurationTree& configurationTree, const std::string& pathToInterfaceConfiguration) \
16  { \
17  return std::unique_ptr<ots::FEVInterface>(new klass(interfaceUID, configurationTree, pathToInterfaceConfiguration)); \
18  } }
19 
20 #endif /* _ots_InterfacePluginMacro_h_ */