]>
Commit | Line | Data |
---|---|---|
1ee39b3a | 1 | #include "AliESDHeader.h" |
2 | #include "AliESDRun.h" | |
3 | ||
4 | #include "AliTRDeventInfo.h" | |
5 | ||
6 | ClassImp(AliTRDeventInfo) | |
7 | ||
8 | AliTRDeventInfo::AliTRDeventInfo(): | |
9 | TObject() | |
10 | ,fHeader(0x0) | |
11 | ,fRun(0x0) | |
12 | { | |
13 | // | |
14 | // Default Constructor | |
15 | // | |
16 | SetBit(kOwner, 0); | |
17 | } | |
18 | ||
19 | AliTRDeventInfo::AliTRDeventInfo(AliESDHeader *header, AliESDRun *run): | |
20 | TObject() | |
21 | ,fHeader(header) | |
22 | ,fRun(run) | |
23 | { | |
24 | // | |
25 | // Constructor with Arguments | |
26 | // | |
27 | SetBit(kOwner, 0); | |
28 | } | |
29 | ||
30 | AliTRDeventInfo::AliTRDeventInfo(const AliTRDeventInfo &info): | |
31 | TObject() | |
32 | ,fHeader(info.fHeader) | |
33 | ,fRun(info.fRun) | |
34 | { | |
35 | // | |
36 | // Copy Constructor | |
37 | // Flat Copy | |
38 | // | |
39 | SetBit(kOwner, 0); | |
40 | } | |
41 | ||
42 | AliTRDeventInfo& AliTRDeventInfo::operator=(const AliTRDeventInfo& info){ | |
43 | // | |
44 | // Operator= | |
45 | // Flat Copy | |
46 | // | |
47 | this->fHeader = info.fHeader; | |
48 | this->fRun = info.fRun; | |
49 | SetBit(kOwner, 0); | |
50 | return *this; | |
51 | } | |
52 | ||
53 | AliTRDeventInfo::~AliTRDeventInfo(){ | |
54 | // | |
55 | // Destructor | |
56 | // Delete the entries if it is the Owner | |
57 | // | |
58 | Delete(""); | |
59 | } | |
60 | ||
61 | void AliTRDeventInfo::Delete(const Option_t *){ | |
62 | // | |
63 | // Delete the Object | |
64 | // Delete the entries if it is the Owner | |
65 | // | |
66 | if(IsOwner()){ | |
67 | if(fHeader) delete fHeader; | |
68 | if(fRun) delete fRun; | |
69 | }; | |
70 | fHeader = 0x0; | |
71 | fRun = 0x0; | |
72 | } | |
73 | ||
74 | void AliTRDeventInfo::SetOwner(){ | |
75 | SetBit(kOwner, 1); | |
76 | // Do deep copy | |
77 | fHeader = new AliESDHeader(*fHeader); | |
78 | fRun = new AliESDRun(*fRun); | |
79 | } |