mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 09:31:45 +00:00
Enable new callback API
- OnData() channel data handler. - ConditionalRun() for devices without incoming data. - Header file with common main(), to be extended with getDevice/addCustomOptions. - Update examples (MQ/Tutorial3) to use the new API and config. - NewSimpleMessage() for simpler creation of small messages (additional copy). - Replace SetProperty/GetProperty with fConfig access. - Runtime configurable channel names for common devices. - Configurable logging interval per channel. - FairMQMultiplier for distributing same data to multiple outputs. - Cleanup state machine messages. - Cmd option to toggle signal handling. - Simpler API for send/receive timeouts. - Enable --log-to-file. - Fix coverity issues, warnings. - Various code cleanup and minor tweaks.
This commit is contained in:
@@ -20,13 +20,10 @@
|
||||
#include <map>
|
||||
#include <set>
|
||||
|
||||
|
||||
#include "FairProgOptions.h"
|
||||
#include "FairMQEventManager.h"
|
||||
#include "FairMQChannel.h"
|
||||
|
||||
|
||||
|
||||
class FairMQProgOptions : public FairProgOptions , public FairMQEventManager
|
||||
{
|
||||
protected:
|
||||
@@ -98,7 +95,7 @@ class FairMQProgOptions : public FairProgOptions , public FairMQEventManager
|
||||
{
|
||||
|
||||
|
||||
if(!fairmq::is_this_type<std::string>(fVarMap.at(key)))
|
||||
if(!FairMQ::is_this_type<std::string>(fVarMap.at(key)))
|
||||
{
|
||||
LOG(ERROR) << "You try to update a value as string (for key="<< key <<") while it has been defined with a different type in the option description.";
|
||||
abort();
|
||||
@@ -238,9 +235,6 @@ class FairMQProgOptions : public FairProgOptions , public FairMQEventManager
|
||||
std::string fHelpTitle;
|
||||
std::string fVersion;
|
||||
|
||||
|
||||
|
||||
|
||||
bool EventKeyFound(const std::string& key)
|
||||
{
|
||||
if (
|
||||
@@ -251,8 +245,6 @@ class FairMQProgOptions : public FairProgOptions , public FairMQEventManager
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
typedef std::tuple<std::string,int,std::string> MQKey;//store key info
|
||||
std::map<std::string,MQKey> fMQKeyMap;// key=full path - val=key info
|
||||
|
||||
@@ -264,9 +256,7 @@ class FairMQProgOptions : public FairProgOptions , public FairMQEventManager
|
||||
void UpdateMQValues();
|
||||
int Store(const FairMQMap& channels);
|
||||
|
||||
|
||||
private:
|
||||
|
||||
/*
|
||||
// string API
|
||||
std::map<std::string, signal_type_ptr > fSignalMap;
|
||||
@@ -299,6 +289,4 @@ class FairMQProgOptions : public FairProgOptions , public FairMQEventManager
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
#endif /* FAIRMQPROGOPTIONS_H */
|
||||
|
||||
|
Reference in New Issue
Block a user