\section{I\-M\-P\-L\-:\-:L\-C\-Collection\-Vec Class Reference}
\label{classIMPL_1_1LCCollectionVec}\index{I\-M\-P\-L\-::\-L\-C\-Collection\-Vec@{I\-M\-P\-L\-::\-L\-C\-Collection\-Vec}}


Implementation of the L\-C\-Collection using (inheriting from) an S\-T\-L vector of L\-C\-Objects.  




{\ttfamily \#include $<$I\-M\-P\-L/\-L\-C\-Collection\-Vec.\-h$>$}

Inheritance diagram for I\-M\-P\-L\-:\-:L\-C\-Collection\-Vec\-:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=3.000000cm]{classIMPL_1_1LCCollectionVec}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
{\bf L\-C\-Collection\-Vec} ()\label{classIMPL_1_1LCCollectionVec_a6e2cb28a8eb4330c8d5775b1b3bf2ef7}

\begin{DoxyCompactList}\small\item\em Default Constructor should be protected -\/ every L\-C\-Collection needs to know the type of its elements. \end{DoxyCompactList}\item 
{\bf L\-C\-Collection\-Vec} (const std\-::string \&type)
\begin{DoxyCompactList}\small\item\em The public default constructur that takes the name of the type of the elements. \end{DoxyCompactList}\item 
virtual {\bf $\sim$\-L\-C\-Collection\-Vec} ()\label{classIMPL_1_1LCCollectionVec_a3353f6ff8e66d195fa26fbde39c960e7}

\begin{DoxyCompactList}\small\item\em Destructor. \end{DoxyCompactList}\item 
virtual int {\bf get\-Number\-Of\-Elements} () const \label{classIMPL_1_1LCCollectionVec_a956e3819feaceade86b0d39c2b436ddf}

\begin{DoxyCompactList}\small\item\em Returns the number of entries in the collection. \end{DoxyCompactList}\item 
virtual const std\-::string \& {\bf get\-Type\-Name} () const \label{classIMPL_1_1LCCollectionVec_ae5664ea9c2ee52d6b1edba8b89e9aa43}

\begin{DoxyCompactList}\small\item\em Returns the type name of the collection -\/ valid names are defined in L\-C\-I\-O. \end{DoxyCompactList}\item 
virtual {\bf E\-V\-E\-N\-T\-::\-L\-C\-Object} $\ast$ {\bf get\-Element\-At} (int index) const \label{classIMPL_1_1LCCollectionVec_a1430d8917eee9ddd955116ff99dbd8c7}

\begin{DoxyCompactList}\small\item\em Returns pointer to element at index -\/ no range check !. \end{DoxyCompactList}\item 
virtual int {\bf get\-Flag} () const 
\begin{DoxyCompactList}\small\item\em Returns flag word for collection. \end{DoxyCompactList}\item 
virtual bool {\bf is\-Transient} () const 
\begin{DoxyCompactList}\small\item\em True if collection is transient, i.\-e. \end{DoxyCompactList}\item 
void {\bf set\-Transient} (bool val=true)
\begin{DoxyCompactList}\small\item\em Sets the transient flag for this collection. \end{DoxyCompactList}\item 
virtual bool {\bf is\-Default} () const 
\begin{DoxyCompactList}\small\item\em True if collection is the default collection for the given type. \end{DoxyCompactList}\item 
void {\bf set\-Default} (bool val=true)
\begin{DoxyCompactList}\small\item\em Sets the default flag for this collection. \end{DoxyCompactList}\item 
virtual bool {\bf is\-Subset} () const 
\begin{DoxyCompactList}\small\item\em True if the collection holds a subset of objects from other collections. \end{DoxyCompactList}\item 
void {\bf set\-Subset} (bool val=true)
\begin{DoxyCompactList}\small\item\em Sets the subset flag for this collection. \end{DoxyCompactList}\item 
void {\bf set\-Flag} (int flag)\label{classIMPL_1_1LCCollectionVec_a4f50dc72d847992f0c2e37c1e490218a}

