FairMQ  1.4.33
C++ Message Queuing Library and Framework
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
fair::mq::DeviceRunner Class Reference

Utility class to facilitate a convenient top-level device launch/shutdown. More...

#include <fairmq/DeviceRunner.h>

Collaboration diagram for fair::mq::DeviceRunner:
Collaboration graph
[legend]

Public Member Functions

 DeviceRunner (int argc, char *const *argv, bool printLogo=true)
 
auto Run () -> int
 
auto RunWithExceptionHandlers () -> int
 
void SubscribeForConfigChange ()
 
void UnsubscribeFromConfigChange ()
 
template<typename H >
auto AddHook (std::function< void(DeviceRunner &)> hook) -> void
 
template<typename H >
auto RemoveHook () -> void
 

Static Public Member Functions

static bool HandleGeneralOptions (const fair::mq::ProgOptions &config, bool printLogo=true)
 

Public Attributes

std::vector< std::string > fRawCmdLineArgs
 
fair::mq::ProgOptions fConfig
 
std::unique_ptr< FairMQDevicefDevice
 
PluginManager fPluginManager
 
const bool fPrintLogo
 

Detailed Description

Utility class to facilitate a convenient top-level device launch/shutdown.

Runs a single FairMQ device with config and plugin support.

For customization user hooks are executed at various steps during device launch/shutdown in the following sequence:

    LoadPlugins
         |
         v

SetCustomCmdLineOptions | v ModifyRawCmdLineArgs | v InstatiateDevice

Each hook has access to all members of the DeviceRunner and really only differs by the point in time it is called.

For an example usage of this class see the fairmq/runFairMQDevice.h header.


The documentation for this class was generated from the following files:

privacy