mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 09:31:45 +00:00
- FairMQ options:
a) move the XML parser into the FairMQ/options/FairMQParser.h b) add a routine in FairMQProgOption to check whether the necessary XML or JSON input files are there, and send an error message if not there - Policy based devices: a) rename GenericSampler to base_GenericSampler and use an alias template named GenericSampler b) in base_GenericSampler, rename template parameter to simple variables <T,U,… > and use typedef for clarity c) introduce an anonymous function container in the base_GenericSampler host class with a register task template member function and an Executetasks() d) add two new template parameters in base_GenericSampler for the anonymous function container map. parameter is K for the key type (default=int) and L for the value type (default=std::function<void()>) - Tutorial7: a) use FairMQProgOption to configure devices in tutorial7 b) introduce several template functions helper in tutorial7 to reduce code redundancy c) show examples in tutorial7 of task registration with callback and lambda expression for the sampler devices d) separate the executable build of the tutorial7 data generator to remove the Roofit banner when executing the MQdevices
This commit is contained in:
committed by
Mohammad Al-Turany
parent
6ed9cc3da1
commit
d1bba61939
@@ -14,7 +14,7 @@
|
||||
|
||||
#include "FairMQParser.h"
|
||||
#include "FairMQLogger.h"
|
||||
|
||||
#include <boost/property_tree/xml_parser.hpp>
|
||||
// WARNING : pragma commands to hide boost (1.54.0) warning
|
||||
// TODO : remove these pragma commands when boost will fix this issue in future release
|
||||
#pragma clang diagnostic push
|
||||
@@ -188,4 +188,22 @@ FairMQMap JSON::UserParser(std::stringstream& input, const std::string& deviceId
|
||||
return ptreeToMQMap(pt, deviceId, rootNode,"json");
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
FairMQMap XML::UserParser(const std::string& filename, const std::string& deviceId, const std::string& rootNode)
|
||||
{
|
||||
boost::property_tree::ptree pt;
|
||||
boost::property_tree::read_xml(filename, pt);
|
||||
return ptreeToMQMap(pt,deviceId,rootNode,"xml");
|
||||
}
|
||||
|
||||
FairMQMap XML::UserParser(std::stringstream& input, const std::string& deviceId, const std::string& rootNode)
|
||||
{
|
||||
boost::property_tree::ptree pt;
|
||||
boost::property_tree::read_xml(input, pt);
|
||||
return ptreeToMQMap(pt,deviceId,rootNode,"xml");
|
||||
}
|
||||
|
||||
|
||||
|
||||
} // end FairMQParser namespace
|
Reference in New Issue
Block a user