\begin{DoxyCompactList}\small\item\em Sets the flag word for this collection. \end{DoxyCompactList}\item 
virtual void {\bf add\-Element} ({\bf E\-V\-E\-N\-T\-::\-L\-C\-Object} $\ast$obj)  throw (\-E\-V\-E\-N\-T\-::\-Read\-Only\-Exception)
\begin{DoxyCompactList}\small\item\em Adds the given element to (end of) the collection. \end{DoxyCompactList}\item 
virtual void {\bf remove\-Element\-At} (int i)  throw (\-E\-V\-E\-N\-T\-::\-Read\-Only\-Exception)
\begin{DoxyCompactList}\small\item\em Removes the i-\/th element from the collection. \end{DoxyCompactList}\item 
virtual const {\bf E\-V\-E\-N\-T\-::\-L\-C\-Parameters} \& {\bf get\-Parameters} () const \label{classIMPL_1_1LCCollectionVec_af04bf88f96644f4bf7866d386a0bfae7}

\begin{DoxyCompactList}\small\item\em Parameters defined for this run. \end{DoxyCompactList}\item 
virtual {\bf E\-V\-E\-N\-T\-::\-L\-C\-Parameters} \& {\bf parameters} ()\label{classIMPL_1_1LCCollectionVec_a88647a838e1ca08d81979bb53a73c9ee}

\begin{DoxyCompactList}\small\item\em Parameters defined for this run. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
void {\bfseries set\-Read\-Only} (bool read\-Only)\label{classIMPL_1_1LCCollectionVec_a3038645695d97ca7940b85c0a86d1316}

\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
std\-::string {\bfseries \-\_\-type\-Name}\label{classIMPL_1_1LCCollectionVec_a5a6807c806297584ccc205f4161d6392}

\item 
int {\bfseries \-\_\-flag}\label{classIMPL_1_1LCCollectionVec_a4197a1eeb1218e70c48632470f432d18}

\item 
{\bf L\-C\-Parameters\-Impl} {\bfseries \-\_\-params}\label{classIMPL_1_1LCCollectionVec_aa19efb48a2b6bd388f85cb7ddc259fc3}

\end{DoxyCompactItemize}
\subsection*{Additional Inherited Members}


\subsection{Detailed Description}
Implementation of the L\-C\-Collection using (inheriting from) an S\-T\-L vector of L\-C\-Objects. 

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

\end{DoxyVersion}
\begin{DoxyParagraph}{Id\-:}
\doxyref{L\-C\-Collection\-Vec.\-h}{p.}{LCCollectionVec_8h_source},v 1.\-12 2010-\/01-\/21 16\-:27\-:36 gaede Exp 
\end{DoxyParagraph}
\begin{DoxySeeAlso}{See Also}
L\-C\-Object 

L\-C\-Collection 
\end{DoxySeeAlso}


\subsection{Constructor \& Destructor Documentation}
\index{I\-M\-P\-L\-::\-L\-C\-Collection\-Vec@{I\-M\-P\-L\-::\-L\-C\-Collection\-Vec}!L\-C\-Collection\-Vec@{L\-C\-Collection\-Vec}}
\index{L\-C\-Collection\-Vec@{L\-C\-Collection\-Vec}!IMPL::LCCollectionVec@{I\-M\-P\-L\-::\-L\-C\-Collection\-Vec}}
\subsubsection[{L\-C\-Collection\-Vec}]{\setlength{\rightskip}{0pt plus 5cm}I\-M\-P\-L\-::\-L\-C\-Collection\-Vec\-::\-L\-C\-Collection\-Vec (
\begin{DoxyParamCaption}
\item[{const std\-::string \&}]{type}
\end{DoxyParamCaption}
)}\label{classIMPL_1_1LCCollectionVec_a2de6a14bf60b330cb414fb17680d28fd}


The public default constructur that takes the name of the type of the elements. 



