Parameters added
[u/mrichter/AliRoot.git] / VZERO / AliVZEROCalibData.cxx
CommitLineData
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
26ClassImp(AliVZEROCalibData)
27
28//________________________________________________________________
29AliVZEROCalibData::AliVZEROCalibData()
30{
31
32}
33
34//________________________________________________________________
35AliVZEROCalibData::AliVZEROCalibData(const char* name)
36{
37 TString namst = "Calib_";
38 namst += name;
39 SetName(namst.Data());
40 SetTitle(namst.Data());
41
42}
43
44//________________________________________________________________
45AliVZEROCalibData::AliVZEROCalibData(const AliVZEROCalibData& calibda) :
46 TNamed(calibda)
47{
48// copy constructor
49
50 SetName(calibda.GetName());
51 SetTitle(calibda.GetName());
52
fae0e0c0 53 for(int t=0; t<128; t++) {
3191f471 54 fPedestal[t] = calibda.GetPedestal(t);
fae0e0c0 55 fSigma[t] = calibda.GetSigma(t);
3191f471 56 fGain[t] = calibda.GetGain(t); }
fae0e0c0 57
58 for(int t=0; t<64; t++) {
59 fTimeOffset[t] = calibda.GetTimeOffset(t);
60 fTimeGain[t] = calibda.GetTimeGain(t); }
3191f471 61
62}
63
64//________________________________________________________________
65AliVZEROCalibData &AliVZEROCalibData::operator =(const AliVZEROCalibData& calibda)
66{
67// assignment operator
68
69 SetName(calibda.GetName());
70 SetTitle(calibda.GetName());
71
fae0e0c0 72 for(int t=0; t<128; t++) {
3191f471 73 fPedestal[t] = calibda.GetPedestal(t);
fae0e0c0 74 fSigma[t] = calibda.GetSigma(t);
3191f471 75 fGain[t] = calibda.GetGain(t); }
fae0e0c0 76
77 for(int t=0; t<64; t++) {
78 fTimeOffset[t] = calibda.GetTimeOffset(t);
79 fTimeGain[t] = calibda.GetTimeGain(t); }
3191f471 80
81 return *this;
82
83}
84
85//________________________________________________________________
86AliVZEROCalibData::~AliVZEROCalibData()
87{
88
89}
90
91
92
93//________________________________________________________________
94void AliVZEROCalibData::SetPedestal(Float_t* Pedestal)
95{
fae0e0c0 96 if(Pedestal) for(int t=0; t<128; t++) fPedestal[t] = Pedestal[t];
97 else for(int t=0; t<128; t++) fPedestal[t] = 0.0;
98}
99
100//________________________________________________________________
101void AliVZEROCalibData::SetSigma(Float_t* Sigma)
102{
103 if(Sigma) for(int t=0; t<128; t++) fSigma[t] = Sigma[t];
104 else for(int t=0; t<128; t++) fSigma[t] = 0.0;
3191f471 105}
106
107//________________________________________________________________
108void AliVZEROCalibData::SetGain(Float_t* Gain)
109{
fae0e0c0 110 if(Gain) for(int t=0; t<128; t++) fGain[t] = Gain[t];
111 else for(int t=0; t<128; t++) fGain[t] = 0.0;
3191f471 112}
113
fae0e0c0 114//________________________________________________________________
115void AliVZEROCalibData::SetTimeOffset(Float_t* TimeOffset)
116{
117 if(TimeOffset) for(int t=0; t<64; t++) fTimeOffset[t] = TimeOffset[t];
118 else for(int t=0; t<64; t++) fTimeOffset[t] = 0.0;
119}
120
121//________________________________________________________________
122void AliVZEROCalibData::SetTimeGain(Float_t* TimeGain)
123{
124 if(TimeGain) for(int t=0; t<64; t++) fTimeGain[t] = TimeGain[t];
125 else for(int t=0; t<64; t++) fTimeGain[t] = 0.0;
126}