]>
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); |
3191f471 | 62 | fGain[t] = calibda.GetGain(t); } |
fae0e0c0 | 63 | |
64 | for(int t=0; t<64; t++) { | |
65 | fTimeOffset[t] = calibda.GetTimeOffset(t); | |
d7a5c700 | 66 | fTimeGain[t] = calibda.GetTimeGain(t); |
67 | fMeanHV[t] = calibda.GetMeanHV(t); | |
68 | fWidthHV[t] = calibda.GetWidthHV(t); } | |
3191f471 | 69 | |
70 | } | |
71 | ||
72 | //________________________________________________________________ | |
73 | AliVZEROCalibData &AliVZEROCalibData::operator =(const AliVZEROCalibData& calibda) | |
74 | { | |
75 | // assignment operator | |
76 | ||
77 | SetName(calibda.GetName()); | |
78 | SetTitle(calibda.GetName()); | |
79 | ||
fae0e0c0 | 80 | for(int t=0; t<128; t++) { |
3191f471 | 81 | fPedestal[t] = calibda.GetPedestal(t); |
fae0e0c0 | 82 | fSigma[t] = calibda.GetSigma(t); |
3191f471 | 83 | fGain[t] = calibda.GetGain(t); } |
fae0e0c0 | 84 | |
85 | for(int t=0; t<64; t++) { | |
86 | fTimeOffset[t] = calibda.GetTimeOffset(t); | |
d7a5c700 | 87 | fTimeGain[t] = calibda.GetTimeGain(t); |
88 | fMeanHV[t] = calibda.GetMeanHV(t); | |
89 | fWidthHV[t] = calibda.GetWidthHV(t); } | |
3191f471 | 90 | |
91 | return *this; | |
92 | ||
93 | } | |
94 | ||
95 | //________________________________________________________________ | |
96 | AliVZEROCalibData::~AliVZEROCalibData() | |
97 | { | |
d7a5c700 | 98 | // destructor |
3191f471 | 99 | } |
100 | ||
101 | ||
102 | ||
103 | //________________________________________________________________ | |
104 | void AliVZEROCalibData::SetPedestal(Float_t* Pedestal) | |
105 | { | |
fae0e0c0 | 106 | if(Pedestal) for(int t=0; t<128; t++) fPedestal[t] = Pedestal[t]; |
107 | else for(int t=0; t<128; t++) fPedestal[t] = 0.0; | |
108 | } | |
109 | ||
110 | //________________________________________________________________ | |
111 | void AliVZEROCalibData::SetSigma(Float_t* Sigma) | |
112 | { | |
113 | if(Sigma) for(int t=0; t<128; t++) fSigma[t] = Sigma[t]; | |
114 | else for(int t=0; t<128; t++) fSigma[t] = 0.0; | |
3191f471 | 115 | } |
116 | ||
117 | //________________________________________________________________ | |
118 | void AliVZEROCalibData::SetGain(Float_t* Gain) | |
119 | { | |
fae0e0c0 | 120 | if(Gain) for(int t=0; t<128; t++) fGain[t] = Gain[t]; |
121 | else for(int t=0; t<128; t++) fGain[t] = 0.0; | |
3191f471 | 122 | } |
123 | ||
fae0e0c0 | 124 | //________________________________________________________________ |
125 | void AliVZEROCalibData::SetTimeOffset(Float_t* TimeOffset) | |
126 | { | |
127 | if(TimeOffset) for(int t=0; t<64; t++) fTimeOffset[t] = TimeOffset[t]; | |
128 | else for(int t=0; t<64; t++) fTimeOffset[t] = 0.0; | |
129 | } | |
130 | ||
131 | //________________________________________________________________ | |
132 | void AliVZEROCalibData::SetTimeGain(Float_t* TimeGain) | |
133 | { | |
134 | if(TimeGain) for(int t=0; t<64; t++) fTimeGain[t] = TimeGain[t]; | |
135 | else for(int t=0; t<64; t++) fTimeGain[t] = 0.0; | |
136 | } | |
d7a5c700 | 137 | |
138 | //________________________________________________________________ | |
139 | void AliVZEROCalibData::SetMeanHV(Float_t* MeanHVs) | |
140 | { | |
141 | if(MeanHVs) for(int t=0; t<64; t++) fMeanHV[t] = MeanHVs[t]; | |
142 | else for(int t=0; t<64; t++) fMeanHV[t] = 0.0; | |
143 | } | |
144 | ||
145 | //________________________________________________________________ | |
146 | void AliVZEROCalibData::SetWidthHV(Float_t* WidthHVs) | |
147 | { | |
148 | if(WidthHVs) for(int t=0; t<64; t++) fWidthHV[t] = WidthHVs[t]; | |
149 | else for(int t=0; t<64; t++) fWidthHV[t] = 0.0; | |
150 | } |