artdaq_core
v3_09_00
Return to top level
Main Page
Related Pages
Namespaces
Classes
Files
File List
GeneratorMacros.hh
1
#ifndef artdaq_core_Plugins_GeneratorMacros_hh
2
#define artdaq_core_Plugins_GeneratorMacros_hh
3
4
#include "artdaq-core/Plugins/FragmentGenerator.hh"
5
6
namespace
fhicl {
class
ParameterSet; }
7
8
#include <memory>
9
#include "cetlib/compiler_macros.h"
10
11
namespace
artdaq {
17
typedef
std::unique_ptr<artdaq::FragmentGenerator>
makeFunc_t
(fhicl::ParameterSet
const
& ps);
18
}
// namespace artdaq
19
20
#ifndef EXTERN_C_FUNC_DECLARE_START
21
#define EXTERN_C_FUNC_DECLARE_START extern "C" {
22
#endif
23
24
#define DEFINE_ARTDAQ_GENERATOR(klass) \
25
\
30
EXTERN_C_FUNC_DECLARE_START \
31
std::unique_ptr<artdaq::FragmentGenerator> \
32
make(fhicl::ParameterSet const& ps) \
33
{ \
34
return std::unique_ptr<artdaq::FragmentGenerator>(new klass(ps)); \
35
} \
36
}
37
38
#endif
/* artdaq_core_Plugins_GeneratorMacros_hh */
artdaq::makeFunc_t
std::unique_ptr< artdaq::FragmentGenerator > makeFunc_t(fhicl::ParameterSet const &ps)
Constructs a FragmentGenerator instance, and returns a pointer to it.
Definition:
GeneratorMacros.hh:17
src
artdaq-core
Plugins
GeneratorMacros.hh
Generated on Sat Jul 16 2022 12:22:16 for artdaq_core by
1.8.5