\section{U\-T\-I\-L\-:\-:L\-C\-Std\-Hep\-Rdr\-New Class Reference}
\label{classUTIL_1_1LCStdHepRdrNew}\index{U\-T\-I\-L\-::\-L\-C\-Std\-Hep\-Rdr\-New@{U\-T\-I\-L\-::\-L\-C\-Std\-Hep\-Rdr\-New}}


Basic utility for reading a binary stdhep file and filling a L\-C\-Collection\-Vec with M\-C\-Particles containing the stdhep file information.  




{\ttfamily \#include $<$U\-T\-I\-L/\-L\-C\-Std\-Hep\-Rdr\-New.\-h$>$}

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
{\bf L\-C\-Std\-Hep\-Rdr\-New} (const char $\ast$evfile)\label{classUTIL_1_1LCStdHepRdrNew_ae4d4832d36ffa07e0d71f8abc030bf44}

\begin{DoxyCompactList}\small\item\em Open the stdhep input file in the constructer. \end{DoxyCompactList}\item 
{\bf $\sim$\-L\-C\-Std\-Hep\-Rdr\-New} ()\label{classUTIL_1_1LCStdHepRdrNew_a6bd6b52cb2303da14e1b918d7889dec4}

\begin{DoxyCompactList}\small\item\em noop \end{DoxyCompactList}\item 
long {\bf get\-Number\-Of\-Events} () const 
\begin{DoxyCompactList}\small\item\em Get number of events in the stdhep file. \end{DoxyCompactList}\item 
long {\bf get\-Number\-Of\-Total\-Events\-Expected} () const 
\begin{DoxyCompactList}\small\item\em Get total number of expected events in the whole set of stdhep files from which this stdhep file belongs to. \end{DoxyCompactList}\item 
{\bf I\-M\-P\-L\-::\-L\-C\-Collection\-Vec} $\ast$ {\bf read\-Event} ()
\begin{DoxyCompactList}\small\item\em Read an event and return an L\-C\-Collection\-Vec of M\-C\-Particles. \end{DoxyCompactList}\item 
void {\bf update\-Next\-Event} ({\bf I\-M\-P\-L\-::\-L\-C\-Event\-Impl} $\ast$evt, const char $\ast$col\-Name=E\-V\-E\-N\-T\-::\-L\-C\-I\-O\-::\-M\-C\-P\-A\-R\-T\-I\-C\-L\-E)
\begin{DoxyCompactList}\small\item\em Reads the next stdhep event and adds a new M\-C\-Particle collection to the the event with default name 'M\-C\-Particle'. \end{DoxyCompactList}\item 
void {\bf print\-Header} (std\-::ostream \&os=std\-::cout)\label{classUTIL_1_1LCStdHepRdrNew_af820b6d52d53bff84989d02d8b7b96fc}

\begin{DoxyCompactList}\small\item\em Print the file header to the given ostream. \end{DoxyCompactList}\item 
int {\bf three\-Charge} (int pdg\-I\-D) const 
\begin{DoxyCompactList}\small\item\em Return the charge of the particle times 3 -\/ code copied from Hep\-P\-D\-T package. \end{DoxyCompactList}\item 
void {\bfseries set\-Write\-Event\-Number} (bool write\-Event\-Number)\label{classUTIL_1_1LCStdHepRdrNew_a0974fd7b05afd65d6cdb33afa4a41e75}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
Basic utility for reading a binary stdhep file and filling a L\-C\-Collection\-Vec with M\-C\-Particles containing the stdhep file information. 

\begin{DoxyAuthor}{Author}
cassell 
\end{DoxyAuthor}
\begin{DoxyVersion}{Version}

\end{DoxyVersion}
\begin{DoxyParagraph}{Id\-:}
\doxyref{L\-C\-Std\-Hep\-Rdr.\-h}{p.}{LCStdHepRdr_8h_source},v 1.\-4 2007-\/11-\/12 16\-:39\-:04 gaede Exp 
\end{DoxyParagraph}


\subsection{Member Function Documentation}
\index{U\-T\-I\-L\-::\-L\-C\-Std\-Hep\-Rdr\-New@{U\-T\-I\-L\-::\-L\-C\-Std\-Hep\-Rdr\-New}!get\-Number\-Of\-Events@{get\-Number\-Of\-Events}}
\index{get\-Number\-Of\-Events@{get\-Number\-Of\-Events}!UTIL::LCStdHepRdrNew@{U\-T\-I\-L\-::\-L\-C\-Std\-Hep\-Rdr\-New}}
\subsubsection[{get\-Number\-Of\-Events}]{\setlength{\rightskip}{0pt plus 5cm}long U\-T\-I\-L\-::\-L\-C\-Std\-Hep\-Rdr\-New\-::get\-Number\-Of\-Events (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}\label{classUTIL_1_1LCStdHepRdrNew_a683058313fc22b444263f4e53f1c6559}


Get number of events in the stdhep file. 

This number is read from the file header (no guarantee that it is correct) \index{U\-T\-I\-L\-::\-L\-C\-Std\-Hep\-Rdr\-New@{U\-T\-I\-L\-::\-L\-C\-Std\-Hep\-Rdr\-New}!get\-Number\-Of\-Total\-Events\-Expected@{get\-Number\-Of\-Total\-Events\-Expected}}
\index{get\-Number\-Of\-Total\-Events\-Expected@{get\-Number\-Of\-Total\-Events\-Expected}!UTIL::LCStdHepRdrNew@{U\-T\-I\-L\-::\-L\-C\-Std\-Hep\-Rdr\-New}}
\subsubsection[{get\-Number\-Of\-Total\-Events\-Expected}]{\setlength{\rightskip}{0pt plus 5cm}long U\-T\-I\-L\-::\-L\-C\-Std\-Hep\-Rdr\-New\-::get\-Number\-Of\-Total\-Events\-Expected (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}\label{classUTIL_1_1LCStdHepRdrNew_a21c99f9b083617bf8c5cc2624a54325c}


Get total number of expected events in the whole set of stdhep files from which this stdhep file belongs to. 

This number is read from the file header (no guarantee that it is correct) \index{U\-T\-I\-L\-::\-L\-C\-Std\-Hep\-Rdr\-New@{U\-T\-I\-L\-::\-L\-C\-Std\-Hep\-Rdr\-New}!read\-Event@{read\-Event}}
\index{read\-Event@{read\-Event}!UTIL::LCStdHepRdrNew@{U\-T\-I\-L\-::\-L\-C\-Std\-Hep\-Rdr\-New}}
\subsubsection[{read\-Event}]{\setlength{\rightskip}{0pt plus 5cm}{\bf I\-M\-P\-L\-::\-L\-C\-Collection\-Vec} $\ast$ U\-T\-I\-L\-::\-L\-C\-Std\-Hep\-Rdr\-New\-::read\-Event (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}\label{classUTIL_1_1LCStdHepRdrNew_a6c1e0f8181236c65d6b8c971c90ae266}


Read an event and return an L\-C\-Collection\-Vec of M\-C\-Particles. 

\begin{DoxyRefDesc}{Deprecated}
\item[{\bf Deprecated}]please use update\-Event() \end{DoxyRefDesc}


References I\-M\-P\-L\-::\-M\-C\-Particle\-Impl\-::add\-Parent(), I\-M\-P\-L\-::\-M\-C\-Particle\-Impl\-::get\-Daughters(), I\-M\-P\-L\-::\-L\-C\-Collection\-Vec\-::get\-Element\-At(), I\-M\-P\-L\-::\-M\-C\-Particle\-Impl\-::get\-Generator\-Status(), I\-M\-P\-L\-::\-M\-C\-Particle\-Impl\-::get\-Parents(), I\-M\-P\-L\-::\-M\-C\-Particle\-Impl\-::get\-P\-D\-G(), I\-M\-P\-L\-::\-L\-C\-Collection\-Vec\-::parameters(), I\-M\-P\-L\-::\-M\-C\-Particle\-Impl\-::set\-Charge(), I\-M\-P\-L\-::\-M\-C\-Particle\-Impl\-::set\-Color\-Flow(), I\-M\-P\-L\-::\-M\-C\-Particle\-Impl\-::set\-Generator\-Status(), I\-M\-P\-L\-::\-M\-C\-Particle\-Impl\-::set\-Mass(), I\-M\-P\-L\-::\-M\-C\-Particle\-Impl\-::set\-Momentum(), I\-M\-P\-L\-::\-M\-C\-Particle\-Impl\-::set\-P\-D\-G(), I\-M\-P\-L\-::\-M\-C\-Particle\-Impl\-::set\-Simulator\-Status(), I\-M\-P\-L\-::\-M\-C\-Particle\-Impl\-::set\-Spin(), I\-M\-P\-L\-::\-M\-C\-Particle\-Impl\-::set\-Time(), E\-V\-E\-N\-T\-::\-L\-C\-Parameters\-::set\-Value(), and I\-M\-P\-L\-::\-M\-C\-Particle\-Impl\-::set\-Vertex().

\index{U\-T\-I\-L\-::\-L\-C\-Std\-Hep\-Rdr\-New@{U\-T\-I\-L\-::\-L\-C\-Std\-Hep\-Rdr\-New}!three\-Charge@{three\-Charge}}
\index{three\-Charge@{three\-Charge}!UTIL::LCStdHepRdrNew@{U\-T\-I\-L\-::\-L\-C\-Std\-Hep\-Rdr\-New}}
\subsubsection[{three\-Charge}]{\setlength{\rightskip}{0pt plus 5cm}int U\-T\-I\-L\-::\-L\-C\-Std\-Hep\-Rdr\-New\-::three\-Charge (
\begin{DoxyParamCaption}
\item[{int}]{pdg\-I\-D}
\end{DoxyParamCaption}
) const}\label{classUTIL_1_1LCStdHepRdrNew_a2f59bf09f2748d1e65fa6065ff5be530}


Return the charge of the particle times 3 -\/ code copied from Hep\-P\-D\-T package. 

P\-I\-D digits (base 10) are\-: n nr nl nq1 nq2 nq3 nj The location enum provides a convenient index into the P\-I\-D. \index{U\-T\-I\-L\-::\-L\-C\-Std\-Hep\-Rdr\-New@{U\-T\-I\-L\-::\-L\-C\-Std\-Hep\-Rdr\-New}!update\-Next\-Event@{update\-Next\-Event}}
\index{update\-Next\-Event@{update\-Next\-Event}!UTIL::LCStdHepRdrNew@{U\-T\-I\-L\-::\-L\-C\-Std\-Hep\-Rdr\-New}}
\subsubsection[{update\-Next\-Event}]{\setlength{\rightskip}{0pt plus 5cm}void U\-T\-I\-L\-::\-L\-C\-Std\-Hep\-Rdr\-New\-::update\-Next\-Event (
\begin{DoxyParamCaption}
\item[{{\bf I\-M\-P\-L\-::\-L\-C\-Event\-Impl} $\ast$}]{evt, }
\item[{const char $\ast$}]{col\-Name = {\ttfamily EVENT\-:\-:LCIO\-:\-:MCPARTICLE}}
\end{DoxyParamCaption}
)}\label{classUTIL_1_1LCStdHepRdrNew_a1cf792e3f844380dacb174d6c6de7b39}


Reads the next stdhep event and adds a new M\-C\-Particle collection to the the event with default name 'M\-C\-Particle'. 


\begin{DoxyExceptions}{Exceptions}
{\em \doxyref{I\-O\-::\-End\-Of\-Data\-Exception}{p.}{classIO_1_1EndOfDataException}} & if no event in stdhep file \\
\hline
\end{DoxyExceptions}


References I\-M\-P\-L\-::\-L\-C\-Event\-Impl\-::add\-Collection(), E\-V\-E\-N\-T\-::\-L\-C\-Parameters\-::get\-Float\-Val(), E\-V\-E\-N\-T\-::\-L\-C\-Parameters\-::get\-Int\-Val(), I\-M\-P\-L\-::\-L\-C\-Collection\-Vec\-::get\-Parameters(), I\-M\-P\-L\-::\-L\-C\-Event\-Impl\-::parameters(), I\-M\-P\-L\-::\-L\-C\-Event\-Impl\-::set\-Event\-Number(), E\-V\-E\-N\-T\-::\-L\-C\-Parameters\-::set\-Value(), and I\-M\-P\-L\-::\-L\-C\-Event\-Impl\-::set\-Weight().



The documentation for this class was generated from the following files\-:\begin{DoxyCompactItemize}
\item 
L\-C\-Std\-Hep\-Rdr\-New.\-h\item 
L\-C\-Std\-Hep\-Rdr\-New.\-cc\end{DoxyCompactItemize}
