1 #include "artdaq/ExternalComms/MakeCommanderPlugin.hh"
2 #include "artdaq-core/Utilities/ExceptionHandler.hh"
4 #include "cetlib/BasicPluginFactory.h"
5 #include "fhiclcpp/ParameterSet.h"
11 std::unique_ptr<artdaq::CommanderInterface>
15 static cet::BasicPluginFactory bpf(
"commander",
"make");
20 bpf.makePlugin<std::unique_ptr<CommanderInterface>,
21 const fhicl::ParameterSet&,
23 commander_pset.get<std::string>(
"commanderPluginType"),
27 return std::move(commander);
31 std::stringstream errmsg;
33 <<
"Unable to create commander plugin using the FHiCL parameters \""
34 << commander_pset.to_string()
36 ExceptionHandler(ExceptionHandlerRethrow::yes, errmsg.str());
Commandable is the base class for all artdaq components which implement the artdaq state machine...
std::unique_ptr< artdaq::CommanderInterface > MakeCommanderPlugin(const fhicl::ParameterSet &commander_pset, artdaq::Commandable &commandable)
Load a CommanderInterface plugin.