artdaq_core  v3_01_04
makeFragmentGenerator.cc
1 #include "artdaq-core/Generators/makeFragmentGenerator.hh"
2 
3 #include "artdaq-core/Generators/GeneratorMacros.hh"
4 #include "fhiclcpp/ParameterSet.h"
5 #include "cetlib/BasicPluginFactory.h"
6 
7 std::unique_ptr<artdaq::FragmentGenerator>
8 artdaq::makeFragmentGenerator(std::string const& generator_plugin_spec,
9  fhicl::ParameterSet const& ps)
10 {
11  static cet::BasicPluginFactory bpf("generator", "make");
12 
13  return bpf.makePlugin<std::unique_ptr<artdaq::FragmentGenerator>,
14  fhicl::ParameterSet const &>(generator_plugin_spec, ps);
15 }
std::unique_ptr< FragmentGenerator > makeFragmentGenerator(std::string const &generator_plugin_spec, fhicl::ParameterSet const &ps)
Instantiates the FragmentGenerator plugin with the given name, using the given ParameterSet.