\hypertarget{classSmartCollection}{
\section{SmartCollection Class Reference}
\label{classSmartCollection}\index{SmartCollection@{SmartCollection}}
}
A collection class designed to use \hyperlink{classCollectionAction}{CollectionAction} objects.  


{\tt \#include $<$SmartCollection.h$>$}

Inheritance diagram for SmartCollection::\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=4cm]{classSmartCollection}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
\hyperlink{classSmartCollection_597157bb186c4688cd305b62a197009d}{SmartCollection} (const char $\ast$collectionName)
\begin{CompactList}\small\item\em Constructor. \item\end{CompactList}\item 
\hyperlink{classSmartCollection_63fdadd219eb42065c6e9adc63558b63}{$\sim$SmartCollection} ()
\begin{CompactList}\small\item\em Destructor. \item\end{CompactList}\item 
virtual void \hyperlink{classSmartCollection_9265adb168bca295f264af65276a002b}{AddAction} (\hyperlink{classCollectionAction}{CollectionAction} \&action)
\begin{CompactList}\small\item\em Adds an action to the \hyperlink{classSmartCollection}{SmartCollection}. \item\end{CompactList}\item 
\hyperlink{classCollectionAction}{CollectionAction} $\ast$ \hyperlink{classSmartCollection_acadaf64f683e7932c376e924e7020ea}{GetAction} (unsigned int iAction)
\begin{CompactList}\small\item\em Returns the iAction-th action. \item\end{CompactList}\item 
void \hyperlink{classSmartCollection_9b5b11a854b9e174218ea516ceffb34c}{Setup} (PamLevel2 $\ast$events)
\begin{CompactList}\small\item\em The pre-analysis task definition. \item\end{CompactList}\item 
void \hyperlink{classSmartCollection_8105730615ad127a482a7fb399695977}{Finalize} ()
\begin{CompactList}\small\item\em The post-analysis task definition. \item\end{CompactList}\item 
void \hyperlink{classSmartCollection_13ce6deb47b60d10225598dd1201cd80}{OnGood} (PamLevel2 $\ast$event)
\begin{CompactList}\small\item\em Post-selection tasks. \item\end{CompactList}\item 
void \hyperlink{classSmartCollection_99ac049c98461fbe04167f386ca7ed76}{OnBad} (PamLevel2 $\ast$event, int selectionResult)
\begin{CompactList}\small\item\em Post-selection tasks. \item\end{CompactList}\end{CompactItemize}
\subsection*{Private Attributes}
\begin{CompactItemize}
\item 
std::vector$<$ \hyperlink{classCollectionAction}{CollectionAction} $\ast$ $>$ \hyperlink{classSmartCollection_a80a9cf5cab3683a61b47a1145ff8f15}{\_\-actions}
\end{CompactItemize}


\subsection{Detailed Description}
A collection class designed to use \hyperlink{classCollectionAction}{CollectionAction} objects. 

The \hyperlink{classSmartCollection}{SmartCollection} class is designed to handle \hyperlink{classCollectionAction}{CollectionAction} objects. These defines the procedures to do when an event is selected or discarded. A \hyperlink{classSmartCollection}{SmartCollection} handles a vector of these objects, calling \hyperlink{classCollectionAction_801dd664020b71e8a3232e5a584d96a0}{CollectionAction::OnGood()} for each of them when a good event is selected and \hyperlink{classCollectionAction_ef4ee9fd63c0d232e90694e068e6e339}{CollectionAction::OnBad()} when a bad one is rejected. It will also call the \hyperlink{classCollectionAction_13adbcacf5e088f7979f0644a65372b4}{CollectionAction::Setup()} and \hyperlink{classCollectionAction_c32b42fc08bc1be7b003579b633de041}{CollectionAction::Finalize()} methods at the beginning and at the end of the analysis, respectively. 

Definition at line 26 of file SmartCollection.h.

\subsection{Constructor \& Destructor Documentation}
\hypertarget{classSmartCollection_597157bb186c4688cd305b62a197009d}{
\index{SmartCollection@{SmartCollection}!SmartCollection@{SmartCollection}}
\index{SmartCollection@{SmartCollection}!SmartCollection@{SmartCollection}}
\subsubsection[{SmartCollection}]{\setlength{\rightskip}{0pt plus 5cm}SmartCollection::SmartCollection (const char $\ast$ {\em collectionName})\hspace{0.3cm}{\tt  \mbox{[}inline\mbox{]}}}}
\label{classSmartCollection_597157bb186c4688cd305b62a197009d}


Constructor. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em collectionName}]The collection's name. \end{description}
\end{Desc}


