Refactor the examples after move from FairRoot

This commit is contained in:
Alexey Rybalchenko
2018-04-26 23:06:01 +02:00
committed by Mohammad Al-Turany
parent 31cba0515e
commit bab7e13737
148 changed files with 1582 additions and 2027 deletions

View File

@@ -31,8 +31,8 @@ FairMQMap ptreeToMQMap(const boost::property_tree::ptree& pt, const string& id,
{
// Create fair mq map
FairMQMap channelMap;
//Helper::PrintPropertyTree(pt);
//Helper::PrintDeviceList(pt.get_child(rootNode));
// boost::property_tree::json_parser::write_json(std::cout, pt);
// Helper::PrintDeviceList(pt.get_child(rootNode));
// Extract value from boost::property_tree
Helper::DeviceParser(pt.get_child(rootNode), channelMap, id);
@@ -93,8 +93,6 @@ void DeviceParser(const boost::property_tree::ptree& tree, FairMQMap& channelMap
{
string deviceIdKey;
LOG(debug) << "Looking for '" << deviceId << "' id/key in the provided config file...";
// For each node in fairMQOptions
for (const auto& p : tree)
{
@@ -122,7 +120,7 @@ void DeviceParser(const boost::property_tree::ptree& tree, FairMQMap& channelMap
continue;
}
LOG(debug) << "Found with following channels:";
LOG(debug) << "Found following channels for device ID '" << deviceId << "' :";
ChannelParser(q.second, channelMap);
}
@@ -260,14 +258,6 @@ void SocketParser(const boost::property_tree::ptree& tree, vector<FairMQChannel>
}
}
void PrintPropertyTree(const boost::property_tree::ptree& tree, int level)
{
for (const auto& p : tree) {
cout << setw(level+1) << level << ": " << p.first << " " << p.second.get_value<string>() << endl;
PrintPropertyTree(p.second.get_child(""), level + 1);
}
}
} // Helper namespace
} // namespace parser