#include <SmartBlindCollection.h>

Public Member Functions | |
| SmartBlindCollection (const char *collectionName) | |
| Constructor. | |
| ~SmartBlindCollection () | |
| Destructor. | |
| virtual void | AddAction (CollectionAction &action) |
| Adds an action to the SmartCollection. | |
| CollectionAction * | GetAction (unsigned int iAction) |
| Returns the iAction-th action. | |
| void | Setup (PamLevel2 *events) |
| The pre-analysis task definition. | |
| void | Finalize () |
| The post-analysis task definition. | |
| void | OnGood (PamLevel2 *event) |
| Post-selection tasks. | |
| void | OnBad (PamLevel2 *event, int selectionResult) |
| Post-selection tasks. | |
Private Attributes | |
| std::vector< CollectionAction * > | _actions |
The SmartBlindCollection class is designed to handle CollectionAction objects. These defines the procedures to do when an event is selected or discarded. A SmartBlindCollection 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. This collection differs from SmartCollection only because it-s blind, ie., it will apply all the cuts to each events, even if some of them fail. See BlindCutCollection to get more info about blind collections.
Definition at line 28 of file SmartBlindCollection.h.
| SmartBlindCollection::SmartBlindCollection | ( | const char * | collectionName | ) | [inline] |
Constructor.
| collectionName | The collection's name. |
Definition at line 36 of file SmartBlindCollection.h.
| SmartBlindCollection::~SmartBlindCollection | ( | ) | [inline] |
| void SmartBlindCollection::AddAction | ( | CollectionAction & | action | ) | [virtual] |
Adds an action to the SmartCollection.
Definition at line 12 of file SmartBlindCollection.cpp.
References _actions.
| void SmartBlindCollection::Finalize | ( | ) | [virtual] |
The post-analysis task definition.
This override of the Finalize() method calls BlindCutCollection::Finalize() and then the Finalize() method of each action contained in the SmartCollection.
Reimplemented from PamCutCollection.
Reimplemented in VerboseBlindCollection.
Definition at line 33 of file SmartBlindCollection.cpp.
References _actions.
| CollectionAction * SmartBlindCollection::GetAction | ( | unsigned int | iAction | ) |
Returns the iAction-th action.
| iAction | The index of the desired CollectionAction, defined as the insertion order (from 0 to #actions-1, see AddAction()). |
Definition at line 16 of file SmartBlindCollection.cpp.
References _actions.
| void SmartBlindCollection::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 BlindCutCollection::OnBad() and then CollectionAction::OnBad() for each action in the SmartCollection.
| 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 SmartBlindCollection.cpp.
References _actions.
| void SmartBlindCollection::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 BlindCutCollection::OnGood() and then CollectionAction::OnGood() for each action in the SmartCollection.
| event | The event which satisfy the cut. |
Reimplemented from PamCut.
Definition at line 41 of file SmartBlindCollection.cpp.
References _actions.
| void SmartBlindCollection::Setup | ( | PamLevel2 * | events | ) | [virtual] |
The pre-analysis task definition.
This override of the Setup() method calls Setup() for the base class BlindCutCollection, and subsequently for each action contained in the SmartCollection.
| events | The PamLevel2 pointer to the events that will be analyzed. Used only as parameter for CollectionAction::Setup(). |
Reimplemented from PamCutCollection.
Definition at line 25 of file SmartBlindCollection.cpp.
References _actions.
std::vector<CollectionAction*> SmartBlindCollection::_actions [private] |
Definition at line 95 of file SmartBlindCollection.h.
Referenced by AddAction(), Finalize(), GetAction(), OnBad(), OnGood(), and Setup().
1.5.9