Definition at line 34 of file SmartCollection.h.\hypertarget{classSmartCollection_63fdadd219eb42065c6e9adc63558b63}{
\index{SmartCollection@{SmartCollection}!$\sim$SmartCollection@{$\sim$SmartCollection}}
\index{$\sim$SmartCollection@{$\sim$SmartCollection}!SmartCollection@{SmartCollection}}
\subsubsection[{$\sim$SmartCollection}]{\setlength{\rightskip}{0pt plus 5cm}SmartCollection::$\sim$SmartCollection ()\hspace{0.3cm}{\tt  \mbox{[}inline\mbox{]}}}}
\label{classSmartCollection_63fdadd219eb42065c6e9adc63558b63}


Destructor. 



Definition at line 39 of file SmartCollection.h.

\subsection{Member Function Documentation}
\hypertarget{classSmartCollection_9265adb168bca295f264af65276a002b}{
\index{SmartCollection@{SmartCollection}!AddAction@{AddAction}}
\index{AddAction@{AddAction}!SmartCollection@{SmartCollection}}
\subsubsection[{AddAction}]{\setlength{\rightskip}{0pt plus 5cm}void SmartCollection::AddAction ({\bf CollectionAction} \& {\em action})\hspace{0.3cm}{\tt  \mbox{[}virtual\mbox{]}}}}
\label{classSmartCollection_9265adb168bca295f264af65276a002b}


Adds an action to the \hyperlink{classSmartCollection}{SmartCollection}. 



Definition at line 12 of file SmartCollection.cpp.

References \_\-actions.\hypertarget{classSmartCollection_8105730615ad127a482a7fb399695977}{
\index{SmartCollection@{SmartCollection}!Finalize@{Finalize}}
\index{Finalize@{Finalize}!SmartCollection@{SmartCollection}}
\subsubsection[{Finalize}]{\setlength{\rightskip}{0pt plus 5cm}void SmartCollection::Finalize ()\hspace{0.3cm}{\tt  \mbox{[}virtual\mbox{]}}}}
\label{classSmartCollection_8105730615ad127a482a7fb399695977}


The post-analysis task definition. 

This override of the \hyperlink{classSmartCollection_8105730615ad127a482a7fb399695977}{Finalize()} method calls \hyperlink{classPamCutCollection_15785c75fb13b998422739e741bb5c01}{PamCutCollection::Finalize()} and then the \hyperlink{classSmartCollection_8105730615ad127a482a7fb399695977}{Finalize()} method of each action contained in the \hyperlink{classSmartCollection}{SmartCollection}. 

Reimplemented from \hyperlink{classPamCutCollection_15785c75fb13b998422739e741bb5c01}{PamCutCollection}.

Reimplemented in \hyperlink{classVerboseCollection_3fcdf28d50507d772647d4306a78f3cc}{VerboseCollection}.

Definition at line 33 of file SmartCollection.cpp.

References \_\-actions.\hypertarget{classSmartCollection_acadaf64f683e7932c376e924e7020ea}{
\index{SmartCollection@{SmartCollection}!GetAction@{GetAction}}
\index{GetAction@{GetAction}!SmartCollection@{SmartCollection}}
\subsubsection[{GetAction}]{\setlength{\rightskip}{0pt plus 5cm}{\bf CollectionAction} $\ast$ SmartCollection::GetAction (unsigned int {\em iAction})}}
\label{classSmartCollection_acadaf64f683e7932c376e924e7020ea}


Returns the iAction-th action. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em iAction}]The index of the desired \hyperlink{classCollectionAction}{CollectionAction}, defined as the insertion order (from 0 to \#actions-1, see \hyperlink{classSmartCollection_9265adb168bca295f264af65276a002b}{AddAction()}). \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]pointer to the iAction-th action; NULL if the specified action cannot be found or if no actions are present. \end{Desc}


Definition at line 16 of file SmartCollection.cpp.

References \_\-actions.\hypertarget{classSmartCollection_99ac049c98461fbe04167f386ca7ed76}{
\index{SmartCollection@{SmartCollection}!OnBad@{OnBad}}
\index{OnBad@{OnBad}!SmartCollection@{SmartCollection}}
\subsubsection[{OnBad}]{\setlength{\rightskip}{0pt plus 5cm}void SmartCollection::OnBad (PamLevel2 $\ast$ {\em event}, \/  int {\em selectionResult})\hspace{0.3cm}{\tt  \mbox{[}virtual\mbox{]}}}}
\label{classSmartCollection_99ac049c98461fbe04167f386ca7ed76}


Post-selection tasks. 

This routine is automatically called after a bad event has been rejected by \hyperlink{classPamCutCollection_e7af429a3afef3685cbd5aa076ef96e5}{ApplyCut()}. It will simply call \hyperlink{classPamCut_cbb3b507d79f20878fac4392ffa57acb}{PamCutCollection::OnBad()} and then \hyperlink{classCollectionAction_ef4ee9fd63c0d232e90694e068e6e339}{CollectionAction::OnBad()} for each action in the \hyperlink{classSmartCollection}{SmartCollection}.

\begin{Desc}
\item[See also:]\hyperlink{classSmartCollection_13ce6deb47b60d10225598dd1201cd80}{OnGood} \end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em event}]The event which don't satisfy the cut. \item[{\em selectionResult}]The return value of the \hyperlink{classPamCutCollection_85f04cef7b560a37061391dd397813a7}{Check()} routine. \end{description}
\end{Desc}


