| 86 |
calling {\bf Setup} at the beginning of the analysis, {\bf OnGood} and {\bf |
calling {\bf Setup} at the beginning of the analysis, {\bf OnGood} and {\bf |
| 87 |
OnBad} for every event (depending on the selection result), and {\bf Finalize} |
OnBad} for every event (depending on the selection result), and {\bf Finalize} |
| 88 |
at the end of the analysis. In all other aspects, it behaves exactly as {\bf |
at the end of the analysis. In all other aspects, it behaves exactly as {\bf |
| 89 |
PamCutCollection}.\\ |
PamCutCollection}. The handling of the actions depend on their position with |
| 90 |
|
respect to cuts. In the main analysis code, cuts can be added to the |
| 91 |
|
collection; then, an action or more can be added. This sequence of cuts and the |
| 92 |
|
actions added after the cuts will be called a bunch. The last bunch may have no |
| 93 |
|
actions at its end. |
| 94 |
|
\begin{verbatim} |
| 95 |
|
. |
| 96 |
|
. |
| 97 |
|
. |
| 98 |
|
Cut1 cut1(``cut1''); |
| 99 |
|
Cut2 cut2(``cut2''); |
| 100 |
|
Action1 action1(``action1''); |
| 101 |
|
|
| 102 |
|
Cut1 cut3(``cut3''); |
| 103 |
|
Cut2 cut4(``cut4''); |
| 104 |
|
Cut1 cut5(``cut5''); |
| 105 |
|
Cut2 cut6(``cut6''); |
| 106 |
|
Action1 action2(``action2''); |
| 107 |
|
Action1 action3(``action3''); |
| 108 |
|
. |
| 109 |
|
. |
| 110 |
|
. |
| 111 |
|
\end{verbatim} |
| 112 |
|
In the example above, {\bf cut1}, {\bf cut2} and {\bf action1} are the first |
| 113 |
|
bunch, {\bf cut3}, {\bf cut4}, {\bf cut5}, {\bf cut6}, {\bf action2} and {\bf |
| 114 |
|
action3} are the second bunch and so on. If all the cuts in the bunch are |
| 115 |
|
successful, the {\bf SmartCollection} will call {\bf OnGood} for every action |
| 116 |
|
in that bunch, and then the analysis will go on with the next bunch for the same |
| 117 |
|
event. If a certain cut in a bunch fails, then {\bf OnBad} is called for the |
| 118 |
|
actions of the bunch, but successive bunches are ignored; the current event is |
| 119 |
|
discarded and the focus switches on the next one (the {\bf |
| 120 |
|
SmartBlindCollection} behaves a little different; see the Doxygen |
| 121 |
|
documentation for more details.) |
| 122 |
|
\\ |
| 123 |
Loosely speaking, after defining an action one simply has to instantiate it, |
Loosely speaking, after defining an action one simply has to instantiate it, |
| 124 |
add it to a {\bf SmartCollection} and launch the analysis (fire and |
add it to a {\bf SmartCollection} and launch the analysis. |
|
forget\ldots). |
|
| 125 |
|
|
| 126 |
\section{The software organization} |
\section{The software organization} |
| 127 |
The software is organized in a tree of directories. The idea is that each node |
The software is organized in a tree of directories. The idea is that each node |