Crucial bug-fix. The raw-data events should be never skipped inside the QA data makers
[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 {
73 fEfficiencies[t] =calibda.GetEfficiency(t+1);
74 fRates[t] = calibda.GetRate(t+1);
75 }
76}
68f6519c 77//_______________________________________________________________
c61a7285 78void AliACORDECalibData::Draw(Option_t *)
68f6519c 79{
80
81
82 //fHits->Draw();
83
84
19f796ed 85
68f6519c 86 TCanvas *ch;
87 TString canvasHistoName="Histos";
88 ch=new TCanvas(canvasHistoName,canvasHistoName,20,20,600,600);
89 ch->Divide(2,2);
90 ch->cd(1);
91 fHits->Draw();
92 ch->cd(2);
93 fTHits->Draw();
94 ch->cd(3);
95 fMultiHits->Draw();
96 ch->cd(4);
97 fTMultiHits->Draw();
98
99
100}
19f796ed 101//________________________________________________________________
102AliACORDECalibData &AliACORDECalibData::operator =(const AliACORDECalibData& calibda)
103{
104// assignment operator
105
106 SetName(calibda.GetName());
107 SetTitle(calibda.GetName());
108 // there are 60 modules. Note that number of first module is 1 (one)
109 for(int t=0; t<60; t++)
110 {
111 fEfficiencies[t] =calibda.GetEfficiency(t+1);
112 fRates[t] = calibda.GetRate(t+1);
113 }
114 return *this;
115}
68f6519c 116//_______________________________________________________________
117/*void AliACORDECalibData::AddHisto(TH1D *fHist)
118{
119
120
121
122 = (TH1D*)fHist->Clone("hnew");
123
124
125
126
127}
128*/
19f796ed 129
130//________________________________________________________________
131AliACORDECalibData::~AliACORDECalibData()
132{
133
134}
135
136
137
138//________________________________________________________________
139void AliACORDECalibData::SetEfficiencies(Float_t* Eff)
140{
141 // there are 60 modules. Note that number of first module is 1 (one)
142 if(Eff) for(int t=0; t<60; t++) fEfficiencies[t] = Eff[t];
143 else for(int t=0; t<60; t++) fEfficiencies[t] = 0.0;
144}
145
146void AliACORDECalibData::SetRates(Float_t* Rt)
147{
148 if(Rt) for (int t=0;t<60; t++) fRates[t] = Rt[t];
149else for (int t=0;t<60; t++) fRates[t] = 0.0;
150}