\section{marlintpc\-:\-:Field\-Map\-Reader Class Reference}
\label{classmarlintpc_1_1FieldMapReader}\index{marlintpc\-::\-Field\-Map\-Reader@{marlintpc\-::\-Field\-Map\-Reader}}


Field\-Reader \-: A reader for field maps.  




{\ttfamily \#include $<$Field\-Map\-Reader.\-h$>$}

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
virtual {\bf $\sim$\-Field\-Map\-Reader} ()\label{classmarlintpc_1_1FieldMapReader_ac81c486a0f57f7741ec6066569848ef9}

\begin{DoxyCompactList}\small\item\em destructor \end{DoxyCompactList}\item 
virtual E\-V\-E\-N\-T\-::\-L\-C\-Collection $\ast$ {\bf read\-\_\-field\-\_\-map} (const std\-::string)
\begin{DoxyCompactList}\small\item\em reads the field map at the given path and returns it as an L\-C\-Collection$\ast$. \end{DoxyCompactList}\item 
void {\bf set\-\_\-verbose} (const int)\label{classmarlintpc_1_1FieldMapReader_af110a07b93657228c671db3bad79e46d}

\begin{DoxyCompactList}\small\item\em sets level of verbose output \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static {\bf Field\-Map\-Reader} $\ast$ {\bf R\-E\-A\-D\-E\-R} ()\label{classmarlintpc_1_1FieldMapReader_acb88bb7cb20c080d0a257df245d2cddb}

\begin{DoxyCompactList}\small\item\em Returns the default instance. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
virtual void {\bf read\-\_\-\-Cylindrical2\-D\-Magnetic\-Field} ()
\begin{DoxyCompactList}\small\item\em Reads all lines after \char`\"{}\#\#\# Start Field Map \#\#\#\char`\"{}. \end{DoxyCompactList}\item 
virtual void {\bf read\-\_\-\-Cylindrical3\-D\-Magnetic\-Field} ()
\begin{DoxyCompactList}\small\item\em Reads all lines after \char`\"{}\#\#\# Start Field Map \#\#\#\char`\"{}. \end{DoxyCompactList}\item 
virtual void {\bf read\-\_\-parameter} (const std\-::string)
\begin{DoxyCompactList}\small\item\em Reads a string, extracts a parameter and adds it to the parameters in the L\-C\-Collection. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Field\-Reader \-: A reader for field maps. 

Takes a text file and produces an L\-C\-Collection from it. The text file has to provide the type of the field map\-: \char`\"{}\-Field\-Type $<$\-Field\-Map\-Type$>$\char`\"{} Any number of Int, Float and String parameters for the L\-C\-Collection can be set\-: \char`\"{}$<$type$>$ $<$parameter\-Name$>$ $<$value$>$\char`\"{} The actual field map starts after\-: \char`\"{}\#\#\# Start Field Map \#\#\#\char`\"{} The values are read depending on the type of the field map.

\begin{DoxyAuthor}{Author}
Christian Grefe \par
 
\end{DoxyAuthor}


\subsection{Member Function Documentation}
\index{marlintpc\-::\-Field\-Map\-Reader@{marlintpc\-::\-Field\-Map\-Reader}!read\-\_\-\-Cylindrical2\-D\-Magnetic\-Field@{read\-\_\-\-Cylindrical2\-D\-Magnetic\-Field}}
\index{read\-\_\-\-Cylindrical2\-D\-Magnetic\-Field@{read\-\_\-\-Cylindrical2\-D\-Magnetic\-Field}!marlintpc::FieldMapReader@{marlintpc\-::\-Field\-Map\-Reader}}
\subsubsection[{read\-\_\-\-Cylindrical2\-D\-Magnetic\-Field}]{\setlength{\rightskip}{0pt plus 5cm}void marlintpc\-::\-Field\-Map\-Reader\-::read\-\_\-\-Cylindrical2\-D\-Magnetic\-Field (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [protected]}, {\ttfamily [virtual]}}\label{classmarlintpc_1_1FieldMapReader_ade634465a0c3f096fa7614b72be10699}


Reads all lines after \char`\"{}\#\#\# Start Field Map \#\#\#\char`\"{}. 

Expects four floats in each line\-: \char`\"{}$<$r$>$ $<$z$>$ $<$\-Br$>$ $<$\-Bz$>$\char`\"{} Adds one element to the L\-C\-Collection per line. 

Referenced by read\-\_\-field\-\_\-map().

\index{marlintpc\-::\-Field\-Map\-Reader@{marlintpc\-::\-Field\-Map\-Reader}!read\-\_\-\-Cylindrical3\-D\-Magnetic\-Field@{read\-\_\-\-Cylindrical3\-D\-Magnetic\-Field}}
\index{read\-\_\-\-Cylindrical3\-D\-Magnetic\-Field@{read\-\_\-\-Cylindrical3\-D\-Magnetic\-Field}!marlintpc::FieldMapReader@{marlintpc\-::\-Field\-Map\-Reader}}
\subsubsection[{read\-\_\-\-Cylindrical3\-D\-Magnetic\-Field}]{\setlength{\rightskip}{0pt plus 5cm}void marlintpc\-::\-Field\-Map\-Reader\-::read\-\_\-\-Cylindrical3\-D\-Magnetic\-Field (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [protected]}, {\ttfamily [virtual]}}\label{classmarlintpc_1_1FieldMapReader_a4909f547d3f78de705c20c10f15738bf}


Reads all lines after \char`\"{}\#\#\# Start Field Map \#\#\#\char`\"{}. 

Expects six floats in each line\-: \char`\"{}$<$r$>$ $<$phi$>$ $<$z$>$ $<$\-Br$>$ $<$\-Bphi$>$ $<$\-Bz$>$\char`\"{} Adds one element to the L\-C\-Collection per line. 

Referenced by read\-\_\-field\-\_\-map().

\index{marlintpc\-::\-Field\-Map\-Reader@{marlintpc\-::\-Field\-Map\-Reader}!read\-\_\-field\-\_\-map@{read\-\_\-field\-\_\-map}}
\index{read\-\_\-field\-\_\-map@{read\-\_\-field\-\_\-map}!marlintpc::FieldMapReader@{marlintpc\-::\-Field\-Map\-Reader}}
\subsubsection[{read\-\_\-field\-\_\-map}]{\setlength{\rightskip}{0pt plus 5cm}E\-V\-E\-N\-T\-::\-L\-C\-Collection $\ast$ marlintpc\-::\-Field\-Map\-Reader\-::read\-\_\-field\-\_\-map (
\begin{DoxyParamCaption}
\item[{const std\-::string}]{file\-Path}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}\label{classmarlintpc_1_1FieldMapReader_a355b39fe8e20dc71f1b8744f1278ec63}


reads the field map at the given path and returns it as an L\-C\-Collection$\ast$. 

returns 0 if the input file is not a valid field map. 

References read\-\_\-\-Cylindrical2\-D\-Magnetic\-Field(), read\-\_\-\-Cylindrical3\-D\-Magnetic\-Field(), and read\-\_\-parameter().

\index{marlintpc\-::\-Field\-Map\-Reader@{marlintpc\-::\-Field\-Map\-Reader}!read\-\_\-parameter@{read\-\_\-parameter}}
\index{read\-\_\-parameter@{read\-\_\-parameter}!marlintpc::FieldMapReader@{marlintpc\-::\-Field\-Map\-Reader}}
\subsubsection[{read\-\_\-parameter}]{\setlength{\rightskip}{0pt plus 5cm}void marlintpc\-::\-Field\-Map\-Reader\-::read\-\_\-parameter (
\begin{DoxyParamCaption}
\item[{const std\-::string}]{line}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [protected]}, {\ttfamily [virtual]}}\label{classmarlintpc_1_1FieldMapReader_a37fcfcddc48b45bca63cd84507a87779}


Reads a string, extracts a parameter and adds it to the parameters in the L\-C\-Collection. 

The string has to follow the pattern\-: \char`\"{}$<$type$>$ $<$parameter\-Name$>$ $<$value$>$\char`\"{}. Known types are \char`\"{}\-String\char`\"{}, \char`\"{}\-Int\char`\"{} and \char`\"{}\-Float\char`\"{}. Only the first value is taken, except for \char`\"{}\-String\char`\"{} which takes everything after the parameter name. \char`\"{}\-Field\-Type $<$\-Field\-Map\-Type$>$\char`\"{} sets the type of the field map. It has to be defined before \char`\"{}\#\#\# Start Field Map \#\#\#\char`\"{}. Only the last definition is taken. 

Referenced by read\-\_\-field\-\_\-map().



The documentation for this class was generated from the following files\-:\begin{DoxyCompactItemize}
\item 
Field\-Map\-Reader.\-h\item 
Field\-Map\-Reader.\-cc\end{DoxyCompactItemize}
