]>
Commit | Line | Data |
---|---|---|
008ac94c | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. * | |
3 | * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for * | |
4 | * full copyright notice. * | |
5 | **************************************************************************/ | |
6 | ||
12a14dd5 | 7 | //////////////////////////////////////////////////////////////////////////// |
008ac94c | 8 | // |
12a14dd5 | 9 | // AliEveEventSelector class |
10 | // selects events according to given criteria | |
008ac94c | 11 | // |
12a14dd5 | 12 | // origin: Mikolaj Krzewicki, Nikhef, Mikolaj.Krzewicki@cern.ch |
13 | // | |
14 | //////////////////////////////////////////////////////////////////////////// | |
15 | ||
16 | #ifndef AliEveEventSelector_H | |
17 | #define AliEveEventSelector_H | |
008ac94c | 18 | |
19 | #include "AliEveEventManager.h" | |
20 | #include <TObject.h> | |
21 | #include <TString.h> | |
22 | ||
23 | class TTree; | |
24 | class TList; | |
25 | class AliESDEvent; | |
26 | class TEntryList; | |
27 | class AliEveEventManager; | |
28 | class TString; | |
29 | class TObjArray; | |
30 | ||
31 | class AliEveEventSelector : public TObject | |
32 | { | |
33 | public: | |
34 | AliEveEventSelector(AliEveEventManager* evman); | |
35 | void SetEventManager(AliEveEventManager* evman) { fPEventManager = evman; } | |
36 | AliEveEventManager* GetEventManager() { return fPEventManager; } | |
37 | TTree* GetESDTree() const { return fPEventManager->GetESDTree(); } | |
38 | ||
67d0de39 | 39 | Bool_t FindNext(Int_t& i); |
40 | Bool_t FindPrev(Int_t& i); | |
008ac94c | 41 | |
42 | void SetSelectionString( const TString& str ); | |
43 | void SetSelectionString( const char* str ); | |
44 | TString GetSelectionString() {return fString;} | |
45 | Bool_t GetSelectOnString() {return fSelectOnString;} | |
46 | void SetSelectOnString( const Bool_t b = kTRUE ) {fSelectOnString = b;} | |
47 | void SetWrapAround( const Bool_t b = kTRUE ) {fWrapAround = b;} | |
48 | Bool_t GetWrapAround() const { return fWrapAround; } | |
49 | void Update(); | |
50 | ||
51 | void SetSelectOnTriggerType( const Bool_t b = kTRUE ) {fSelectOnTriggerType = b;} | |
52 | void SetTriggerType( const TString& type ); | |
53 | void SetTriggerType( const char* type ); | |
54 | TString GetTriggerType() const {return fTriggerType;} | |
55 | Bool_t GetSelectOnTriggerType() {return fSelectOnTriggerType;} | |
56 | ||
57 | void SetSelectOnTriggerString( const Bool_t b=kTRUE ) { fSelectOnTriggerString = b; } | |
58 | void SetTriggerSelectionString( const TString m ); | |
59 | TString GetTriggerSelectionString() const { return fTriggerSelectionString; } | |
60 | Bool_t GetSelectOnTriggerString() const { return fSelectOnTriggerString; } | |
61 | void SetTriggerMaskPatternString( TString str) { fTriggerMaskPatternString = str; } | |
62 | TString GetTriggerMaskPatternString() const { return fTriggerMaskPatternString; } | |
63 | ||
64 | void SetSelectOnMultiplicity( const Bool_t b = kTRUE) { fSelectOnMultiplicity = b; } | |
65 | Bool_t GetSelectOnMultiplicity() { return fSelectOnMultiplicity; } | |
66 | void SetMultiplicityLow( const Int_t low ) { fMultiplicityLow = low; } | |
67 | void SetMultiplicityHigh( const Int_t high ) { fMultiplicityHigh = high; } | |
68 | Int_t GetMultiplicityLow() { return fMultiplicityLow; } | |
69 | Int_t GetMultiplicityHigh() { return fMultiplicityHigh; } | |
70 | ||
71 | protected: | |
72 | void UpdateEntryList(); | |
73 | Bool_t CheckOtherSelection(AliESDEvent* ESD); | |
74 | ||
75 | private: | |
76 | AliEveEventSelector(const AliEveEventSelector&); | |
77 | AliEveEventSelector& operator=(const AliEveEventSelector&); | |
78 | ||
12a14dd5 | 79 | AliEveEventManager *fPEventManager; //event manager |
80 | Bool_t fWrapAround; //go back to the first event after the last? | |
008ac94c | 81 | |
67d0de39 | 82 | Bool_t fSelectOnString; //whether to select on string expression |
12a14dd5 | 83 | TString fString; //expression to select on |
84 | TEntryList* fPEntryList; //list of enry numbers after selection | |
85 | Int_t fEntryListId; //current entry no. in entry list | |
67d0de39 | 86 | Int_t fLastTreeSize; //stores the last treesize |
12a14dd5 | 87 | |
67d0de39 | 88 | Bool_t fSelectOnTriggerType; //whether to select on trigger type |
12a14dd5 | 89 | TString fTriggerType; //trigger type |
90 | ||
67d0de39 | 91 | Bool_t fSelectOnTriggerString; //whether to select on trigger type with a formula |
12a14dd5 | 92 | TString fTriggerSelectionString; //trigger selection formula |
93 | TString fTriggerMaskPatternString; //trigger mask placeholder for evaluation | |
94 | ||
95 | Bool_t fSelectOnMultiplicity; //whether to select on multiplicity | |
67d0de39 | 96 | Int_t fMultiplicityLow; //lower bound on multiplicity |
97 | Int_t fMultiplicityHigh; //higher bound on multiplicity | |
008ac94c | 98 | |
99 | ||
100 | ClassDef(AliEveEventSelector, 2); | |
101 | }; | |
102 | ||
103 | #endif |