--- PamCut/doc/Doxygen/html/classSmartCollection.html 2009/05/27 13:30:05 1.1.1.1 +++ PamCut/doc/Doxygen/html/classSmartCollection.html 2009/09/25 15:41:54 1.3 @@ -33,9 +33,11 @@

-PamCutCollection -PamCut -VerboseCollection +PamCutCollection +PamCut +SmartBlindCollection +VerboseCollection +VerboseBlindCollection @@ -46,12 +48,14 @@  SmartCollection (const char *collectionName)  Constructor.
~SmartCollection () +~SmartCollection () - Destructor.
-virtual void AddAction (CollectionAction &action) + Destructor.
+ +virtual void AddAction (CollectionAction &action) - Adds an action to the SmartCollection.
+ Adds an action to the SmartCollection.
CollectionActionGetAction (unsigned int iAction)  Returns the iAction-th action.
@@ -61,22 +65,22 @@ void Finalize ()  The post-analysis task definition.
-void OnGood (PamLevel2 *event) +int ApplyCut (PamLevel2 *event) - Post-selection tasks.
-void OnBad (PamLevel2 *event, int selectionResult) +

Protected Attributes

+ +std::vector< CollectionAction * > _actions - Post-selection tasks.
-

Private Attributes

-std::vector< CollectionAction * > _actions + +std::vector< unsigned int > _actionsPositions

Detailed Description

A collection class designed to use CollectionAction objects.

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

Definition at line 26 of file SmartCollection.h.

-

Constructor & Destructor Documentation

+The SmartCollection class is designed to handle 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 SmartCollection by means of the AddAction() method. If a bunch of cuts have been already added to the collection, the action will be logically placed after the cuts. The SmartCollection will call CollectionAction::OnGood() if the cuts preceding the actions are satisfied, and 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 "executed" depending on the result of the bunch of cuts that precedes the action. Note that 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 | ...

+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.


Constructor & Destructor Documentation

@@ -102,43 +106,18 @@ -

Definition at line 34 of file SmartCollection.h.

- -
-

- -

-
- - - - - - - - -
SmartCollection::~SmartCollection (  )  [inline]
-
-
- -

-Destructor. -

- -

Definition at line 39 of file SmartCollection.h.

-


Member Function Documentation

- +
- + - - + + @@ -147,12 +126,17 @@

-Adds an action to the SmartCollection. -

+Applies the cuts and executes the actions.

+When cuts are applied, a SmartCollection will also execute the actions at the end of the bunches of cuts.

+

Parameters:
+
void SmartCollection::AddAction int SmartCollection::ApplyCut (CollectionAction action PamLevel2 *  event  )  [virtual]
+ +
event The event to analyze.
+ -

Definition at line 12 of file SmartCollection.cpp.

+

Reimplemented from PamCutCollection.

-

References _actions.

+

Reimplemented in SmartBlindCollection.

@@ -177,11 +161,7 @@ This override of the Finalize() method calls PamCutCollection::Finalize() and then the Finalize() method of each action contained in the SmartCollection.

Reimplemented from PamCutCollection.

-

Reimplemented in VerboseCollection.

- -

Definition at line 33 of file SmartCollection.cpp.

- -

References _actions.

+

Reimplemented in VerboseBlindCollection, and VerboseCollection.

@@ -211,88 +191,6 @@

Returns:
pointer to the iAction-th action; NULL if the specified action cannot be found or if no actions are present.
-

Definition at line 16 of file SmartCollection.cpp.

- -

References _actions.

- - -

- -

-
- - - - - - - - - - - - - - - - - - -
void SmartCollection::OnBad (PamLevel2 *  event,
int  selectionResult 
) [virtual]
-
-
- -

-Post-selection tasks. -

-This routine is automatically called after a bad event has been rejected by ApplyCut(). It will simply call PamCutCollection::OnBad() and then CollectionAction::OnBad() for each action in the SmartCollection.

-

See also:
OnGood
-
Parameters:
- - - -
event The event which don't satisfy the cut.
selectionResult The return value of the Check() routine.
-
- -

Reimplemented from PamCut.

- -

Definition at line 49 of file SmartCollection.cpp.

- -

References _actions.

- -
-

- -

-
- - - - - - - - - -
void SmartCollection::OnGood (PamLevel2 *  event  )  [virtual]
-
-
- -

-Post-selection tasks. -

-This routine is automatically called after a good event has been selected by ApplyCut(). It will simply call PamCutCollection::OnGood() and then CollectionAction::OnGood() for each action in the SmartCollection.

Parameters:
- - -
event The event which satisfy the cut.
-
- -

Reimplemented from PamCut.

- -

Definition at line 41 of file SmartCollection.cpp.

- -

References _actions.

-

@@ -323,36 +221,12 @@

Reimplemented from PamCutCollection.

-

Definition at line 25 of file SmartCollection.cpp.

- -

References _actions.

- - -

-


Member Data Documentation

- -
-
- - - - -
std::vector<CollectionAction*> SmartCollection::_actions [private]
-
-
- -

- -

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: +
  • Collections/SmartCollection/SmartCollection.h
  • Collections/SmartCollection/SmartCollection.cpp -
    Generated on Wed May 27 15:21:43 2009 for PamCut by  +
    Generated on Fri Jun 5 15:09:04 2009 for PamCut by  doxygen 1.5.9