\subsection{Member Function Documentation}
\index{I\-M\-P\-L\-::\-L\-C\-Collection\-Vec@{I\-M\-P\-L\-::\-L\-C\-Collection\-Vec}!add\-Element@{add\-Element}}
\index{add\-Element@{add\-Element}!IMPL::LCCollectionVec@{I\-M\-P\-L\-::\-L\-C\-Collection\-Vec}}
\subsubsection[{add\-Element}]{\setlength{\rightskip}{0pt plus 5cm}void I\-M\-P\-L\-::\-L\-C\-Collection\-Vec\-::add\-Element (
\begin{DoxyParamCaption}
\item[{{\bf E\-V\-E\-N\-T\-::\-L\-C\-Object} $\ast$}]{obj}
\end{DoxyParamCaption}
) throw  {\bf E\-V\-E\-N\-T\-::\-Read\-Only\-Exception}) \hspace{0.3cm}{\ttfamily [virtual]}}\label{classIMPL_1_1LCCollectionVec_a2fabf2ac6900829ce0076e966c9102d2}


Adds the given element to (end of) the collection. 

Throws an exception if the collection (event) is 'read only'.


\begin{DoxyExceptions}{Exceptions}
{\em Read\-Only\-Exception} & \\
\hline
\end{DoxyExceptions}


Implements {\bf E\-V\-E\-N\-T\-::\-L\-C\-Collection} \doxyref{}{p.}{classEVENT_1_1LCCollection_ab0b2e70aa7d353417bec9133ed25ec88}.



Referenced by U\-T\-I\-L\-::\-L\-C\-Relation\-Navigator\-::create\-L\-C\-Collection().

\index{I\-M\-P\-L\-::\-L\-C\-Collection\-Vec@{I\-M\-P\-L\-::\-L\-C\-Collection\-Vec}!get\-Flag@{get\-Flag}}
\index{get\-Flag@{get\-Flag}!IMPL::LCCollectionVec@{I\-M\-P\-L\-::\-L\-C\-Collection\-Vec}}
\subsubsection[{get\-Flag}]{\setlength{\rightskip}{0pt plus 5cm}int I\-M\-P\-L\-::\-L\-C\-Collection\-Vec\-::get\-Flag (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [virtual]}}\label{classIMPL_1_1LCCollectionVec_a7056f46b4d181482350cf2a3fbb0ab04}


Returns flag word for collection. 

Bits 16-\/31 are reserved for L\-C\-I\-O Depending on the object type stored they have a special meaning, e.\-g. for Sim\-Calorimeter\-Hits\-: \par
 C\-H\-B\-I\-T\-\_\-\-L\-O\-N\-G = 31 -\/ store position \par
 C\-H\-B\-I\-T\-\_\-\-B\-A\-R\-R\-E\-L = 30 -\/ endcap or barrel \par
 C\-H\-B\-I\-T\-\_\-\-I\-D1 = 29 -\/ cellid1 is sored \par
 C\-H\-B\-I\-T\-\_\-\-P\-D\-G = 28 -\/ store pdg of secondaries \par
 ~\par
 Bit 16 is used to flag collection as transient \par
 Bit 17 is used to flag collection as default \par
 Bit 18 is used to flag collection as subset \par
 Bits 0-\/15 are subdetector/user specific. \begin{DoxySeeAlso}{See Also}
\doxyref{is\-Transient()}{p.}{classIMPL_1_1LCCollectionVec_ab87edd694b9c40723ee88a7e6eace5a2} 
\end{DoxySeeAlso}


Implements {\bf E\-V\-E\-N\-T\-::\-L\-C\-Collection} \doxyref{}{p.}{classEVENT_1_1LCCollection_a6c78c37e2db78824363b89f3c3ca87b3}.

