]>
Commit | Line | Data |
---|---|---|
3191f471 | 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 | /* $Id: AliVZEROCalibData.cxx, */ | |
17 | ||
18 | ///////////////////////////////////////////////////////////////////////////// | |
19 | // // | |
20 | // class for VZERO calibration // | |
21 | // // | |
22 | ///////////////////////////////////////////////////////////////////////////// | |
23 | ||
24 | #include "AliVZEROCalibData.h" | |
25 | ||
26 | ClassImp(AliVZEROCalibData) | |
27 | ||
28 | //________________________________________________________________ | |
29 | AliVZEROCalibData::AliVZEROCalibData() | |
30 | { | |
d7a5c700 | 31 | // |
3191f471 | 32 | } |
33 | ||
a3c86e1f | 34 | //________________________________________________________________ |
35 | void AliVZEROCalibData::Reset() | |
36 | { | |
d7a5c700 | 37 | // reset |
a3c86e1f | 38 | } |
39 | ||
3191f471 | 40 | //________________________________________________________________ |
41 | AliVZEROCalibData::AliVZEROCalibData(const char* name) | |
42 | { | |
43 | TString namst = "Calib_"; | |
44 | namst += name; | |
45 | SetName(namst.Data()); | |
46 | SetTitle(namst.Data()); | |
47 | ||
48 | } | |
49 | ||
50 | //________________________________________________________________ | |
51 | AliVZEROCalibData::AliVZEROCalibData(const AliVZEROCalibData& calibda) : | |
52 | TNamed(calibda) | |
53 | { | |
54 | // copy constructor | |
55 | ||
56 | SetName(calibda.GetName()); | |
57 | SetTitle(calibda.GetName()); | |
58 | ||
fae0e0c0 | 59 | for(int t=0; t<128; t++) { |
3191f471 | 60 | fPedestal[t] = calibda.GetPedestal(t); |
fae0e0c0 | 61 | fSigma[t] = calibda.GetSigma(t); |
40b6a179 | 62 | fGain[t] = calibda.GetGain(t); |
63 | fADCsigma[t] = calibda.GetADCsigma(t); | |
64 | } | |
fae0e0c0 | 65 | |
66 | for(int t=0; t<64; t++) { | |
67 | fTimeOffset[t] = calibda.GetTimeOffset(t); | |
d7a5c700 | 68 | fTimeGain[t] = calibda.GetTimeGain(t); |
69 | fMeanHV[t] = calibda.GetMeanHV(t); | |
70 | fWidthHV[t] = calibda.GetWidthHV(t); } | |
3191f471 | 71 | |
72 | } | |
73 | ||
74 | //________________________________________________________________ | |
75 | AliVZEROCalibData &AliVZEROCalibData::operator =(const AliVZEROCalibData& calibda) | |
76 | { | |
77 | // assignment operator | |
78 | ||
79 | SetName(calibda.GetName()); | |
80 | SetTitle(calibda.GetName()); | |
81 | ||
fae0e0c0 | 82 | for(int t=0; t<128; t++) { |
3191f471 | 83 | fPedestal[t] = calibda.GetPedestal(t); |
fae0e0c0 | 84 | fSigma[t] = calibda.GetSigma(t); |
40b6a179 | 85 | fGain[t] = calibda.GetGain(t); |
86 | fADCsigma[t] = calibda.GetADCsigma(t); | |
87 | } | |
fae0e0c0 | 88 | |
89 | for(int t=0; t<64; t++) { | |
90 | fTimeOffset[t] = calibda.GetTimeOffset(t); | |
d7a5c700 | 91 | fTimeGain[t] = calibda.GetTimeGain(t); |
92 | fMeanHV[t] = calibda.GetMeanHV(t); | |
93 | fWidthHV[t] = calibda.GetWidthHV(t); } | |
3191f471 | 94 | |
95 | return *this; | |
96 | ||
97 | } | |
98 | ||
99 | //________________________________________________________________ | |
100 | AliVZEROCalibData::~AliVZEROCalibData() | |
101 | { | |
d7a5c700 | 102 | // destructor |
3191f471 | 103 | } |
104 | ||
3191f471 | 105 | //________________________________________________________________ |
106 | void AliVZEROCalibData::SetPedestal(Float_t* Pedestal) | |
107 | { | |
fae0e0c0 | 108 | if(Pedestal) for(int t=0; t<128; t++) fPedestal[t] = Pedestal[t]; |
109 | else for(int t=0; t<128; t++) fPedestal[t] = 0.0; | |
110 | } | |
111 | ||
112 | //________________________________________________________________ | |
113 | void AliVZEROCalibData::SetSigma(Float_t* Sigma) | |
114 | { | |
115 | if(Sigma) for(int t=0; t<128; t++) fSigma[t] = Sigma[t]; | |
116 | else for(int t=0; t<128; t++) fSigma[t] = 0.0; | |
3191f471 | 117 | } |
118 | ||
119 | //________________________________________________________________ | |
120 | void AliVZEROCalibData::SetGain(Float_t* Gain) | |
121 | { | |
fae0e0c0 | 122 | if(Gain) for(int t=0; t<128; t++) fGain[t] = Gain[t]; |
123 | else for(int t=0; t<128; t++) fGain[t] = 0.0; | |
3191f471 | 124 | } |
125 | ||
40b6a179 | 126 | //________________________________________________________________ |
127 | void AliVZEROCalibData::SetADCsigma(Float_t* ADCsigma) | |
128 | { | |
129 | if(ADCsigma) for(int t=0; t<128; t++) fADCsigma[t] = ADCsigma[t]; | |
130 | else for(int t=0; t<128; t++) fADCsigma[t] = 0.0; | |
131 | } | |
132 | ||
fae0e0c0 | 133 | //________________________________________________________________ |
134 | void AliVZEROCalibData::SetTimeOffset(Float_t* TimeOffset) | |
135 | { | |
136 | if(TimeOffset) for(int t=0; t<64; t++) fTimeOffset[t] = TimeOffset[t]; | |
137 | else for(int t=0; t<64; t++) fTimeOffset[t] = 0.0; | |
138 | } | |
139 | ||
140 | //________________________________________________________________ | |
141 | void AliVZEROCalibData::SetTimeGain(Float_t* TimeGain) | |
142 | { | |
143 | if(TimeGain) for(int t=0; t<64; t++) fTimeGain[t] = TimeGain[t]; | |
144 | else for(int t=0; t<64; t++) fTimeGain[t] = 0.0; | |
145 | } | |
d7a5c700 | 146 | |
147 | //________________________________________________________________ | |
148 | void AliVZEROCalibData::SetMeanHV(Float_t* MeanHVs) | |
149 | { | |
150 | if(MeanHVs) for(int t=0; t<64; t++) fMeanHV[t] = MeanHVs[t]; | |
151 | else for(int t=0; t<64; t++) fMeanHV[t] = 0.0; | |
152 | } | |
153 | ||
154 | //________________________________________________________________ | |
155 | void AliVZEROCalibData::SetWidthHV(Float_t* WidthHVs) | |
156 | { | |
157 | if(WidthHVs) for(int t=0; t<64; t++) fWidthHV[t] = WidthHVs[t]; | |
158 | else for(int t=0; t<64; t++) fWidthHV[t] = 0.0; | |
159 | } |