9 #ifndef FAIR_MQ_DEVICERUNNER_H
10 #define FAIR_MQ_DEVICERUNNER_H
12 #include <fairmq/EventManager.h>
13 #include <fairmq/PluginManager.h>
14 #include <fairmq/ProgOptions.h>
15 #include <FairMQDevice.h>
53 DeviceRunner(
int argc,
char*
const* argv,
bool printLogo =
true);
56 auto RunWithExceptionHandlers() -> int;
60 void SubscribeForConfigChange();
61 void UnsubscribeFromConfigChange();
64 auto AddHook(std::function<
void(
DeviceRunner&)> hook) ->
void
66 fEvents.Subscribe<H>(
"runner", hook);
69 auto RemoveHook() ->
void
71 fEvents.Unsubscribe<H>(
"runner");
74 std::vector<std::string> fRawCmdLineArgs;
76 std::unique_ptr<FairMQDevice> fDevice;
77 PluginManager fPluginManager;
78 const bool fPrintLogo;
85 struct LoadPlugins : Event<DeviceRunner&> {};
86 struct SetCustomCmdLineOptions : Event<DeviceRunner&> {};
87 struct ModifyRawCmdLineArgs : Event<DeviceRunner&> {};
88 struct InstantiateDevice : Event<DeviceRunner&> {};