]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - STEER/AliESDVZEROfriend.cxx
update for running on GRID
[u/mrichter/AliRoot.git] / STEER / AliESDVZEROfriend.cxx
... / ...
CommitLineData
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///
18/// This is a class for containing all the VZERO DDL raw data
19/// It is written to the ESD-friend file
20///
21///////////////////////////////////////////////////////////////////////////////
22
23#include "AliESDVZEROfriend.h"
24
25ClassImp(AliESDVZEROfriend)
26
27//_____________________________________________________________________________
28AliESDVZEROfriend::AliESDVZEROfriend():
29 TObject(),
30 fTrigger(0),
31 fTriggerMask(0)
32{
33 // default constructor
34 for (Int_t iScaler = 0; iScaler < kNScalers; iScaler++)
35 fScalers[iScaler] = 0;
36
37 for (Int_t iBunch = 0; iBunch < kNBunches; iBunch++)
38 fBunchNumbers[iBunch] = 0;
39
40 for (Int_t iChannel = 0; iChannel < kNChannels; iChannel++) {
41 fBBScalers[iChannel] = 0;
42 fBGScalers[iChannel] = 0;
43 for (Int_t iBunch = 0; iBunch < kNBunches; iBunch++) {
44 fChargeMB[iChannel][iBunch] = 0;
45 fIsIntMB[iChannel][iBunch] = kFALSE;
46 fIsBBMB[iChannel][iBunch] = kFALSE;
47 fIsBGMB[iChannel][iBunch] = kFALSE;
48 }
49 for (Int_t iEv = 0; iEv < kNEvOfInt; iEv++) {
50 fADC[iChannel][iEv] = 0.0;
51 fIsInt[iChannel][iEv] = kFALSE;
52 fIsBB[iChannel][iEv] = kFALSE;
53 fIsBG[iChannel][iEv] = kFALSE;
54 }
55 fTime[iChannel] = 0.0;
56 fWidth[iChannel] = 0.0;
57 }
58}
59
60//_____________________________________________________________________________
61AliESDVZEROfriend::~AliESDVZEROfriend()
62{
63 // destructor
64}
65
66//_____________________________________________________________________________
67AliESDVZEROfriend::AliESDVZEROfriend(const AliESDVZEROfriend& vzerofriend):
68 TObject(vzerofriend),
69 fTrigger(vzerofriend.fTrigger),
70 fTriggerMask(vzerofriend.fTriggerMask)
71{
72 // copy constructor
73 for (Int_t iScaler = 0; iScaler < kNScalers; iScaler++)
74 fScalers[iScaler] = vzerofriend.fScalers[iScaler];
75
76 for (Int_t iBunch = 0; iBunch < kNBunches; iBunch++)
77 fBunchNumbers[iBunch] = vzerofriend.fBunchNumbers[iBunch];
78
79 for (Int_t iChannel = 0; iChannel < kNChannels; iChannel++) {
80 fBBScalers[iChannel] = vzerofriend.fBBScalers[iChannel];
81 fBGScalers[iChannel] = vzerofriend.fBGScalers[iChannel];
82 for (Int_t iBunch = 0; iBunch < kNBunches; iBunch++) {
83 fChargeMB[iChannel][iBunch] = vzerofriend.fChargeMB[iChannel][iBunch];
84 fIsIntMB[iChannel][iBunch] = vzerofriend.fIsIntMB[iChannel][iBunch];
85 fIsBBMB[iChannel][iBunch] = vzerofriend.fIsBBMB[iChannel][iBunch];
86 fIsBGMB[iChannel][iBunch] = vzerofriend.fIsBGMB[iChannel][iBunch];
87 }
88 for (Int_t iEv = 0; iEv < kNEvOfInt; iEv++) {
89 fADC[iChannel][iEv] = vzerofriend.fADC[iChannel][iEv];
90 fIsInt[iChannel][iEv] = vzerofriend.fIsInt[iChannel][iEv];
91 fIsBB[iChannel][iEv] = vzerofriend.fIsBB[iChannel][iEv];
92 fIsBG[iChannel][iEv] = vzerofriend.fIsBG[iChannel][iEv];
93 }
94 fTime[iChannel] = vzerofriend.fTime[iChannel];
95 fWidth[iChannel] = vzerofriend.fWidth[iChannel];
96 }
97}
98
99//_____________________________________________________________________________
100AliESDVZEROfriend& AliESDVZEROfriend::operator = (const AliESDVZEROfriend& vzerofriend)
101{
102 // assignment operator
103 if(&vzerofriend == this) return *this;
104 TObject::operator=(vzerofriend);
105
106 fTrigger = vzerofriend.fTrigger;
107 fTriggerMask = vzerofriend.fTriggerMask;
108
109 for (Int_t iScaler = 0; iScaler < kNScalers; iScaler++)
110 fScalers[iScaler] = vzerofriend.fScalers[iScaler];
111
112 for (Int_t iBunch = 0; iBunch < kNBunches; iBunch++)
113 fBunchNumbers[iBunch] = vzerofriend.fBunchNumbers[iBunch];
114
115 for (Int_t iChannel = 0; iChannel < kNChannels; iChannel++) {
116 fBBScalers[iChannel] = vzerofriend.fBBScalers[iChannel];
117 fBGScalers[iChannel] = vzerofriend.fBGScalers[iChannel];
118 for (Int_t iBunch = 0; iBunch < kNBunches; iBunch++) {
119 fChargeMB[iChannel][iBunch] = vzerofriend.fChargeMB[iChannel][iBunch];
120 fIsIntMB[iChannel][iBunch] = vzerofriend.fIsIntMB[iChannel][iBunch];
121 fIsBBMB[iChannel][iBunch] = vzerofriend.fIsBBMB[iChannel][iBunch];
122 fIsBGMB[iChannel][iBunch] = vzerofriend.fIsBGMB[iChannel][iBunch];
123 }
124 for (Int_t iEv = 0; iEv < kNEvOfInt; iEv++) {
125 fADC[iChannel][iEv] = vzerofriend.fADC[iChannel][iEv];
126 fIsInt[iChannel][iEv] = vzerofriend.fIsInt[iChannel][iEv];
127 fIsBB[iChannel][iEv] = vzerofriend.fIsBB[iChannel][iEv];
128 fIsBG[iChannel][iEv] = vzerofriend.fIsBG[iChannel][iEv];
129 }
130 fTime[iChannel] = vzerofriend.fTime[iChannel];
131 fWidth[iChannel] = vzerofriend.fWidth[iChannel];
132 }
133
134 return *this;
135}
136
137void AliESDVZEROfriend::Reset()
138{
139 // Reset the contents of the object
140 fTrigger = 0;
141 fTriggerMask = 0;
142
143 for (Int_t iScaler = 0; iScaler < kNScalers; iScaler++)
144 fScalers[iScaler] = 0;
145
146 for (Int_t iBunch = 0; iBunch < kNBunches; iBunch++)
147 fBunchNumbers[iBunch] = 0;
148
149 for (Int_t iChannel = 0; iChannel < kNChannels; iChannel++) {
150 fBBScalers[iChannel] = 0;
151 fBGScalers[iChannel] = 0;
152 for (Int_t iBunch = 0; iBunch < kNBunches; iBunch++) {
153 fChargeMB[iChannel][iBunch] = 0;
154 fIsIntMB[iChannel][iBunch] = kFALSE;
155 fIsBBMB[iChannel][iBunch] = kFALSE;
156 fIsBGMB[iChannel][iBunch] = kFALSE;
157 }
158 for (Int_t iEv = 0; iEv < kNEvOfInt; iEv++) {
159 fADC[iChannel][iEv] = 0.0;
160 fIsInt[iChannel][iEv] = kFALSE;
161 fIsBB[iChannel][iEv] = kFALSE;
162 fIsBG[iChannel][iEv] = kFALSE;
163 }
164 fTime[iChannel] = 0.0;
165 fWidth[iChannel] = 0.0;
166 }
167
168}