1 #include "artdaq/ExternalComms/MakeCommanderPlugin.hh"
2 #include "artdaq-core/Utilities/ExceptionHandler.hh"
4 #include "cetlib/BasicPluginFactory.h"
5 #include "fhiclcpp/ParameterSet.h"
10 std::unique_ptr<artdaq::CommanderInterface>
14 static cet::BasicPluginFactory bpf(
"commander",
"make");
19 bpf.makePlugin<std::unique_ptr<CommanderInterface>,
20 const fhicl::ParameterSet&,
22 commander_pset.get<std::string>(
"commanderPluginType"),
30 std::stringstream errmsg;
32 <<
"Unable to create commander plugin using the FHiCL parameters \""
33 << commander_pset.to_string()
35 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.