Clean-up of include files
[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"
68f6519c 20#include "TList.h"
21#include "TCanvas.h"
19f796ed 22
23ClassImp(AliACORDECalibData)
24
68f6519c 25
19f796ed 26//________________________________________________________________
68f6519c 27AliACORDECalibData::AliACORDECalibData():
28fHits(0),
29fTHits(0),
30fMultiHits(0),
31fTMultiHits(0)
19f796ed 32{
33
34}
35
36//________________________________________________________________
37void AliACORDECalibData::Reset()
38{
39
40}
41
42//________________________________________________________________
c61a7285 43AliACORDECalibData::AliACORDECalibData(const char* name) :
44 TNamed(),
45 fHits(0),
46 fTHits(0),
47 fMultiHits(0),
48 fTMultiHits(0)
19f796ed 49{
50 TString namst = "Calib_";
51 namst += name;
52 SetName(namst.Data());
53 SetTitle(namst.Data());
54
55}
56
57//________________________________________________________________
58AliACORDECalibData::AliACORDECalibData(const AliACORDECalibData& calibda) :
c61a7285 59 TNamed(calibda),
60 fHits(0),
61 fTHits(0),
62 fMultiHits(0),
63 fTMultiHits(0)
19f796ed 64{
65// copy constructor
66
67 SetName(calibda.GetName());
68 SetTitle(calibda.GetName());
69
70 // there are 60 modules. Note that number of first module is 1 (one)
71 for(int t=0; t<60; t++)
72 {
fcdfb1ff 73 fEfficiencies[t] =calibda.GetEfficiency(t+1);
74 fRates[t] = calibda.GetRate(t+1);
75 fModulesActivity[t] = calibda.GetModuleActivity(t+1);
19f796ed 76 }
77}
68f6519c 78//_______________________________________________________________
c61a7285 79void AliACORDECalibData::Draw(Option_t *)
68f6519c 80{
81
82
83 //fHits->Draw();
84
85
19f796ed 86
68f6519c 87 TCanvas *ch;
88 TString canvasHistoName="Histos";
89 ch=new TCanvas(canvasHistoName,canvasHistoName,20,20,600,600);
90 ch->Divide(2,2);
91 ch->cd(1);
92 fHits->Draw();
93 ch->cd(2);
94 fTHits->Draw();
95 ch->cd(3);
96 fMultiHits->Draw();
97 ch->cd(4);
98 fTMultiHits->Draw();
99
100
101}
19f796ed 102//________________________________________________________________
103AliACORDECalibData &AliACORDECalibData::operator =(const AliACORDECalibData& calibda)
104{
105// assignment operator
106
107 SetName(calibda.GetName());
108 SetTitle(calibda.GetName());
109 // there are 60 modules. Note that number of first module is 1 (one)
110 for(int t=0; t<60; t++)
111 {
fcdfb1ff 112 fEfficiencies[t] =calibda.GetEfficiency(t+1);
113 fRates[t] = calibda.GetRate(t+1);
114 fModulesActivity[t] = calibda.GetModuleActivity(t+1);
19f796ed 115 }
116 return *this;
117}
68f6519c 118//_______________________________________________________________
119/*void AliACORDECalibData::AddHisto(TH1D *fHist)
120{
121
122
123
124 = (TH1D*)fHist->Clone("hnew");
125
126
127
128
129}
130*/
19f796ed 131
132//________________________________________________________________
133AliACORDECalibData::~AliACORDECalibData()
134{
135
136}
137
138
139
140//________________________________________________________________
141void AliACORDECalibData::SetEfficiencies(Float_t* Eff)
142{
143 // there are 60 modules. Note that number of first module is 1 (one)
144 if(Eff) for(int t=0; t<60; t++) fEfficiencies[t] = Eff[t];
145 else for(int t=0; t<60; t++) fEfficiencies[t] = 0.0;
146}
147
148void AliACORDECalibData::SetRates(Float_t* Rt)
149{
150 if(Rt) for (int t=0;t<60; t++) fRates[t] = Rt[t];
151else for (int t=0;t<60; t++) fRates[t] = 0.0;
152}
fcdfb1ff 153
154void AliACORDECalibData::SetModulesActivity(Float_t* Mac)
155{
156 if(Mac) for (int t=0;t<60;t++) fModulesActivity[t] = Mac[t];
157 else for (int t=0;t<60;t++) fModulesActivity[t] = 0.0;
158}
159