]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG1/TRD/info/AliTRDeventInfo.cxx
new classes for TRD trending and alarm management
[u/mrichter/AliRoot.git] / PWG1 / TRD / info / AliTRDeventInfo.cxx
CommitLineData
1ee39b3a 1#include "AliESDHeader.h"
2#include "AliESDRun.h"
3
4#include "AliTRDeventInfo.h"
5
6ClassImp(AliTRDeventInfo)
7
8AliTRDeventInfo::AliTRDeventInfo():
9 TObject()
10 ,fHeader(0x0)
11 ,fRun(0x0)
12{
13 //
14 // Default Constructor
15 //
16 SetBit(kOwner, 0);
17}
18
19AliTRDeventInfo::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
30AliTRDeventInfo::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
42AliTRDeventInfo& 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
53AliTRDeventInfo::~AliTRDeventInfo(){
54 //
55 // Destructor
56 // Delete the entries if it is the Owner
57 //
58 Delete("");
59}
60
61void 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
74void AliTRDeventInfo::SetOwner(){
75 SetBit(kOwner, 1);
76 // Do deep copy
77 fHeader = new AliESDHeader(*fHeader);
78 fRun = new AliESDRun(*fRun);
79}