move fairmq json parser to fairmq/options

This commit is contained in:
winckler
2015-06-15 15:55:11 +02:00
parent f54fbb0f59
commit a2ebbbe450
6 changed files with 150 additions and 106 deletions

View File

@@ -0,0 +1,38 @@
/*
* File: FairMQParser.h
* Author: winckler
*
* Created on May 14, 2015, 5:01 PM
*/
#ifndef FAIRMQPARSER_H
#define FAIRMQPARSER_H
// FairRoot
#include "FairMQChannel.h"
// Boost
#include <boost/property_tree/ptree.hpp>
// std
#include <string>
#include <vector>
#include <map>
namespace FairMQParser
{
typedef std::map<std::string, std::vector<FairMQChannel> > FairMQMap;
FairMQMap ptreeToMQMap(const boost::property_tree::ptree& pt, const std::string& device_id, const std::string& root_node, const std::string& format_flag="json");
struct JSON
{
FairMQMap UserParser(const std::string& filename, const std::string& device_id, const std::string& root_node="fairMQOptions");
FairMQMap UserParser(std::stringstream& input_ss, const std::string& device_id, const std::string& root_node="fairMQOptions");
};
} // end FairMQParser namespace
#endif /* FAIRMQPARSER_H */