diff --git a/fairmq/options/FairMQParser.cxx b/fairmq/options/FairMQParser.cxx index 5d6720ac..4d9df510 100644 --- a/fairmq/options/FairMQParser.cxx +++ b/fairmq/options/FairMQParser.cxx @@ -28,7 +28,8 @@ FairMQMap ptreeToMQMap(const boost::property_tree::ptree& pt, const string& id, { // Create fair mq map FairMQMap channelMap; - // helper::PrintDeviceList(pt.get_child(rootNode)); + //Helper::PrintPropertyTree(pt); + //Helper::PrintDeviceList(pt.get_child(rootNode), formatFlag); // Extract value from boost::property_tree Helper::DeviceParser(pt.get_child(rootNode), channelMap, id, formatFlag); @@ -433,6 +434,14 @@ void SocketParser(const boost::property_tree::ptree& tree, vector } } +void PrintPropertyTree(const boost::property_tree::ptree& tree, int level) +{ + for (const auto& p : tree) { + std::cout << std::setw(level+1) << level << ": " << p.first << " " << p.second.get_value() << std::endl; + PrintPropertyTree(p.second.get_child(""), level + 1); + } +} + } // Helper namespace } // FairMQParser namespace diff --git a/fairmq/options/FairMQParser.h b/fairmq/options/FairMQParser.h index 7b17212d..575946be 100644 --- a/fairmq/options/FairMQParser.h +++ b/fairmq/options/FairMQParser.h @@ -43,6 +43,7 @@ void PrintDeviceList(const boost::property_tree::ptree& tree, const std::string& void DeviceParser(const boost::property_tree::ptree& tree, FairMQMap& channelMap, const std::string& deviceId, const std::string& formatFlag); void ChannelParser(const boost::property_tree::ptree& tree, FairMQMap& channelMap, const std::string& formatFlag); void SocketParser(const boost::property_tree::ptree& tree, std::vector& channelList, const std::string& channelName, const FairMQChannel& commonChannel); +void PrintPropertyTree(const boost::property_tree::ptree& tree, int level = 0); } // Helper namespace