mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-13 00:31:14 +00:00
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 |
||
---|---|---|
.. | ||
FairMQTools.h | ||
README.md |
FairMQ Tools
Contains common tools for use by FairMQ and/or users.
FairMQ::tools::getHostIPs
Fills a map with the network interfaces and their IP addresses available on the current host.
Example usage
#include <map>
#include <string>
#include <iostream>
#include "FairMQTools.h"
void main()
{
std::map<string,string> IPs;
FairMQ::tools::getHostIPs(IPs);
for (std::map<string,string>::iterator it = IPs.begin(); it != IPs.end(); ++it)
{
std::cout << it->first << ": " << it->second << std::endl;
}
}
Example Output
eth0: 123.123.1.123
ib0: 123.123.2.123
lo: 127.0.0.1