--- PamCut/doc/Doxygen/latex/classSmartCollection.tex	2009/05/27 13:30:01	1.1
+++ PamCut/doc/Doxygen/latex/classSmartCollection.tex	2009/06/05 13:15:23	1.2
@@ -10,7 +10,7 @@
 Inheritance diagram for SmartCollection::\begin{figure}[H]
 \begin{center}
 \leavevmode
-\includegraphics[height=4cm]{classSmartCollection}
+\includegraphics[height=5cm]{classSmartCollection}
 \end{center}
 \end{figure}
 \subsection*{Public Member Functions}
@@ -18,9 +18,15 @@
 \item 
 \hyperlink{classSmartCollection_597157bb186c4688cd305b62a197009d}{SmartCollection} (const char $\ast$collectionName)
 \begin{CompactList}\small\item\em Constructor. \item\end{CompactList}\item 
-\hyperlink{classSmartCollection_63fdadd219eb42065c6e9adc63558b63}{$\sim$SmartCollection} ()
+\hypertarget{classSmartCollection_63fdadd219eb42065c6e9adc63558b63}{
+\hyperlink{classSmartCollection_63fdadd219eb42065c6e9adc63558b63}{$\sim$SmartCollection} ()}
+\label{classSmartCollection_63fdadd219eb42065c6e9adc63558b63}
+
 \begin{CompactList}\small\item\em Destructor. \item\end{CompactList}\item 
-virtual void \hyperlink{classSmartCollection_9265adb168bca295f264af65276a002b}{AddAction} (\hyperlink{classCollectionAction}{CollectionAction} \&action)
+\hypertarget{classSmartCollection_9265adb168bca295f264af65276a002b}{
+virtual void \hyperlink{classSmartCollection_9265adb168bca295f264af65276a002b}{AddAction} (\hyperlink{classCollectionAction}{CollectionAction} \&action)}
+\label{classSmartCollection_9265adb168bca295f264af65276a002b}
+
 \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 
@@ -28,23 +34,31 @@
 \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}
+int \hyperlink{classSmartCollection_98213ec078e9b94ea70c72132757da46}{ApplyCut} (PamLevel2 $\ast$event)
+\end{CompactItemize}
+\subsection*{Protected Attributes}
 \begin{CompactItemize}
 \item 
-std::vector$<$ \hyperlink{classCollectionAction}{CollectionAction} $\ast$ $>$ \hyperlink{classSmartCollection_a80a9cf5cab3683a61b47a1145ff8f15}{\_\-actions}
+\hypertarget{classSmartCollection_a80a9cf5cab3683a61b47a1145ff8f15}{
+std::vector$<$ \hyperlink{classCollectionAction}{CollectionAction} $\ast$ $>$ \textbf{\_\-actions}}
+\label{classSmartCollection_a80a9cf5cab3683a61b47a1145ff8f15}
+
+\item 
+\hypertarget{classSmartCollection_732af2b9a16d0c098ce90ed29e15d09f}{
+std::vector$<$ unsigned int $>$ \textbf{\_\-actionsPositions}}
+\label{classSmartCollection_732af2b9a16d0c098ce90ed29e15d09f}
+
 \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. 
+The \hyperlink{classSmartCollection}{SmartCollection} class is designed to handle \hyperlink{classCollectionAction}{CollectionAction} objects. It holds a vector of these objects and takes care of calling Setup and Finalize for each of them at the beginning and at the end of the analysis, respectively. Actions can be added to the \hyperlink{classSmartCollection}{SmartCollection} by means of the \hyperlink{classSmartCollection_9265adb168bca295f264af65276a002b}{AddAction()} method. If a bunch of cuts have been already added to the collection, the action will be logically placed after the cuts. The \hyperlink{classSmartCollection}{SmartCollection} will call \hyperlink{classCollectionAction_077319900b1cde36b6baca9e6699ec5a}{CollectionAction::OnGood()} if the cuts preceding the actions are satisfied, and \hyperlink{classCollectionAction_ef4ee9fd63c0d232e90694e068e6e339}{CollectionAction::OnBad()} if at least one of them fails. An action will not be sensitive to cuts added to the collection after the action itself. The resulting structure is composed by bunches of cuts intertwined by actions, which are \char`\"{}executed\char`\"{} depending on the result of the bunch of cuts that precedes the action. Note that \hyperlink{classCollectionAction_ef4ee9fd63c0d232e90694e068e6e339}{CollectionAction::OnBad()} is called only for those actions at the end of the bunch where the first failed cut is: if after these actions there are other bunches of cuts and actions, they will be ignored. For example, in the sequence below:
+
+$|$ cut1 $|$ cut2 $|$ action1 $|$ action2 $|$ cut3 $|$ cut4 $|$ action3 $|$ ...
 
-Definition at line 26 of file SmartCollection.h.
+action1 and action2 are executed (eg., OnGood is called for them) if cut1 and cut2 are both satisfied, then cut3 and cut4 are evaluated and if both of them are satisfied then action3 is executed. If, for example, cut 1 or cut2 fail, then OnBad is called for action1 and action2; however, cut3, cut4, action3 and all that follows are ignored. The analysis goes on with the next event. 
 
 \subsection{Constructor \& Destructor Documentation}
 \hypertarget{classSmartCollection_597157bb186c4688cd305b62a197009d}{
@@ -63,34 +77,28 @@
 \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}
+\hypertarget{classSmartCollection_98213ec078e9b94ea70c72132757da46}{
+\index{SmartCollection@{SmartCollection}!ApplyCut@{ApplyCut}}
+\index{ApplyCut@{ApplyCut}!SmartCollection@{SmartCollection}}
+\subsubsection[{ApplyCut}]{\setlength{\rightskip}{0pt plus 5cm}int SmartCollection::ApplyCut (PamLevel2 $\ast$ {\em event})\hspace{0.3cm}{\tt  \mbox{[}virtual\mbox{]}}}}
+\label{classSmartCollection_98213ec078e9b94ea70c72132757da46}
+
 
+Applies the cuts and executes the actions.
 
-Adds an action to the \hyperlink{classSmartCollection}{SmartCollection}. 
+When cuts are applied, a \hyperlink{classSmartCollection}{SmartCollection} will also execute the actions at the end of the bunches of cuts.
 
+\begin{Desc}
+\item[Parameters:]
+\begin{description}
+\item[{\em event}]The event to analyze. \end{description}
+\end{Desc}
 
 
-Definition at line 12 of file SmartCollection.cpp.
+Reimplemented from \hyperlink{classPamCutCollection_e7af429a3afef3685cbd5aa076ef96e5}{PamCutCollection}.
 
-References \_\-actions.\hypertarget{classSmartCollection_8105730615ad127a482a7fb399695977}{
+Reimplemented in \hyperlink{classSmartBlindCollection_1eb231a8a437018bfd966644c7b18ba4}{SmartBlindCollection}.\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{]}}}}
@@ -103,11 +111,7 @@
 
 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}{
+Reimplemented in \hyperlink{classVerboseBlindCollection_43d6ea7b5ea35c5dbb342e23584b79ee}{VerboseBlindCollection}, and \hyperlink{classVerboseCollection_3fcdf28d50507d772647d4306a78f3cc}{VerboseCollection}.\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})}}
@@ -123,55 +127,7 @@
 \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}{
+\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{]}}}}
@@ -191,24 +147,6 @@
 
 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 
