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