1 /***************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
19 #include "AliCDBEntry.h"
21 #include "AliPMDCalibData.h"
24 ClassImp(AliPMDCalibData)
26 AliPMDCalibData::AliPMDCalibData()
28 // Default constructor
31 // ----------------------------------------------------------------- //
32 AliPMDCalibData::AliPMDCalibData(const char* name)
35 TString namst = "Calib_";
37 SetName(namst.Data());
38 SetTitle(namst.Data());
42 // ----------------------------------------------------------------- //
43 AliPMDCalibData::AliPMDCalibData(const AliPMDCalibData& calibda) :
47 SetName(calibda.GetName());
48 SetTitle(calibda.GetName());
50 for(Int_t det=0;det<2;det++){
51 for(Int_t smn=0;smn<24;smn++) {
52 for(Int_t row=0;row<96;row++) {
53 for(Int_t col=0;col<96;col++) {
54 fGainFact[det][smn][row][col]=calibda.GetGainFact(det,smn,row,col);
60 // ----------------------------------------------------------------- //
61 AliPMDCalibData &AliPMDCalibData::operator =(const AliPMDCalibData& calibda)
64 SetName(calibda.GetName());
65 SetTitle(calibda.GetName());
67 for(Int_t det=0;det<2;det++){
68 for(Int_t smn=0;smn<24;smn++) {
69 for(Int_t row=0;row<96;row++) {
70 for(Int_t col=0;col<96;col++) {
71 fGainFact[det][smn][row][col]=calibda.GetGainFact(det,smn,row,col);
78 // ----------------------------------------------------------------- //
79 AliPMDCalibData::~AliPMDCalibData()
83 // ----------------------------------------------------------------- //
84 void AliPMDCalibData::Reset()
86 //memset(fgainfact ,1,2*24*96*96*sizeof(Float_t));
87 for(Int_t det=0;det<2;det++){
88 for(Int_t smn=0;smn<24;smn++) {
89 for(Int_t row=0;row<96;row++) {
90 for(Int_t col=0;col<96;col++) {
91 fGainFact[det][smn][row][col]=1.0;
97 // ----------------------------------------------------------------- //
98 Float_t AliPMDCalibData:: GetGainFact(Int_t det, Int_t smn, Int_t row, Int_t col) const
100 return fGainFact[det][smn][row][col];
102 // ----------------------------------------------------------------- //
103 void AliPMDCalibData::SetGainFact(Int_t det, Int_t smn, Int_t row, Int_t col, Float_t gain)
105 fGainFact[det][smn][row][col]= gain;
108 // ----------------------------------------------------------------- //
109 void AliPMDCalibData::Print(Option_t *) const
111 printf("\n ######gain factors for each cells are ####\n");
112 for(Int_t det=0;det<2;det++)
114 for(Int_t smn=0;smn<24;smn++)
116 for(Int_t row=0;row<96;row++)
118 for(Int_t col=0;col<96; col++)
120 printf("%4.1f",fGainFact[det][smn][row][col]);