\index{I\-M\-P\-L\-::\-L\-C\-Collection\-Vec@{I\-M\-P\-L\-::\-L\-C\-Collection\-Vec}!is\-Default@{is\-Default}}
\index{is\-Default@{is\-Default}!IMPL::LCCollectionVec@{I\-M\-P\-L\-::\-L\-C\-Collection\-Vec}}
\subsubsection[{is\-Default}]{\setlength{\rightskip}{0pt plus 5cm}bool I\-M\-P\-L\-::\-L\-C\-Collection\-Vec\-::is\-Default (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [virtual]}}\label{classIMPL_1_1LCCollectionVec_ab6b7432c521a4c68caba3090e175dcea}


True if collection is the default collection for the given type. 

This implies that the collection is complete and unambigous. Convenient method that checks bit B\-I\-T\-Default of the flag word. 

Implements {\bf E\-V\-E\-N\-T\-::\-L\-C\-Collection} \doxyref{}{p.}{classEVENT_1_1LCCollection_a94245bf6dba51f5c940ef8000ac571d2}.

\index{I\-M\-P\-L\-::\-L\-C\-Collection\-Vec@{I\-M\-P\-L\-::\-L\-C\-Collection\-Vec}!is\-Subset@{is\-Subset}}
\index{is\-Subset@{is\-Subset}!IMPL::LCCollectionVec@{I\-M\-P\-L\-::\-L\-C\-Collection\-Vec}}
\subsubsection[{is\-Subset}]{\setlength{\rightskip}{0pt plus 5cm}bool I\-M\-P\-L\-::\-L\-C\-Collection\-Vec\-::is\-Subset (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [virtual]}}\label{classIMPL_1_1LCCollectionVec_ad2e9f216b66ce29235cf3dd5c00cd369}


True if the collection holds a subset of objects from other collections. 

If the collection is not transient only the pointers/references to the original objects will be stored. Convenient method that checks bit B\-I\-T\-Subset of the flag word. 

Implements {\bf E\-V\-E\-N\-T\-::\-L\-C\-Collection} \doxyref{}{p.}{classEVENT_1_1LCCollection_a50e436ec4a0912938d8eb8539d66108b}.



Referenced by $\sim$\-L\-C\-Collection\-Vec().

\index{I\-M\-P\-L\-::\-L\-C\-Collection\-Vec@{I\-M\-P\-L\-::\-L\-C\-Collection\-Vec}!is\-Transient@{is\-Transient}}
\index{is\-Transient@{is\-Transient}!IMPL::LCCollectionVec@{I\-M\-P\-L\-::\-L\-C\-Collection\-Vec}}
\subsubsection[{is\-Transient}]{\setlength{\rightskip}{0pt plus 5cm}bool I\-M\-P\-L\-::\-L\-C\-Collection\-Vec\-::is\-Transient (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [virtual]}}\label{classIMPL_1_1LCCollectionVec_ab87edd694b9c40723ee88a7e6eace5a2}


True if collection is transient, i.\-e. 

will not be written to any L\-C\-I\-O file. Convenient method that checks bit 16 of the flag word. 

Implements {\bf E\-V\-E\-N\-T\-::\-L\-C\-Collection} \doxyref{}{p.}{classEVENT_1_1LCCollection_a41de14b58d2237d18adfe935ad6c6158}.



References E\-V\-E\-N\-T\-::\-L\-C\-Collection\-::\-B\-I\-T\-Transient.

\index{I\-M\-P\-L\-::\-L\-C\-Collection\-Vec@{I\-M\-P\-L\-::\-L\-C\-Collection\-Vec}!remove\-Element\-At@{remove\-Element\-At}}
\index{remove\-Element\-At@{remove\-Element\-At}!IMPL::LCCollectionVec@{I\-M\-P\-L\-::\-L\-C\-Collection\-Vec}}
\subsubsection[{remove\-Element\-At}]{\setlength{\rightskip}{0pt plus 5cm}void I\-M\-P\-L\-::\-L\-C\-Collection\-Vec\-::remove\-Element\-At (
\begin{DoxyParamCaption}
\item[{int}]{i}
\end{DoxyParamCaption}
) throw  {\bf E\-V\-E\-N\-T\-::\-Read\-Only\-Exception}) \hspace{0.3cm}{\ttfamily [virtual]}}\label{classIMPL_1_1LCCollectionVec_aa3ce3ef3663ce51b339464834e7faac9}


