/[PAMELA software]/PamCut/Collections/BlindCutCollection/BlindCutCollection.h
ViewVC logotype

Contents of /PamCut/Collections/BlindCutCollection/BlindCutCollection.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Tue Oct 27 10:18:53 2009 UTC (15 years, 1 month ago) by pam-fi
Branch: MAIN
CVS Tags: Root_V8, MergedToHEAD_1, nuclei_reproc, MergedFromV8_1, BeforeMergingFromV8_1, V9, HEAD
Branch point for: V8
Changes since 1.3: +4 -2 lines
File MIME type: text/plain
New ownership feature added.

1 /*
2 * BlindCutCollection.h
3 *
4 * Created on: 10-mar-2009
5 * Author: Nicola Mori
6 */
7
8 /*! @file BlindCutCollection.h The BlindCutCollection class definition file */
9
10 #ifndef BLINDCUTCOLLECTION_H_
11 #define BLINDCUTCOLLECTION_H_
12
13 #include "../../PamCutBase/PamCutBase.h"
14
15 /*! @brief A cut collection which applies all the cuts.
16 *
17 * This cut collection will apply all the cuts it contains to the
18 * events, even if some of them are not satisfied.
19 */
20 class BlindCutCollection: public PamCutCollection {
21 public:
22 /*! @brief Constructor.
23 *
24 * @param collectionName The collection's name.
25 * @param owns If true, the collection will own the cuts, ie., it will
26 * destroy them in its destructor.
27 */
28 BlindCutCollection(const char *collectionName, bool owns = true) :
29 PamCutCollection(collectionName, owns) {
30 }
31
32 /*! @brief Destructor. */
33 ~BlindCutCollection() {
34 }
35
36 /*! @brief Checks all the cuts.
37 *
38 * This method checks all the cuts for the current event. It exits only after
39 * all the cuts have been evaluated. Note that it doesn't call OnGood() nor OnBad(), not
40 * even for the PamCut objects in the collection.
41 *
42 * @param event The event to analyze.
43 * @return the index of the first failed cut (range: [0, \#cuts-1], see AddCut()); \
44 * #CUTOK if the event satisfies all the cuts.
45 */
46 int Check(PamLevel2 *event);
47
48 /*! @brief Applies all the cuts to the current event.
49 *
50 * This routine works pretty much like the redefinition of Check(), calling ApplyCut() (instead of
51 * Check() )for each cut. However, if a cut fails, it does not stops but continues until all the
52 * cuts are evaluated. If all the cuts are successful, on exit it calls OnGood(); if a single cut
53 * failed, it calls OnBad(), passing the index of the first failed cut as selectionResult.
54 *
55 * @param event The event to analyze.
56 * @return same return values as Check().
57 */
58 int ApplyCut(PamLevel2 *event);
59 //void OnGood(PamLevel2 *event){cout << "BlindCutCollection::OnGood" << endl;}
60 //void OnBad(PamLevel2 *event, int selectionResult){cout << "BlndCutCollection::OnBad, SelectionResult=" << selectionResult << endl;}
61
62 };
63
64 #endif /* BLINDCUTCOLLECTION_H_ */

  ViewVC Help
Powered by ViewVC 1.1.23