13 typedef std::map<std::string,double> MAP ;
15 template <
unsigned int N>
16 inline MAP::const_iterator find
18 const std::string (&keys)[
N] )
20 for (
unsigned int i = 0 ;
i <
N ; ++
i )
22 MAP::const_iterator found = m.find ( keys[
i] ) ;
23 if ( m.end() != found ) {
return found ; }
28 const std::string s_X[] = {
"x" ,
"X" ,
"px" ,
"pX" ,
"Px" ,
"PX" } ;
29 const std::string s_Y[] = {
"y" ,
"Y" ,
"py" ,
"pY" ,
"Py" ,
"PY" } ;
30 const std::string s_Z[] = {
"z" ,
"Z" ,
"pz" ,
"pZ" ,
"Pz" ,
"PZ" } ;
31 const std::string s_E[] = {
"t" ,
"T" ,
"e" ,
"E" } ;
35 namespace Gaudi {
namespace Parsers {
36 template<
typename T1,
typename T2>
38 parse_(ROOT::Math::PositionVector3D<T1,T2>& result,
const std::string& input){
42 if (qi::phrase_parse( iter,
end, g, skipper, result)){
51 const std::string& input ) {
52 return parse_(result, input);
65 const std::string& input )
76 return parse_(result, input);
88 ( std::vector<Gaudi::XYZPoint>& result ,
89 const std::string& input )
92 return parse_(result, input);
103 ( std::vector<Gaudi::XYZVector>& result ,
104 const std::string& input )
107 return parse_(result, input);
120 ( std::vector<Gaudi::LorentzVector>& result ,
121 const std::string& input )
123 return parse_(result, input);