1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
16 /* $Id: AliVZEROCalibData.cxx, */
18 /////////////////////////////////////////////////////////////////////////////
20 // class for VZERO calibration //
22 /////////////////////////////////////////////////////////////////////////////
24 #include "AliVZEROCalibData.h"
26 ClassImp(AliVZEROCalibData)
28 //________________________________________________________________
29 AliVZEROCalibData::AliVZEROCalibData()
34 //________________________________________________________________
35 void AliVZEROCalibData::Reset()
40 //________________________________________________________________
41 AliVZEROCalibData::AliVZEROCalibData(const char* name)
43 TString namst = "Calib_";
45 SetName(namst.Data());
46 SetTitle(namst.Data());
50 //________________________________________________________________
51 AliVZEROCalibData::AliVZEROCalibData(const AliVZEROCalibData& calibda) :
56 SetName(calibda.GetName());
57 SetTitle(calibda.GetName());
59 for(int t=0; t<128; t++) {
60 fPedestal[t] = calibda.GetPedestal(t);
61 fSigma[t] = calibda.GetSigma(t);
62 fGain[t] = calibda.GetGain(t); }
64 for(int t=0; t<64; t++) {
65 fTimeOffset[t] = calibda.GetTimeOffset(t);
66 fTimeGain[t] = calibda.GetTimeGain(t); }
70 //________________________________________________________________
71 AliVZEROCalibData &AliVZEROCalibData::operator =(const AliVZEROCalibData& calibda)
73 // assignment operator
75 SetName(calibda.GetName());
76 SetTitle(calibda.GetName());
78 for(int t=0; t<128; t++) {
79 fPedestal[t] = calibda.GetPedestal(t);
80 fSigma[t] = calibda.GetSigma(t);
81 fGain[t] = calibda.GetGain(t); }
83 for(int t=0; t<64; t++) {
84 fTimeOffset[t] = calibda.GetTimeOffset(t);
85 fTimeGain[t] = calibda.GetTimeGain(t); }
91 //________________________________________________________________
92 AliVZEROCalibData::~AliVZEROCalibData()
99 //________________________________________________________________
100 void AliVZEROCalibData::SetPedestal(Float_t* Pedestal)
102 if(Pedestal) for(int t=0; t<128; t++) fPedestal[t] = Pedestal[t];
103 else for(int t=0; t<128; t++) fPedestal[t] = 0.0;
106 //________________________________________________________________
107 void AliVZEROCalibData::SetSigma(Float_t* Sigma)
109 if(Sigma) for(int t=0; t<128; t++) fSigma[t] = Sigma[t];
110 else for(int t=0; t<128; t++) fSigma[t] = 0.0;
113 //________________________________________________________________
114 void AliVZEROCalibData::SetGain(Float_t* Gain)
116 if(Gain) for(int t=0; t<128; t++) fGain[t] = Gain[t];
117 else for(int t=0; t<128; t++) fGain[t] = 0.0;
120 //________________________________________________________________
121 void AliVZEROCalibData::SetTimeOffset(Float_t* TimeOffset)
123 if(TimeOffset) for(int t=0; t<64; t++) fTimeOffset[t] = TimeOffset[t];
124 else for(int t=0; t<64; t++) fTimeOffset[t] = 0.0;
127 //________________________________________________________________
128 void AliVZEROCalibData::SetTimeGain(Float_t* TimeGain)
130 if(TimeGain) for(int t=0; t<64; t++) fTimeGain[t] = TimeGain[t];
131 else for(int t=0; t<64; t++) fTimeGain[t] = 0.0;