DD4hep - The AIDA detector description toolkit for high energy physics experiments
DD4hep  Rev:Unversioneddirectory
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Namespaces | Macros | Functions
Parsers.h File Reference
#include <string>
#include <vector>
#include <list>
#include <set>
#include <map>
#include <deque>
#include "Math/Point3D.h"
#include "Math/Vector3D.h"
#include "Math/Vector4D.h"

Go to the source code of this file.

Namespaces

 DD4hep
 Namespace for the AIDA detector description toolkit.
 
 DD4hep::Parsers
 Namespace for the AIDA detector for utilities using boost::spirit parsers.
 
 ROOT
 ROOT utility namespace. See http://root.cern.ch/root/htmldoc/ClassIndex.html.
 
 ROOT::Math
 ROOT namespace for mathematical operations and corresponding classes.
 

Macros

#define PARSERS_DECL_FOR_SINGLE(Type)   int parse(Type& result, const std::string& input);
 
#define PARSERS_DECL_FOR_PAIR(FirstType, SecondType)   int parse(std::pair<FirstType, SecondType >& result,const std::string& input);
 
#define PARSERS_DECL_FOR_LIST(InnerType)
 

Functions

int DD4hep::Parsers::parse (std::vector< std::pair< double, double > > &result, const std::string &input)
 parse the bool value More...
 
int DD4hep::Parsers::parse (std::vector< std::pair< int, int > > &result, const std::string &input)
 parse the std::vector<std::pair<int,int> > value More...
 
int DD4hep::Parsers::parse (std::vector< std::vector< std::string > > &result, const std::string &input)
 parse the std::vector<std::vector<std::string> > value More...
 
int DD4hep::Parsers::parse (std::vector< std::vector< double > > &result, const std::string &input)
 parse the std::vector<std::vector<double> > value More...
 
int DD4hep::Parsers::parse (std::map< int, int > &result, const std::string &input)
 parse the std::map<int , int> value More...
 
int DD4hep::Parsers::parse (std::map< int, double > &result, const std::string &input)
 parse the std::map<int , double> value More...
 
int DD4hep::Parsers::parse (std::map< std::string, std::string > &result, const std::string &input)
 parse the std::map<std::string , std::string> value More...
 
int DD4hep::Parsers::parse (std::map< std::string, int > &result, const std::string &input)
 parse the std::map<std::string , int> value More...
 
int DD4hep::Parsers::parse (std::map< std::string, double > &result, const std::string &input)
 parse the std::map<std::string , double> value More...
 
int DD4hep::Parsers::parse (std::map< std::string, std::vector< std::string > > &result, const std::string &input)
 parse the std::map<std::string , std::vector<std::string> > value More...
 
int DD4hep::Parsers::parse (std::map< std::string, std::vector< int > > &result, const std::string &input)
 parse the std::map<std::string , std::vector<int> > value More...
 
int DD4hep::Parsers::parse (std::map< std::string, std::vector< double > > &result, const std::string &input)
 parse the std::map<std::string , std::vector<double> > value More...
 
int DD4hep::Parsers::parse (std::map< int, std::string > &result, const std::string &input)
 parse the std::map<int,std::string> > objects More...
 
int DD4hep::Parsers::parse (std::string &name, std::string &value, const std::string &input)
 parse the std::map<unsigned int,std::string> > objects More...
 
int DD4hep::Parsers::parse (std::map< std::string, std::pair< double, double > > &params, const std::string &input)
 helper function, needed for implementation of map of pairs More...
 
template<class T , unsigned int N>
int DD4hep::Parsers::parse (T(&result)[N], const std::string &input)
 parser function for C-arrays More...
 
template<unsigned int N>
int DD4hep::Parsers::parse (char(&result)[N], const std::string &input)
 parser function for C-strings More...
 
bool ROOT::Math::operator< (const XYZPoint &a, const XYZPoint &b)
 Allow point insertion of a point in maps. More...
 
bool ROOT::Math::operator< (const XYZVector &a, const XYZVector &b)
 Allow 3-vector insertion of a in maps. More...
 
bool ROOT::Math::operator< (const PxPyPzEVector &a, const PxPyPzEVector &b)
 Allow 4-vector insertion of a in maps. More...
 
int DD4hep::Parsers::parse (ROOT::Math::XYZPoint &result, const std::string &input)
 parse 3D-point More...
 
int DD4hep::Parsers::parse (ROOT::Math::XYZVector &result, const std::string &input)
 parse 3D-vector More...
 
int DD4hep::Parsers::parse (ROOT::Math::PxPyPzEVector &result, const std::string &input)
 parse PxPyPzEVector More...
 

Detailed Description

The declaration of major parsing functions used e.g for (re)implementation of new extended properties see class Property These function also could be used in a different, much wider contex. all of them have the semantic: int parse ( TYPE& result , const std::string& input ) where input is the input string to be parsed, and result is the the result of parsing

const std::string input = ... ;
std::vector<std::string> result ;
// parse the input
int sc = parse ( result , input ) ;
if ( sc.isFailure() )
{
// error here ...
}
std::cout << "vector size " << result.size() << std::endl ;
See Also
DD4hep::Parsers::parse
Property
Author
Alexander MAZUROV Alexa.nosp@m.nder.nosp@m..Mazu.nosp@m.rov@.nosp@m.gmail.nosp@m..com
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-05-12

Definition in file Parsers.h.

Macro Definition Documentation

#define PARSERS_DECL_FOR_LIST (   InnerType)
Value:
int parse(std::vector<InnerType >& result,const std::string& input); \
int parse(std::list<InnerType >& result,const std::string& input); \
int parse(std::set<InnerType >& result,const std::string& input); \
int parse(std::map<std::string,InnerType >& result,const std::string& input); \
int parse(std::map<int,InnerType >& result,const std::string& input); \
int parse(std::pair<std::string,InnerType >& result,const std::string& input); \
int parse(std::pair<int,InnerType >& result,const std::string& input);
int parse(ROOT::Math::PxPyPzEVector &result, const std::string &input)
parse PxPyPzEVector

Definition at line 49 of file Parsers.h.

#define PARSERS_DECL_FOR_PAIR (   FirstType,
  SecondType 
)    int parse(std::pair<FirstType, SecondType >& result,const std::string& input);

Definition at line 31 of file Parsers.h.

#define PARSERS_DECL_FOR_SINGLE (   Type)    int parse(Type& result, const std::string& input);

Definition at line 28 of file Parsers.h.