Removes the i-\/th element from the collection. 

Throws an exception if the collection (event) is 'read only'.


\begin{DoxyExceptions}{Exceptions}
{\em Read\-Only\-Exception} & \\
\hline
\end{DoxyExceptions}


Implements {\bf E\-V\-E\-N\-T\-::\-L\-C\-Collection} \doxyref{}{p.}{classEVENT_1_1LCCollection_a0ea0ee001c11d3f31a3dc2640bcee384}.

\index{I\-M\-P\-L\-::\-L\-C\-Collection\-Vec@{I\-M\-P\-L\-::\-L\-C\-Collection\-Vec}!set\-Default@{set\-Default}}
\index{set\-Default@{set\-Default}!IMPL::LCCollectionVec@{I\-M\-P\-L\-::\-L\-C\-Collection\-Vec}}
\subsubsection[{set\-Default}]{\setlength{\rightskip}{0pt plus 5cm}void I\-M\-P\-L\-::\-L\-C\-Collection\-Vec\-::set\-Default (
\begin{DoxyParamCaption}
\item[{bool}]{val = {\ttfamily true}}
\end{DoxyParamCaption}
)}\label{classIMPL_1_1LCCollectionVec_a6f11001904aac5e09e26a9b78fa35e73}


Sets the default flag for this collection. 

User need to make sure this flag is unique for a type. \index{I\-M\-P\-L\-::\-L\-C\-Collection\-Vec@{I\-M\-P\-L\-::\-L\-C\-Collection\-Vec}!set\-Subset@{set\-Subset}}
\index{set\-Subset@{set\-Subset}!IMPL::LCCollectionVec@{I\-M\-P\-L\-::\-L\-C\-Collection\-Vec}}
\subsubsection[{set\-Subset}]{\setlength{\rightskip}{0pt plus 5cm}void I\-M\-P\-L\-::\-L\-C\-Collection\-Vec\-::set\-Subset (
\begin{DoxyParamCaption}
\item[{bool}]{val = {\ttfamily true}}
\end{DoxyParamCaption}
)}\label{classIMPL_1_1LCCollectionVec_ae85abfe084e04e296db16534628f2aa7}


Sets the subset flag for this collection. 

Collections of subsets are only written as pointers to L\-C\-I\-O files, i.\-e. the objects have to exist in another non-\/transient collections.\par
 N\-B\-: Do not add any 'real' objects to a collection flagged as subset, as this will lead to memory leaks ! \index{I\-M\-P\-L\-::\-L\-C\-Collection\-Vec@{I\-M\-P\-L\-::\-L\-C\-Collection\-Vec}!set\-Transient@{set\-Transient}}
\index{set\-Transient@{set\-Transient}!IMPL::LCCollectionVec@{I\-M\-P\-L\-::\-L\-C\-Collection\-Vec}}
\subsubsection[{set\-Transient}]{\setlength{\rightskip}{0pt plus 5cm}void I\-M\-P\-L\-::\-L\-C\-Collection\-Vec\-::set\-Transient (
\begin{DoxyParamCaption}
\item[{bool}]{val = {\ttfamily true}}
\end{DoxyParamCaption}
)}\label{classIMPL_1_1LCCollectionVec_a8e9f707f0e5a1ca39dab661dc183577d}


Sets the transient flag for this collection. 

Transient collections are not written to L\-C\-I\-O files. 

References E\-V\-E\-N\-T\-::\-L\-C\-Collection\-::\-B\-I\-T\-Transient.



Referenced by I\-M\-P\-L\-::\-L\-C\-Event\-Impl\-::take\-Collection().



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