Line data Source code
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 DRM data. //
25 : // //
26 : // //
27 : //////////////////////////////////////////////////////////////////////
28 :
29 : #include "AliTOFDRMSummaryData.h"
30 :
31 26 : ClassImp(AliTOFDRMSummaryData)
32 :
33 : AliTOFDRMSummaryData::AliTOFDRMSummaryData() :
34 10 : TObject(),
35 10 : fHeader(kFALSE),
36 10 : fTrailer(kFALSE),
37 10 : fSlotID(0),
38 10 : fEventWords(0),
39 10 : fDRMID(0),
40 10 : fLocalEventCounter(0),
41 10 : fPartecipatingSlotID(0),
42 10 : fCBit(0),
43 10 : fVersID(0),
44 10 : fDRMhSize(0),
45 10 : fSlotEnableMask(0),
46 10 : fFaultID(0),
47 10 : fRTOBit(0),
48 10 : fL0BCID(0),
49 10 : fRunTimeInfo(0),
50 10 : fTemperature(0),
51 10 : fACKBit(0),
52 10 : fSensAD(0),
53 10 : fEventCRC(0),
54 10 : fDecoderCRC(0),
55 10 : fDecoderSlotEnableMask(0),
56 10 : fLTMSummaryData(0x0)
57 50 : {
58 : /* default constructor */
59 30 : fLTMSummaryData = new AliTOFLTMSummaryData();
60 220 : for (Int_t iTRM = 0; iTRM < N_TRM; iTRM++)
61 300 : fTRMSummaryData[iTRM] = new AliTOFTRMSummaryData();
62 20 : }
63 :
64 : //_________________________________________________________________
65 :
66 : AliTOFDRMSummaryData::AliTOFDRMSummaryData(const AliTOFDRMSummaryData &source) :
67 0 : TObject(source),
68 0 : fHeader(source.fHeader),
69 0 : fTrailer(source.fTrailer),
70 0 : fSlotID(source.fSlotID),
71 0 : fEventWords(source.fEventWords),
72 0 : fDRMID(source.fDRMID),
73 0 : fLocalEventCounter(source.fLocalEventCounter),
74 0 : fPartecipatingSlotID(source.fPartecipatingSlotID),
75 0 : fCBit(source.fCBit),
76 0 : fVersID(source.fVersID),
77 0 : fDRMhSize(source.fDRMhSize),
78 0 : fSlotEnableMask(source.fSlotEnableMask),
79 0 : fFaultID(source.fFaultID),
80 0 : fRTOBit(source.fRTOBit),
81 0 : fL0BCID(source.fL0BCID),
82 0 : fRunTimeInfo(source.fRunTimeInfo),
83 0 : fTemperature(source.fTemperature),
84 0 : fACKBit(source.fACKBit),
85 0 : fSensAD(source.fSensAD),
86 0 : fEventCRC(source.fEventCRC),
87 0 : fDecoderCRC(source.fDecoderCRC),
88 0 : fDecoderSlotEnableMask(source.fDecoderSlotEnableMask),
89 0 : fLTMSummaryData(0x0)
90 0 : {
91 : /* copy constructor */
92 0 : fLTMSummaryData = new AliTOFLTMSummaryData(*source.fLTMSummaryData);
93 0 : for (Int_t iTRM = 0; iTRM < N_TRM; iTRM++)
94 0 : fTRMSummaryData[iTRM] = new AliTOFTRMSummaryData(*source.fTRMSummaryData[iTRM]);
95 0 : }
96 :
97 : //_________________________________________________________________
98 :
99 : AliTOFDRMSummaryData &
100 : AliTOFDRMSummaryData::operator = (const AliTOFDRMSummaryData &source)
101 : {
102 : /* operator = */
103 0 : if(&source == this) return *this;
104 0 : TObject::operator=(source);
105 :
106 0 : fHeader = source.fHeader;
107 0 : fTrailer = source.fTrailer;
108 0 : fSlotID = source.fSlotID;
109 0 : fEventWords = source.fEventWords;
110 0 : fDRMID = source.fDRMID;
111 0 : fLocalEventCounter = source.fLocalEventCounter;
112 0 : fPartecipatingSlotID = source.fPartecipatingSlotID;
113 0 : fCBit = source.fCBit;
114 0 : fVersID = source.fVersID;
115 0 : fDRMhSize = source.fDRMhSize;
116 0 : fSlotEnableMask = source.fSlotEnableMask;
117 0 : fFaultID = source.fFaultID;
118 0 : fRTOBit = source.fRTOBit;
119 0 : fL0BCID = source.fL0BCID;
120 0 : fRunTimeInfo = source.fRunTimeInfo;
121 0 : fTemperature = source.fTemperature;
122 0 : fACKBit = source.fACKBit;
123 0 : fSensAD = source.fSensAD;
124 0 : fEventCRC = source.fEventCRC;
125 0 : fDecoderCRC = source.fDecoderCRC;
126 0 : fDecoderSlotEnableMask = source.fDecoderSlotEnableMask;
127 0 : *fLTMSummaryData = *source.fLTMSummaryData;
128 0 : for (Int_t iTRM = 0; iTRM < N_TRM; iTRM++)
129 0 : *fTRMSummaryData[iTRM] = *source.fTRMSummaryData[iTRM];
130 0 : return *this;
131 0 : }
132 :
133 : //_________________________________________________________________
134 :
135 : AliTOFDRMSummaryData::~AliTOFDRMSummaryData()
136 48 : {
137 : /* default destructor */
138 16 : delete fLTMSummaryData;
139 176 : for (Int_t iTRM = 0; iTRM < N_TRM; iTRM++){
140 160 : delete fTRMSummaryData[iTRM];
141 : }
142 24 : }
143 :
144 : //_________________________________________________________________
145 :
146 : void
147 : AliTOFDRMSummaryData::Reset()
148 : {
149 : /* reset function */
150 2304 : fHeader = kFALSE;
151 1152 : fTrailer = kFALSE;
152 1152 : fSlotID = 0;
153 1152 : fEventWords = 0;
154 1152 : fDRMID = 0;
155 1152 : fLocalEventCounter = 0;
156 1152 : fPartecipatingSlotID = 0;
157 1152 : fCBit = 0;
158 1152 : fVersID = 0;
159 1152 : fDRMhSize = 0;
160 1152 : fSlotEnableMask = 0;
161 1152 : fFaultID = 0;
162 1152 : fRTOBit = 0;
163 1152 : fL0BCID = 0;
164 1152 : fRunTimeInfo = 0;
165 1152 : fTemperature = 0;
166 1152 : fACKBit = 0;
167 1152 : fSensAD = 0;
168 1152 : fEventCRC = 0;
169 1152 : fDecoderCRC = 0;
170 1152 : fDecoderSlotEnableMask = 0;
171 1152 : fLTMSummaryData->Reset();
172 25344 : for (Int_t iTRM = 0; iTRM < N_TRM; iTRM++)
173 11520 : fTRMSummaryData[iTRM]->Reset();
174 1152 : }
|