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 TRM data. //
25 : // //
26 : // //
27 : //////////////////////////////////////////////////////////////////////
28 :
29 : #include "AliTOFTRMSummaryData.h"
30 :
31 26 : ClassImp(AliTOFTRMSummaryData)
32 :
33 : AliTOFTRMSummaryData::AliTOFTRMSummaryData() :
34 100 : TObject(),
35 100 : fHeader(kFALSE),
36 100 : fTrailer(kFALSE),
37 100 : fSlotID(0),
38 100 : fEventWords(0),
39 100 : fACQBits(0),
40 100 : fLBit(0),
41 100 : fEBit(0),
42 100 : fEventCRC(0),
43 100 : fEventCounter(0),
44 100 : fDecoderCRC(0)
45 500 : {
46 : /* default constructor */
47 600 : for (Int_t iChain = 0; iChain < N_CHAIN; iChain++)
48 600 : fChainSummaryData[iChain] = new AliTOFChainSummaryData();
49 200 : }
50 :
51 : //_________________________________________________________________
52 :
53 : AliTOFTRMSummaryData::AliTOFTRMSummaryData(const AliTOFTRMSummaryData &source) :
54 0 : TObject(source),
55 0 : fHeader(source.fHeader),
56 0 : fTrailer(source.fTrailer),
57 0 : fSlotID(source.fSlotID),
58 0 : fEventWords(source.fEventWords),
59 0 : fACQBits(source.fACQBits),
60 0 : fLBit(source.fLBit),
61 0 : fEBit(source.fEBit),
62 0 : fEventCRC(source.fEventCRC),
63 0 : fEventCounter(source.fEventCounter),
64 0 : fDecoderCRC(source.fDecoderCRC)
65 0 : {
66 : /* copy constructor */
67 0 : for (Int_t iChain = 0; iChain < N_CHAIN; iChain++)
68 0 : fChainSummaryData[iChain] = new AliTOFChainSummaryData(*source.fChainSummaryData[iChain]);
69 0 : }
70 :
71 : //_________________________________________________________________
72 :
73 : AliTOFTRMSummaryData &
74 : AliTOFTRMSummaryData::operator = (const AliTOFTRMSummaryData &source)
75 : {
76 : /* operator = */
77 0 : if(&source == this) return *this;
78 0 : TObject::operator=(source);
79 :
80 0 : fHeader = source.fHeader;
81 0 : fTrailer = source.fTrailer;
82 0 : fSlotID = source.fSlotID;
83 0 : fEventWords = source.fEventWords;
84 0 : fACQBits = source.fACQBits;
85 0 : fLBit = source.fLBit;
86 0 : fEBit = source.fEBit;
87 0 : fEventCRC = source.fEventCRC;
88 0 : fEventCounter = source.fEventCounter;
89 0 : fDecoderCRC = source.fDecoderCRC;
90 0 : for (Int_t iChain = 0; iChain < N_CHAIN; iChain++)
91 0 : *fChainSummaryData[iChain] = *source.fChainSummaryData[iChain];
92 0 : return *this;
93 0 : }
94 :
95 : //_________________________________________________________________
96 :
97 : AliTOFTRMSummaryData::~AliTOFTRMSummaryData()
98 480 : {
99 : /* default destructor */
100 480 : for (Int_t iChain = 0; iChain < N_CHAIN; iChain++){
101 320 : delete fChainSummaryData[iChain];
102 : }
103 240 : }
104 :
105 : //_________________________________________________________________
106 :
107 : void
108 : AliTOFTRMSummaryData::Reset()
109 : {
110 : /* reset function */
111 33984 : fHeader = kFALSE;
112 16992 : fTrailer = kFALSE;
113 16992 : fSlotID = 0;
114 16992 : fEventWords = 0;
115 16992 : fACQBits = 0;
116 16992 : fLBit = 0;
117 16992 : fEBit = 0;
118 16992 : fEventCRC = 0;
119 16992 : fEventCounter = 0;
120 16992 : fDecoderCRC = 0;
121 101952 : for (Int_t iChain = 0; iChain < N_CHAIN; iChain++)
122 33984 : fChainSummaryData[iChain]->Reset();
123 16992 : }
124 :
|