<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\section{U\-T\-I\-L\-:\-:L\-C\-Iterator$&lt;$ T $&gt;$ Class Template Reference}
\label{classUTIL_1_1LCIterator}\index{U\-T\-I\-L\-::\-L\-C\-Iterator$&lt;$ T $&gt;$@{U\-T\-I\-L\-::\-L\-C\-Iterator$&lt;$ T $&gt;$}}


Simple convenient iterator class for L\-C\-Collections that saves some boiler plate code.  




{\ttfamily \#include $&lt;$U\-T\-I\-L/\-L\-C\-Iterator.\-h$&gt;$}

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
{\bf L\-C\-Iterator} ({\bf E\-V\-E\-N\-T\-::\-L\-C\-Event} $\ast$evt, const std\-::string \&amp;name)\label{classUTIL_1_1LCIterator_ac0e77d53f4e4a715738f7643d750577d}

\begin{DoxyCompactList}\small\item\em Constructor that reads the collection with the given name from the event -\/ note\-: no exception is thrown if the collection is not in the event, this will behave the same as an empty collection -\/ use operator() to test, if the collection exists. \end{DoxyCompactList}\item 
{\bf L\-C\-Iterator} ({\bf E\-V\-E\-N\-T\-::\-L\-C\-Collection} $\ast$col)\label{classUTIL_1_1LCIterator_af16210f1e8f51e4fda94c78ef1b4a782}

\begin{DoxyCompactList}\small\item\em Constructor for the given collection. \end{DoxyCompactList}\item 
T $\ast$ {\bf next} ()\label{classUTIL_1_1LCIterator_ac78c71921e23dc0e9cabe623bd030d2b}

\begin{DoxyCompactList}\small\item\em Returns the next element as long as there is one, otherwise 0 is returned. \end{DoxyCompactList}\item 
int {\bf size} ()\label{classUTIL_1_1LCIterator_ad31c43e6437089075e418026ae77c9b1}

\begin{DoxyCompactList}\small\item\em Size of the collection. \end{DoxyCompactList}\item 
{\bf E\-V\-E\-N\-T\-::\-L\-C\-Collection} $\ast$ {\bf operator-\/$&gt;$} ()\label{classUTIL_1_1LCIterator_a6a9806c2f8ec19659d7ba85da1a7d4b3}

\begin{DoxyCompactList}\small\item\em Serves as a handle to the L\-C\-Collection itself, to provide access to the collection parameters etc. \end{DoxyCompactList}\item 
{\bf E\-V\-E\-N\-T\-::\-L\-C\-Collection} $\ast$ {\bf operator()} ()
\begin{DoxyCompactList}\small\item\em Return pointer to L\-C\-Collection, e.\-g. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
\subsubsection*{template$&lt;$class T$&gt;$class U\-T\-I\-L\-::\-L\-C\-Iterator$&lt;$ T $&gt;$}

Simple convenient iterator class for L\-C\-Collections that saves some boiler plate code. 

L\-C\-Iterators can be constructed either form an L\-C\-Collection or from the L\-C\-Event and and a collection name.

Examples\-: 
\begin{DoxyPre}
 // ------ use with while():
 LCIterator&lt;TrackerHit&gt; it( evt, "VXDCollection" ) ;
 while( TrackerHit* hit = it.next()  )\{\end{DoxyPre}



\begin{DoxyPre}    hitMap[ hit-&gt;getCellID0() ] = hit ;
 \}\end{DoxyPre}



\begin{DoxyPre} // --- with for() :
 for(  LCIterator&lt;Track&gt; it( col ) ;  Track* trk = it.next()  ; ) \{\end{DoxyPre}



\begin{DoxyPre}    std::cout &lt;&lt; trk-&gt;getTrackState( TrackState::AtIP ) &lt;&lt; std::endl  ;
 \}
\end{DoxyPre}


\begin{DoxyAuthor}{Author}
F.\-Gaede, D\-E\-S\-Y 
\end{DoxyAuthor}
\begin{DoxyVersion}{Version}
\$\-Id\-:\$ 
\end{DoxyVersion}


\subsection{Member Function Documentation}
\index{U\-T\-I\-L\-::\-L\-C\-Iterator@{U\-T\-I\-L\-::\-L\-C\-Iterator}!operator()@{operator()}}
\index{operator()@{operator()}!UTIL::LCIterator@{U\-T\-I\-L\-::\-L\-C\-Iterator}}
\subsubsection[{operator()}]{\setlength{\rightskip}{0pt plus 5cm}template$&lt;$class T$&gt;$ {\bf E\-V\-E\-N\-T\-::\-L\-C\-Collection}$\ast$ {\bf U\-T\-I\-L\-::\-L\-C\-Iterator}$&lt;$ T $&gt;$\-::operator() (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}\label{classUTIL_1_1LCIterator_aa3da276d6ec62467e03846add66fd5a1}


Return pointer to L\-C\-Collection, e.\-g. 

for testing whether the collections was in the event. 

The documentation for this class was generated from the following file\-:\begin{DoxyCompactItemize}
\item 
L\-C\-Iterator.\-h\end{DoxyCompactItemize}
</pre></body></html>