Reimplemented from \hyperlink{classPamCut_cbb3b507d79f20878fac4392ffa57acb}{PamCut}.

Definition at line 49 of file SmartCollection.cpp.

References \_\-actions.\hypertarget{classSmartCollection_13ce6deb47b60d10225598dd1201cd80}{
\index{SmartCollection@{SmartCollection}!OnGood@{OnGood}}
\index{OnGood@{OnGood}!SmartCollection@{SmartCollection}}
\subsubsection[{OnGood}]{\setlength{\rightskip}{0pt plus 5cm}void SmartCollection::OnGood (PamLevel2 $\ast$ {\em event})\hspace{0.3cm}{\tt  \mbox{[}virtual\mbox{]}}}}
\label{classSmartCollection_13ce6deb47b60d10225598dd1201cd80}


Post-selection tasks. 

This routine is automatically called after a good event has been selected by \hyperlink{classPamCutCollection_e7af429a3afef3685cbd5aa076ef96e5}{ApplyCut()}. It will simply call \hyperlink{classPamCut_56021e959232270c12528ddec3062985}{PamCutCollection::OnGood()} and then \hyperlink{classCollectionAction_801dd664020b71e8a3232e5a584d96a0}{CollectionAction::OnGood()} for each action in the \hyperlink{classSmartCollection}{SmartCollection}. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em event}]The event which satisfy the cut. \end{description}
\end{Desc}


Reimplemented from \hyperlink{classPamCut_56021e959232270c12528ddec3062985}{PamCut}.

Definition at line 41 of file SmartCollection.cpp.

References \_\-actions.\hypertarget{classSmartCollection_9b5b11a854b9e174218ea516ceffb34c}{
\index{SmartCollection@{SmartCollection}!Setup@{Setup}}
\index{Setup@{Setup}!SmartCollection@{SmartCollection}}
\subsubsection[{Setup}]{\setlength{\rightskip}{0pt plus 5cm}void SmartCollection::Setup (PamLevel2 $\ast$ {\em events})\hspace{0.3cm}{\tt  \mbox{[}virtual\mbox{]}}}}
\label{classSmartCollection_9b5b11a854b9e174218ea516ceffb34c}


The pre-analysis task definition. 

This override of the \hyperlink{classSmartCollection_9b5b11a854b9e174218ea516ceffb34c}{Setup()} method calls \hyperlink{classSmartCollection_9b5b11a854b9e174218ea516ceffb34c}{Setup()} for the base class \hyperlink{classPamCutCollection}{PamCutCollection}, and subsequently for each action contained in the \hyperlink{classSmartCollection}{SmartCollection}.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em events}]The PamLevel2 pointer to the events that will be analyzed. Used only as parameter for \hyperlink{classCollectionAction_13adbcacf5e088f7979f0644a65372b4}{CollectionAction::Setup()}. \end{description}
\end{Desc}


Reimplemented from \hyperlink{classPamCutCollection_982821389af5e585688611d733b3a7b0}{PamCutCollection}.

Definition at line 25 of file SmartCollection.cpp.

References \_\-actions.

\subsection{Member Data Documentation}
\hypertarget{classSmartCollection_a80a9cf5cab3683a61b47a1145ff8f15}{
\index{SmartCollection@{SmartCollection}!\_\-actions@{\_\-actions}}
\index{\_\-actions@{\_\-actions}!SmartCollection@{SmartCollection}}
\subsubsection[{\_\-actions}]{\setlength{\rightskip}{0pt plus 5cm}std::vector$<${\bf CollectionAction}$\ast$$>$ {\bf SmartCollection::\_\-actions}\hspace{0.3cm}{\tt  \mbox{[}private\mbox{]}}}}
\label{classSmartCollection_a80a9cf5cab3683a61b47a1145ff8f15}




Definition at line 93 of file SmartCollection.h.

Referenced by AddAction(), Finalize(), GetAction(), OnBad(), OnGood(), and Setup().

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
Collections/SmartCollection/\hyperlink{SmartCollection_8h}{SmartCollection.h}\item 
Collections/SmartCollection/\hyperlink{SmartCollection_8cpp}{SmartCollection.cpp}\end{CompactItemize}
