]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TOF/AliTOFChainSummaryData.cxx
par file fix
[u/mrichter/AliRoot.git] / TOF / AliTOFChainSummaryData.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
7  * Permission to use, copy, modify and distribute this software and its   *
8  * documentation strictly for non-commercial purposes is hereby granted   *
9  * without fee, provided that the above copyright notice appears in all   *
10  * copies and that both the copyright notice and this permission notice   *
11  * appear in the supporting documentation. The authors make no claims     *
12  * about the suitability of this software for any purpose. It is          *
13  * provided "as is" without express or implied warranty.                  *
14 ***************************************************************************/
15
16 /*
17   author: Roberto Preghenella (R+), preghenella@bo.infn.it
18 */
19
20
21 //////////////////////////////////////////////////////////////////////
22 //                                                                  //
23 //                                                                  //
24 //        This class provides a summary for TRM chain data.         //
25 //                                                                  //
26 //                                                                  //
27 //////////////////////////////////////////////////////////////////////
28
29 #include "AliTOFChainSummaryData.h"
30
31 ClassImp(AliTOFChainSummaryData)
32
33 AliTOFChainSummaryData::AliTOFChainSummaryData() :
34   TObject(),
35   fHeader(kFALSE),
36   fTrailer(kFALSE),
37   fChain(0),
38   fBunchID(0),
39   fPB24Temp(0),
40   fPB24ID(0),
41   fTSBit(0),
42   fStatus(0),
43   fEventCounter(0),
44   fTDCHitBuffer(0x0),
45   fTDCPackedHitBuffer(0x0),
46   fTDCErrorBuffer(0x0)
47 {
48   /* default constructor */
49   fTDCHitBuffer = new AliTOFTDCHitBuffer();
50   fTDCPackedHitBuffer = new AliTOFTDCHitBuffer();
51   fTDCErrorBuffer = new AliTOFTDCErrorBuffer();
52 }
53
54 //_________________________________________________________________
55
56 AliTOFChainSummaryData::AliTOFChainSummaryData(const AliTOFChainSummaryData &source) :
57   TObject(source),
58   fHeader(source.fHeader),
59   fTrailer(source.fTrailer),
60   fChain(source.fChain),
61   fBunchID(source.fBunchID),
62   fPB24Temp(source.fPB24Temp),
63   fPB24ID(source.fPB24ID),
64   fTSBit(source.fTSBit),
65   fStatus(source.fStatus),
66   fEventCounter(source.fEventCounter),
67   fTDCHitBuffer(0x0),
68   fTDCPackedHitBuffer(0x0),
69   fTDCErrorBuffer(0x0)
70 {
71 /* copy constructor */
72   fTDCHitBuffer = new AliTOFTDCHitBuffer(*source.fTDCHitBuffer);
73   fTDCPackedHitBuffer = new AliTOFTDCHitBuffer(*source.fTDCPackedHitBuffer);
74   fTDCErrorBuffer = new AliTOFTDCErrorBuffer(*source.fTDCErrorBuffer);
75 }
76
77 //_________________________________________________________________
78
79 AliTOFChainSummaryData &
80 AliTOFChainSummaryData::operator = (const AliTOFChainSummaryData &source)
81 {
82   /* operator = */
83   if(&source == this) return *this;
84   TObject::operator=(source);
85
86   fHeader = source.fHeader;
87   fTrailer = source.fTrailer;
88   fChain = source.fChain;
89   fBunchID = source.fBunchID;
90   fPB24Temp = source.fPB24Temp;
91   fPB24ID = source.fPB24ID;
92   fTSBit = source.fTSBit;
93   fStatus = source.fStatus;
94   fEventCounter = source.fEventCounter;
95   *fTDCHitBuffer = *source.fTDCHitBuffer;
96   *fTDCPackedHitBuffer = *source.fTDCPackedHitBuffer;
97   *fTDCErrorBuffer = *source.fTDCErrorBuffer;
98   return *this;
99 }
100
101 //_________________________________________________________________
102
103 AliTOFChainSummaryData::~AliTOFChainSummaryData()
104 {
105   /* default destructor */
106     delete fTDCHitBuffer;
107     delete fTDCPackedHitBuffer;
108     delete fTDCErrorBuffer;
109 }
110
111 //_________________________________________________________________
112
113 void
114 AliTOFChainSummaryData::Reset()
115 {
116   /* reset function */
117   fHeader = kFALSE;
118   fTrailer = kFALSE;
119   fChain = 0;
120   fBunchID = 0;
121   fPB24Temp = 0;
122   fPB24ID = 0;
123   fTSBit = 0;
124   fStatus = 0;
125   fEventCounter = 0;
126   fTDCHitBuffer->Reset();
127   fTDCPackedHitBuffer->Reset();
128   fTDCErrorBuffer->Reset();
129 }