]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/RESONANCES/AliRsnCutManager.cxx
Mkdir uses option -p to create directories
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnCutManager.cxx
CommitLineData
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
16ClassImp(AliRsnCutManager)
17
18//_____________________________________________________________________________
19AliRsnCutManager::AliRsnCutManager() :
20 TNamed("defaultName", "defaultTitle"),
21 fMotherCuts(0x0)
22{
23//
24// Constructor without arguments.
25//
26
27 Int_t i;
28 for (i = 0; i < 3; i++) fDaughterCuts[i] = 0x0;
29}
30
31//_____________________________________________________________________________
32AliRsnCutManager::AliRsnCutManager(const char *name, const char *title) :
33 TNamed(name, title),
34 fMotherCuts(0x0)
35{
36//
37// Constructor with name and title.
38//
39
40 Int_t i;
41 for (i = 0; i < 3; i++) fDaughterCuts[i] = 0x0;
42}
43
44//_____________________________________________________________________________
45AliRsnCutManager::AliRsnCutManager(const AliRsnCutManager &cut) :
46 TNamed(cut),
47 fMotherCuts(cut.fMotherCuts)
48{
49//
50// Constructor with name and title.
51//
52
53 Int_t i;
54 for (i = 0; i < 3; i++) fDaughterCuts[i] = cut.fDaughterCuts[i];
55}
56
57AliRsnCutManager& AliRsnCutManager::operator=(const AliRsnCutManager &cut)
58{
59//
60// Assign operator
61//
62
63 SetName(cut.GetName());
64 SetTitle(cut.GetTitle());
65
66 Int_t i;
67 for (i = 0; i < 3; i++) fDaughterCuts[i] = cut.fDaughterCuts[i];
68
69 fMotherCuts = cut.fMotherCuts;
70
71 return (*this);
72}
73
74//_____________________________________________________________________________
75AliRsnCutManager::~AliRsnCutManager()
76{
77//
78// Destructor.
79// Deletes all cut definitions.
80//
81
82 Int_t i;
83 for (i = 0; i < 3; i++) delete fDaughterCuts[i];
84
85 delete fMotherCuts;
86}
87
88//_____________________________________________________________________________
89void AliRsnCutManager::SetEvent(AliRsnEvent *event)
90{
91//
92// Sets reference event in all cut sets
93//
94
95 Int_t i;
96 for (i = 0; i < 3; i++) if (fDaughterCuts[i]) fDaughterCuts[i]->SetEvent(event);
97
98 if (fMotherCuts) fMotherCuts->SetEvent(event);
99}