\hypertarget{_parsers_8h}{\section{/opt/ilcsoft/\-H\-E\-A\-D-\/2016-\/12-\/02/\-D\-D4hep/\-H\-E\-A\-D/\-D\-D\-Core/include/\-D\-D4hep/\-Parsers.h File Reference}
\label{_parsers_8h}\index{/opt/ilcsoft/\-H\-E\-A\-D-\/2016-\/12-\/02/\-D\-D4hep/\-H\-E\-A\-D/\-D\-D\-Core/include/\-D\-D4hep/\-Parsers.\-h@{/opt/ilcsoft/\-H\-E\-A\-D-\/2016-\/12-\/02/\-D\-D4hep/\-H\-E\-A\-D/\-D\-D\-Core/include/\-D\-D4hep/\-Parsers.\-h}}
}
{\ttfamily \#include $<$string$>$}\\*
{\ttfamily \#include $<$vector$>$}\\*
{\ttfamily \#include $<$list$>$}\\*
{\ttfamily \#include $<$set$>$}\\*
{\ttfamily \#include $<$map$>$}\\*
{\ttfamily \#include $<$deque$>$}\\*
{\ttfamily \#include \char`\"{}Math/\-Point3\-D.\-h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}Math/\-Vector3\-D.\-h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}Math/\-Vector4\-D.\-h\char`\"{}}\\*
\subsection*{Namespaces}
\begin{DoxyCompactItemize}
\item 
\hyperlink{namespace_d_d4hep}{D\-D4hep}
\begin{DoxyCompactList}\small\item\em Namespace for the A\-I\-D\-A detector description toolkit. \end{DoxyCompactList}\item 
\hyperlink{namespace_d_d4hep_1_1_parsers}{D\-D4hep\-::\-Parsers}
\begin{DoxyCompactList}\small\item\em Namespace for the A\-I\-D\-A detector for utilities using boost\-::spirit parsers. \end{DoxyCompactList}\item 
\hyperlink{namespace_r_o_o_t}{R\-O\-O\-T}
\begin{DoxyCompactList}\small\item\em \hyperlink{namespace_r_o_o_t}{R\-O\-O\-T} utility namespace. See \href{http://root.cern.ch/root/htmldoc/ClassIndex.html}{\tt http\-://root.\-cern.\-ch/root/htmldoc/\-Class\-Index.\-html}. \end{DoxyCompactList}\item 
\hyperlink{namespace_r_o_o_t_1_1_math}{R\-O\-O\-T\-::\-Math}
\begin{DoxyCompactList}\small\item\em \hyperlink{namespace_r_o_o_t}{R\-O\-O\-T} namespace for mathematical operations and corresponding classes. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \hyperlink{_parsers_8h_aaad5c3d9836c2d4f1dd6c2beb3b0ae15}{P\-A\-R\-S\-E\-R\-S\-\_\-\-D\-E\-C\-L\-\_\-\-F\-O\-R\-\_\-\-S\-I\-N\-G\-L\-E}(Type)~int parse(Type\& result, const std\-::string\& input);
\item 
\#define \hyperlink{_parsers_8h_ac61de44fff5326d23703542c2dc8275c}{P\-A\-R\-S\-E\-R\-S\-\_\-\-D\-E\-C\-L\-\_\-\-F\-O\-R\-\_\-\-P\-A\-I\-R}(First\-Type, Second\-Type)~int parse(std\-::pair$<$First\-Type, Second\-Type $>$\& result,const std\-::string\& input);
\item 
\#define \hyperlink{_parsers_8h_ad77e87ad9e71918448bd8aa4f6aab716}{P\-A\-R\-S\-E\-R\-S\-\_\-\-D\-E\-C\-L\-\_\-\-F\-O\-R\-\_\-\-L\-I\-S\-T}(Inner\-Type)
\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
int \hyperlink{namespace_d_d4hep_1_1_parsers_ad0d0bfb1ee52c6c6fe6000325562b1fa}{D\-D4hep\-::\-Parsers\-::parse} (std\-::vector$<$ std\-::pair$<$ double, double $>$ $>$ \&result, const std\-::string \&input)
\begin{DoxyCompactList}\small\item\em parse the {\ttfamily bool} value \end{DoxyCompactList}\item 
int \hyperlink{namespace_d_d4hep_1_1_parsers_a300ef2062786116541bef473b809ee22}{D\-D4hep\-::\-Parsers\-::parse} (std\-::vector$<$ std\-::pair$<$ int, int $>$ $>$ \&result, const std\-::string \&input)
\begin{DoxyCompactList}\small\item\em parse the {\ttfamily std\-::vector$<$std\-::pair$<$int,int$>$ $>$} value \end{DoxyCompactList}\item 
int \hyperlink{namespace_d_d4hep_1_1_parsers_afd6bbff0d1fc52ec885e45126f670506}{D\-D4hep\-::\-Parsers\-::parse} (std\-::vector$<$ std\-::vector$<$ std\-::string $>$ $>$ \&result, const std\-::string \&input)
\begin{DoxyCompactList}\small\item\em parse the {\ttfamily std\-::vector$<$std\-::vector$<$std\-::string$>$ $>$} value \end{DoxyCompactList}\item 
int \hyperlink{namespace_d_d4hep_1_1_parsers_aaec3e97d2c62b4ca583b113b7c55e44c}{D\-D4hep\-::\-Parsers\-::parse} (std\-::vector$<$ std\-::vector$<$ double $>$ $>$ \&result, const std\-::string \&input)
\begin{DoxyCompactList}\small\item\em parse the {\ttfamily std\-::vector$<$std\-::vector$<$double$>$ $>$} value \end{DoxyCompactList}\item 
int \hyperlink{namespace_d_d4hep_1_1_parsers_ac82777050fc05e43dcd2e5fa4648cfb5}{D\-D4hep\-::\-Parsers\-::parse} (std\-::map$<$ int, int $>$ \&result, const std\-::string \&input)
\begin{DoxyCompactList}\small\item\em parse the {\ttfamily std\-::map$<$int , int$>$} value \end{DoxyCompactList}\item 
int \hyperlink{namespace_d_d4hep_1_1_parsers_a948c73c7e48e93c657c717952295ce22}{D\-D4hep\-::\-Parsers\-::parse} (std\-::map$<$ int, double $>$ \&result, const std\-::string \&input)
\begin{DoxyCompactList}\small\item\em parse the {\ttfamily std\-::map$<$int , double$>$} value \end{DoxyCompactList}\item 
int \hyperlink{namespace_d_d4hep_1_1_parsers_a5c68b3129b287e0e4c0a8aa6c97224d2}{D\-D4hep\-::\-Parsers\-::parse} (std\-::map$<$ std\-::string, std\-::string $>$ \&result, const std\-::string \&input)
\begin{DoxyCompactList}\small\item\em parse the {\ttfamily std\-::map$<$std\-::string , std\-::string$>$} value \end{DoxyCompactList}\item 
int \hyperlink{namespace_d_d4hep_1_1_parsers_a0bb67dd0bd4f1932c18d9fdf190b0387}{D\-D4hep\-::\-Parsers\-::parse} (std\-::map$<$ std\-::string, int $>$ \&result, const std\-::string \&input)
\begin{DoxyCompactList}\small\item\em parse the {\ttfamily std\-::map$<$std\-::string , int$>$} value \end{DoxyCompactList}\item 
int \hyperlink{namespace_d_d4hep_1_1_parsers_a3bb4178f3175f409b144ff5629463c14}{D\-D4hep\-::\-Parsers\-::parse} (std\-::map$<$ std\-::string, double $>$ \&result, const std\-::string \&input)
\begin{DoxyCompactList}\small\item\em parse the {\ttfamily std\-::map$<$std\-::string , double$>$} value \end{DoxyCompactList}\item 
int \hyperlink{namespace_d_d4hep_1_1_parsers_a010112afc7cbf060b08876d5d4dee7d5}{D\-D4hep\-::\-Parsers\-::parse} (std\-::map$<$ std\-::string, std\-::vector$<$ std\-::string $>$ $>$ \&result, const std\-::string \&input)
\begin{DoxyCompactList}\small\item\em parse the {\ttfamily std\-::map$<$std\-::string , std\-::vector$<$std\-::string$>$ $>$} value \end{DoxyCompactList}\item 
int \hyperlink{namespace_d_d4hep_1_1_parsers_a0da3b1bf74df4603de3860725652b1f7}{D\-D4hep\-::\-Parsers\-::parse} (std\-::map$<$ std\-::string, std\-::vector$<$ int $>$ $>$ \&result, const std\-::string \&input)
\begin{DoxyCompactList}\small\item\em parse the {\ttfamily std\-::map$<$std\-::string , std\-::vector$<$int$>$ $>$} value \end{DoxyCompactList}\item 
int \hyperlink{namespace_d_d4hep_1_1_parsers_a117aacde08a7caa18db156f5871ad9cf}{D\-D4hep\-::\-Parsers\-::parse} (std\-::map$<$ std\-::string, std\-::vector$<$ double $>$ $>$ \&result, const std\-::string \&input)
\begin{DoxyCompactList}\small\item\em parse the {\ttfamily std\-::map$<$std\-::string , std\-::vector$<$double$>$ $>$} value \end{DoxyCompactList}\item 
int \hyperlink{namespace_d_d4hep_1_1_parsers_a3d922ac85001241814312a94a6ccdbc3}{D\-D4hep\-::\-Parsers\-::parse} (std\-::map$<$ int, std\-::string $>$ \&result, const std\-::string \&input)
\begin{DoxyCompactList}\small\item\em parse the {\ttfamily std\-::map$<$int,std\-::string$>$ $>$} objects \end{DoxyCompactList}\item 
int \hyperlink{namespace_d_d4hep_1_1_parsers_a62f00a034a77a322187e7cd94418f696}{D\-D4hep\-::\-Parsers\-::parse} (std\-::string \&name, std\-::string \&value, const std\-::string \&input)
\begin{DoxyCompactList}\small\item\em parse the {\ttfamily std\-::map$<$unsigned int,std\-::string$>$ $>$} objects \end{DoxyCompactList}\item 
int \hyperlink{namespace_d_d4hep_1_1_parsers_a2af85c2e9ae2c5ec0e91d3e992d529c2}{D\-D4hep\-::\-Parsers\-::parse} (std\-::map$<$ std\-::string, std\-::pair$<$ double, double $>$ $>$ \&params, const std\-::string \&input)
\begin{DoxyCompactList}\small\item\em helper function, needed for implementation of map of pairs \end{DoxyCompactList}\item 
{\footnotesize template$<$class T , unsigned int N$>$ }\\int \hyperlink{namespace_d_d4hep_1_1_parsers_a3a2c641257cdea105bf397df609731f5}{D\-D4hep\-::\-Parsers\-::parse} (\hyperlink{class_t}{T}(\&result)\mbox{[}N\mbox{]}, const std\-::string \&input)
\begin{DoxyCompactList}\small\item\em parser function for C-\/arrays \end{DoxyCompactList}\item 
{\footnotesize template$<$unsigned int N$>$ }\\int \hyperlink{namespace_d_d4hep_1_1_parsers_a6f63b6224a4074e16a6ff5d851170427}{D\-D4hep\-::\-Parsers\-::parse} (char(\&result)\mbox{[}N\mbox{]}, const std\-::string \&input)
\begin{DoxyCompactList}\small\item\em parser function for C-\/strings \end{DoxyCompactList}\item 
bool \hyperlink{namespace_r_o_o_t_1_1_math_ae526386c3fc57d159a6b9f227c859521}{R\-O\-O\-T\-::\-Math\-::operator$<$} (const X\-Y\-Z\-Point \&a, const X\-Y\-Z\-Point \&b)
\begin{DoxyCompactList}\small\item\em Allow point insertion of a point in maps. \end{DoxyCompactList}\item 
bool \hyperlink{namespace_r_o_o_t_1_1_math_a3bf72adbd1dc8071ef0283f0e253974a}{R\-O\-O\-T\-::\-Math\-::operator$<$} (const X\-Y\-Z\-Vector \&a, const X\-Y\-Z\-Vector \&b)
\begin{DoxyCompactList}\small\item\em Allow 3-\/vector insertion of a in maps. \end{DoxyCompactList}\item 
bool \hyperlink{namespace_r_o_o_t_1_1_math_a1c3af6f88f23ab799472c3e6621364ea}{R\-O\-O\-T\-::\-Math\-::operator$<$} (const Px\-Py\-Pz\-E\-Vector \&a, const Px\-Py\-Pz\-E\-Vector \&b)
\begin{DoxyCompactList}\small\item\em Allow 4-\/vector insertion of a in maps. \end{DoxyCompactList}\item 
int \hyperlink{namespace_d_d4hep_1_1_parsers_a7d90cf46a4c38175eed16be4cbc97d20}{D\-D4hep\-::\-Parsers\-::parse} (R\-O\-O\-T\-::\-Math\-::\-X\-Y\-Z\-Point \&result, const std\-::string \&input)
\begin{DoxyCompactList}\small\item\em parse 3\-D-\/point \end{DoxyCompactList}\item 
int \hyperlink{namespace_d_d4hep_1_1_parsers_a55f47fe0c36c09f779f5aeefe17e9bcb}{D\-D4hep\-::\-Parsers\-::parse} (R\-O\-O\-T\-::\-Math\-::\-X\-Y\-Z\-Vector \&result, const std\-::string \&input)
\begin{DoxyCompactList}\small\item\em parse 3\-D-\/vector \end{DoxyCompactList}\item 
int \hyperlink{namespace_d_d4hep_1_1_parsers_aa49d5f1a00fb97ffdcac92a067fc14a2}{D\-D4hep\-::\-Parsers\-::parse} (R\-O\-O\-T\-::\-Math\-::\-Px\-Py\-Pz\-E\-Vector \&result, const std\-::string \&input)
\begin{DoxyCompactList}\small\item\em parse Px\-Py\-Pz\-E\-Vector \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{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\-: {\ttfamily int parse ( T\-Y\-P\-E\& result , const std\-::string\& input )} where {\ttfamily input} is the input string to be parsed, and {\ttfamily result} is the the result of parsing


\begin{DoxyCode}
\textcolor{keyword}{const} std::string        input = ... ;
std::vector<std::string> result ;

\textcolor{comment}{// parse the input}
\textcolor{keywordtype}{int} sc = \hyperlink{namespace_d_d4hep_1_1_parsers_a49cf20eb52b8e48550d6e3f74b94069e}{parse} ( result , input ) ;
\textcolor{keywordflow}{if} ( sc.isFailure() )
\{
  \textcolor{comment}{// error here ...}
\}
std::cout << \textcolor{stringliteral}{"vector size "} << result.size() << std::endl ;
\end{DoxyCode}


\begin{DoxySeeAlso}{See Also}
\hyperlink{namespace_d_d4hep_1_1_parsers_a49cf20eb52b8e48550d6e3f74b94069e}{D\-D4hep\-::\-Parsers\-::parse} 

Property
\end{DoxySeeAlso}
\begin{DoxyAuthor}{Author}
Alexander M\-A\-Z\-U\-R\-O\-V \href{mailto:Alexander.Mazurov@gmail.com}{\tt Alexander.\-Mazurov@gmail.\-com} 

Vanya B\-E\-L\-Y\-A\-E\-V \href{mailto:ibelyaev@physics.syr.edu}{\tt ibelyaev@physics.\-syr.\-edu} 
\end{DoxyAuthor}
\begin{DoxyDate}{Date}
2006-\/05-\/12 
\end{DoxyDate}


Definition in file \hyperlink{_parsers_8h_source}{Parsers.\-h}.



\subsection{Macro Definition Documentation}
\hypertarget{_parsers_8h_ad77e87ad9e71918448bd8aa4f6aab716}{\index{Parsers.\-h@{Parsers.\-h}!P\-A\-R\-S\-E\-R\-S\-\_\-\-D\-E\-C\-L\-\_\-\-F\-O\-R\-\_\-\-L\-I\-S\-T@{P\-A\-R\-S\-E\-R\-S\-\_\-\-D\-E\-C\-L\-\_\-\-F\-O\-R\-\_\-\-L\-I\-S\-T}}
\index{P\-A\-R\-S\-E\-R\-S\-\_\-\-D\-E\-C\-L\-\_\-\-F\-O\-R\-\_\-\-L\-I\-S\-T@{P\-A\-R\-S\-E\-R\-S\-\_\-\-D\-E\-C\-L\-\_\-\-F\-O\-R\-\_\-\-L\-I\-S\-T}!Parsers.h@{Parsers.\-h}}
\subsubsection[{P\-A\-R\-S\-E\-R\-S\-\_\-\-D\-E\-C\-L\-\_\-\-F\-O\-R\-\_\-\-L\-I\-S\-T}]{\setlength{\rightskip}{0pt plus 5cm}\#define P\-A\-R\-S\-E\-R\-S\-\_\-\-D\-E\-C\-L\-\_\-\-F\-O\-R\-\_\-\-L\-I\-S\-T(
\begin{DoxyParamCaption}
\item[{}]{Inner\-Type}
\end{DoxyParamCaption}
)}}\label{_parsers_8h_ad77e87ad9e71918448bd8aa4f6aab716}
{\bfseries Value\-:}
\begin{DoxyCode}
\textcolor{keywordtype}{int} \hyperlink{namespace_d_d4hep_1_1_parsers_aa49d5f1a00fb97ffdcac92a067fc14a2}{parse}(std::vector<InnerType >& result,\textcolor{keyword}{const} std::string& input);   \(\backslash\)
  int \hyperlink{namespace_d_d4hep_1_1_parsers_aa49d5f1a00fb97ffdcac92a067fc14a2}{parse}(std::list<InnerType >& result,\textcolor{keyword}{const} std::string& input);     \(\backslash\)
  int \hyperlink{namespace_d_d4hep_1_1_parsers_aa49d5f1a00fb97ffdcac92a067fc14a2}{parse}(std::set<InnerType >& result,\textcolor{keyword}{const} std::string& input);      \(\backslash\)
  int \hyperlink{namespace_d_d4hep_1_1_parsers_aa49d5f1a00fb97ffdcac92a067fc14a2}{parse}(std::map<std::string,InnerType >& result,\textcolor{keyword}{const} std::string& input); \(\backslash\)
  int \hyperlink{namespace_d_d4hep_1_1_parsers_aa49d5f1a00fb97ffdcac92a067fc14a2}{parse}(std::map<int,InnerType >& result,\textcolor{keyword}{const} std::string& input);  \(\backslash\)
  int \hyperlink{namespace_d_d4hep_1_1_parsers_aa49d5f1a00fb97ffdcac92a067fc14a2}{parse}(std::pair<std::string,InnerType >& result,\textcolor{keyword}{const} std::string& input); \(\backslash\)
  int \hyperlink{namespace_d_d4hep_1_1_parsers_aa49d5f1a00fb97ffdcac92a067fc14a2}{parse}(std::pair<int,InnerType >& result,\textcolor{keyword}{const} std::string& input);
\end{DoxyCode}


Definition at line 49 of file Parsers.\-h.

\hypertarget{_parsers_8h_ac61de44fff5326d23703542c2dc8275c}{\index{Parsers.\-h@{Parsers.\-h}!P\-A\-R\-S\-E\-R\-S\-\_\-\-D\-E\-C\-L\-\_\-\-F\-O\-R\-\_\-\-P\-A\-I\-R@{P\-A\-R\-S\-E\-R\-S\-\_\-\-D\-E\-C\-L\-\_\-\-F\-O\-R\-\_\-\-P\-A\-I\-R}}
\index{P\-A\-R\-S\-E\-R\-S\-\_\-\-D\-E\-C\-L\-\_\-\-F\-O\-R\-\_\-\-P\-A\-I\-R@{P\-A\-R\-S\-E\-R\-S\-\_\-\-D\-E\-C\-L\-\_\-\-F\-O\-R\-\_\-\-P\-A\-I\-R}!Parsers.h@{Parsers.\-h}}
\subsubsection[{P\-A\-R\-S\-E\-R\-S\-\_\-\-D\-E\-C\-L\-\_\-\-F\-O\-R\-\_\-\-P\-A\-I\-R}]{\setlength{\rightskip}{0pt plus 5cm}\#define P\-A\-R\-S\-E\-R\-S\-\_\-\-D\-E\-C\-L\-\_\-\-F\-O\-R\-\_\-\-P\-A\-I\-R(
\begin{DoxyParamCaption}
\item[{}]{First\-Type, }
\item[{}]{Second\-Type}
\end{DoxyParamCaption}
)~int parse(std\-::pair$<$First\-Type, Second\-Type $>$\& result,const std\-::string\& input);}}\label{_parsers_8h_ac61de44fff5326d23703542c2dc8275c}


Definition at line 31 of file Parsers.\-h.

\hypertarget{_parsers_8h_aaad5c3d9836c2d4f1dd6c2beb3b0ae15}{\index{Parsers.\-h@{Parsers.\-h}!P\-A\-R\-S\-E\-R\-S\-\_\-\-D\-E\-C\-L\-\_\-\-F\-O\-R\-\_\-\-S\-I\-N\-G\-L\-E@{P\-A\-R\-S\-E\-R\-S\-\_\-\-D\-E\-C\-L\-\_\-\-F\-O\-R\-\_\-\-S\-I\-N\-G\-L\-E}}
\index{P\-A\-R\-S\-E\-R\-S\-\_\-\-D\-E\-C\-L\-\_\-\-F\-O\-R\-\_\-\-S\-I\-N\-G\-L\-E@{P\-A\-R\-S\-E\-R\-S\-\_\-\-D\-E\-C\-L\-\_\-\-F\-O\-R\-\_\-\-S\-I\-N\-G\-L\-E}!Parsers.h@{Parsers.\-h}}
\subsubsection[{P\-A\-R\-S\-E\-R\-S\-\_\-\-D\-E\-C\-L\-\_\-\-F\-O\-R\-\_\-\-S\-I\-N\-G\-L\-E}]{\setlength{\rightskip}{0pt plus 5cm}\#define P\-A\-R\-S\-E\-R\-S\-\_\-\-D\-E\-C\-L\-\_\-\-F\-O\-R\-\_\-\-S\-I\-N\-G\-L\-E(
\begin{DoxyParamCaption}
\item[{}]{Type}
\end{DoxyParamCaption}
)~int parse(Type\& result, const std\-::string\& input);}}\label{_parsers_8h_aaad5c3d9836c2d4f1dd6c2beb3b0ae15}


Definition at line 28 of file Parsers.\-h.

