artdaq_core
3.09.12
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 {
7
class
ParameterSet;
8
}
9
10
#include <memory>
11
#include "cetlib/compiler_macros.h"
12
13
namespace
artdaq {
19
typedef
std::unique_ptr<artdaq::FragmentGenerator>
makeFunc_t
(fhicl::ParameterSet
const
& ps);
20
}
// namespace artdaq
21
22
#ifndef EXTERN_C_FUNC_DECLARE_START
23
#define EXTERN_C_FUNC_DECLARE_START extern "C" {
24
#endif
25
26
#define DEFINE_ARTDAQ_GENERATOR(klass) \
27
\
32
EXTERN_C_FUNC_DECLARE_START \
33
std::unique_ptr<artdaq::FragmentGenerator> \
34
make(fhicl::ParameterSet const& ps) \
35
{ \
36
return std::unique_ptr<artdaq::FragmentGenerator>(new klass(ps)); \
37
} \
38
}
39
40
#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:19
src
artdaq-core
Plugins
GeneratorMacros.hh
Generated on Tue May 30 2023 16:45:24 for artdaq_core by
1.8.5