VZERO reconstruction starting from raw-data input. New AliVZERORawStream class for...
[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//________________________________________________________________
a3c86e1f 35void AliVZEROCalibData::Reset()
36{
37
38}
39
40//________________________________________________________________
3191f471 41AliVZEROCalibData::AliVZEROCalibData(const char* name)
42{
43 TString namst = "Calib_";
44 namst += name;
45 SetName(namst.Data());
46 SetTitle(namst.Data());
47
48}
49
50//________________________________________________________________
51AliVZEROCalibData::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);
66 fTimeGain[t] = calibda.GetTimeGain(t); }
3191f471 67
68}
69
70//________________________________________________________________
71AliVZEROCalibData &AliVZEROCalibData::operator =(const AliVZEROCalibData& calibda)
72{
73// assignment operator
74
75 SetName(calibda.GetName());
76 SetTitle(calibda.GetName());
77
fae0e0c0 78 for(int t=0; t<128; t++) {
3191f471 79 fPedestal[t] = calibda.GetPedestal(t);
fae0e0c0 80 fSigma[t] = calibda.GetSigma(t);
3191f471 81 fGain[t] = calibda.GetGain(t); }
fae0e0c0 82
83 for(int t=0; t<64; t++) {
84 fTimeOffset[t] = calibda.GetTimeOffset(t);
85 fTimeGain[t] = calibda.GetTimeGain(t); }
3191f471 86
87 return *this;
88
89}
90
91//________________________________________________________________
92AliVZEROCalibData::~AliVZEROCalibData()
93{
94
95}
96
97
98
99//________________________________________________________________
100void AliVZEROCalibData::SetPedestal(Float_t* Pedestal)
101{
fae0e0c0 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;
104}
105
106//________________________________________________________________
107void AliVZEROCalibData::SetSigma(Float_t* Sigma)
108{
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;
3191f471 111}
112
113//________________________________________________________________
114void AliVZEROCalibData::SetGain(Float_t* Gain)
115{
fae0e0c0 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;
3191f471 118}
119
fae0e0c0 120//________________________________________________________________
121void AliVZEROCalibData::SetTimeOffset(Float_t* TimeOffset)
122{
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;
125}
126
127//________________________________________________________________
128void AliVZEROCalibData::SetTimeGain(Float_t* TimeGain)
129{
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;
132}