Completely updated version (Guillermo)
[u/mrichter/AliRoot.git] / ACORDE / AliACORDECalibData.cxx
CommitLineData
19f796ed 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: AliACORDECalibData.cxx, */
17
18
19#include "AliACORDECalibData.h"
20
21ClassImp(AliACORDECalibData)
22
23//________________________________________________________________
24AliACORDECalibData::AliACORDECalibData()
25{
26
27}
28
29//________________________________________________________________
30void AliACORDECalibData::Reset()
31{
32
33}
34
35//________________________________________________________________
36AliACORDECalibData::AliACORDECalibData(const char* name)
37{
38 TString namst = "Calib_";
39 namst += name;
40 SetName(namst.Data());
41 SetTitle(namst.Data());
42
43}
44
45//________________________________________________________________
46AliACORDECalibData::AliACORDECalibData(const AliACORDECalibData& calibda) :
47 TNamed(calibda)
48{
49// copy constructor
50
51 SetName(calibda.GetName());
52 SetTitle(calibda.GetName());
53
54 // there are 60 modules. Note that number of first module is 1 (one)
55 for(int t=0; t<60; t++)
56 {
57 fEfficiencies[t] =calibda.GetEfficiency(t+1);
58 fRates[t] = calibda.GetRate(t+1);
59 }
60}
61
62//________________________________________________________________
63AliACORDECalibData &AliACORDECalibData::operator =(const AliACORDECalibData& calibda)
64{
65// assignment operator
66
67 SetName(calibda.GetName());
68 SetTitle(calibda.GetName());
69 // there are 60 modules. Note that number of first module is 1 (one)
70 for(int t=0; t<60; t++)
71 {
72 fEfficiencies[t] =calibda.GetEfficiency(t+1);
73 fRates[t] = calibda.GetRate(t+1);
74 }
75 return *this;
76}
77
78//________________________________________________________________
79AliACORDECalibData::~AliACORDECalibData()
80{
81
82}
83
84
85
86//________________________________________________________________
87void AliACORDECalibData::SetEfficiencies(Float_t* Eff)
88{
89 // there are 60 modules. Note that number of first module is 1 (one)
90 if(Eff) for(int t=0; t<60; t++) fEfficiencies[t] = Eff[t];
91 else for(int t=0; t<60; t++) fEfficiencies[t] = 0.0;
92}
93
94void AliACORDECalibData::SetRates(Float_t* Rt)
95{
96 if(Rt) for (int t=0;t<60; t++) fRates[t] = Rt[t];
97else for (int t=0;t<60; t++) fRates[t] = 0.0;
98}