]>
Commit | Line | Data |
---|---|---|
2dab9030 | 1 | // |
2 | // Class AliRsnCutManager | |
3 | // | |
4 | // The cut manager: contains a complete set of cut definitions | |
5 | // to be applied to all possible targets (one for each target), | |
6 | // in order to ease the set-up procedure of cuts and allow to | |
7 | // pass them at once to each object which must use them | |
8 | // | |
9 | // author: Martin Vala (martin.vala@cern.ch) | |
10 | // | |
11 | ||
12 | #include "AliLog.h" | |
13 | ||
14 | #include "AliRsnCutManager.h" | |
15 | ||
16 | ClassImp(AliRsnCutManager) | |
17 | ||
18 | //_____________________________________________________________________________ | |
19 | AliRsnCutManager::AliRsnCutManager() : | |
20 | TNamed("defaultName", "defaultTitle"), | |
4820b1ae | 21 | fDaughterCutsCommon(0x0), |
22 | fDaughterCuts1(0x0), | |
23 | fDaughterCuts2(0x0), | |
2dab9030 | 24 | fMotherCuts(0x0) |
25 | { | |
26 | // | |
27 | // Constructor without arguments. | |
28 | // | |
2dab9030 | 29 | } |
30 | ||
31 | //_____________________________________________________________________________ | |
32 | AliRsnCutManager::AliRsnCutManager(const char *name, const char *title) : | |
33 | TNamed(name, title), | |
4820b1ae | 34 | fDaughterCutsCommon(0x0), |
35 | fDaughterCuts1(0x0), | |
36 | fDaughterCuts2(0x0), | |
2dab9030 | 37 | fMotherCuts(0x0) |
38 | { | |
39 | // | |
40 | // Constructor with name and title. | |
41 | // | |
2dab9030 | 42 | } |
43 | ||
44 | //_____________________________________________________________________________ | |
45 | AliRsnCutManager::AliRsnCutManager(const AliRsnCutManager &cut) : | |
46 | TNamed(cut), | |
4820b1ae | 47 | fDaughterCutsCommon(cut.fDaughterCutsCommon), |
48 | fDaughterCuts1(cut.fDaughterCuts1), | |
49 | fDaughterCuts2(cut.fDaughterCuts2), | |
2dab9030 | 50 | fMotherCuts(cut.fMotherCuts) |
51 | { | |
52 | // | |
53 | // Constructor with name and title. | |
54 | // | |
2dab9030 | 55 | } |
56 | ||
57 | AliRsnCutManager& AliRsnCutManager::operator=(const AliRsnCutManager &cut) | |
58 | { | |
59 | // | |
60 | // Assign operator | |
61 | // | |
62 | ||
63 | SetName(cut.GetName()); | |
64 | SetTitle(cut.GetTitle()); | |
65 | ||
4820b1ae | 66 | fDaughterCuts2 = cut.fDaughterCuts2; |
67 | fDaughterCuts1 = cut.fDaughterCuts1; | |
68 | fDaughterCutsCommon = cut.fDaughterCutsCommon; | |
69 | fMotherCuts = cut.fMotherCuts; | |
2dab9030 | 70 | |
71 | return (*this); | |
72 | } | |
73 | ||
74 | //_____________________________________________________________________________ | |
75 | AliRsnCutManager::~AliRsnCutManager() | |
76 | { | |
77 | // | |
78 | // Destructor. | |
79 | // Deletes all cut definitions. | |
80 | // | |
81 | ||
4820b1ae | 82 | delete fDaughterCuts2; |
83 | delete fDaughterCuts1; | |
84 | delete fDaughterCutsCommon; | |
2dab9030 | 85 | delete fMotherCuts; |
86 | } | |
87 | ||
88 | //_____________________________________________________________________________ | |
89 | void AliRsnCutManager::SetEvent(AliRsnEvent *event) | |
90 | { | |
91 | // | |
92 | // Sets reference event in all cut sets | |
93 | // | |
94 | ||
4820b1ae | 95 | if (fDaughterCuts2 ) fDaughterCuts2 ->SetEvent(event); |
96 | if (fDaughterCuts1 ) fDaughterCuts1 ->SetEvent(event); | |
97 | if (fDaughterCutsCommon) fDaughterCutsCommon ->SetEvent(event); | |
98 | if (fMotherCuts ) fMotherCuts ->SetEvent(event); | |
2dab9030 | 99 | } |