--- PamCut/doc/PamCutDevGuide.tex 2009/05/27 13:30:01 1.1.1.1 +++ PamCut/doc/PamCutDevGuide.tex 2009/06/05 13:33:18 1.2 @@ -86,10 +86,42 @@ calling {\bf Setup} at the beginning of the analysis, {\bf OnGood} and {\bf OnBad} for every event (depending on the selection result), and {\bf Finalize} at the end of the analysis. In all other aspects, it behaves exactly as {\bf -PamCutCollection}.\\ +PamCutCollection}. The handling of the actions depend on their position with +respect to cuts. In the main analysis code, cuts can be added to the +collection; then, an action or more can be added. This sequence of cuts and the +actions added after the cuts will be called a bunch. The last bunch may have no +actions at its end. +\begin{verbatim} + . + . + . +Cut1 cut1(``cut1''); +Cut2 cut2(``cut2''); +Action1 action1(``action1''); + +Cut1 cut3(``cut3''); +Cut2 cut4(``cut4''); +Cut1 cut5(``cut5''); +Cut2 cut6(``cut6''); +Action1 action2(``action2''); +Action1 action3(``action3''); + . + . + . +\end{verbatim} +In the example above, {\bf cut1}, {\bf cut2} and {\bf action1} are the first +bunch, {\bf cut3}, {\bf cut4}, {\bf cut5}, {\bf cut6}, {\bf action2} and {\bf +action3} are the second bunch and so on. If all the cuts in the bunch are +successful, the {\bf SmartCollection} will call {\bf OnGood} for every action +in that bunch, and then the analysis will go on with the next bunch for the same +event. If a certain cut in a bunch fails, then {\bf OnBad} is called for the +actions of the bunch, but successive bunches are ignored; the current event is +discarded and the focus switches on the next one (the {\bf +SmartBlindCollection} behaves a little different; see the Doxygen +documentation for more details.) +\\ Loosely speaking, after defining an action one simply has to instantiate it, -add it to a {\bf SmartCollection} and launch the analysis (fire and -forget\ldots). +add it to a {\bf SmartCollection} and launch the analysis. \section{The software organization} The software is organized in a tree of directories. The idea is that each node