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 "AliPMDHotData.h"
24 ClassImp(AliPMDHotData)
26 AliPMDHotData::AliPMDHotData()
28 // Default constructor
31 // ----------------------------------------------------------------- //
32 AliPMDHotData::AliPMDHotData(const char* name)
35 TString namst = "hot_";
37 SetName(namst.Data());
38 SetTitle(namst.Data());
42 // ----------------------------------------------------------------- //
43 AliPMDHotData::AliPMDHotData(const AliPMDHotData& hotda) :
47 SetName(hotda.GetName());
48 SetTitle(hotda.GetName());
50 for(Int_t det = 0; det < kDet; det++)
52 for(Int_t smn = 0; smn < kModule; smn++)
54 for(Int_t row = 0; row < kRow; row++)
56 for(Int_t col = 0; col < kCol; col++)
58 fHotChannel[det][smn][row][col] = hotda.GetHotChannel(det,smn,row,col);
64 // ----------------------------------------------------------------- //
65 AliPMDHotData &AliPMDHotData::operator =(const AliPMDHotData& hotda)
68 SetName(hotda.GetName());
69 SetTitle(hotda.GetName());
71 for(Int_t det = 0; det < kDet; det++)
73 for(Int_t smn = 0; smn < kModule; smn++)
75 for(Int_t row = 0; row < kRow; row++)
77 for(Int_t col = 0; col < kCol; col++)
79 fHotChannel[det][smn][row][col] = hotda.GetHotChannel(det,smn,row,col);
86 // ----------------------------------------------------------------- //
87 AliPMDHotData::~AliPMDHotData()
91 // ----------------------------------------------------------------- //
92 void AliPMDHotData::Reset()
94 //memset(fgainfact ,1,2*24*48*96*sizeof(Float_t));
96 for(Int_t det = 0; det < kDet; det++)
98 for(Int_t smn = 0; smn < kModule; smn++)
100 for(Int_t row = 0; row < kRow; row++)
102 for(Int_t col = 0; col < kCol; col++)
104 fHotChannel[det][smn][row][col] = 0.;
110 // ----------------------------------------------------------------- //
111 Float_t AliPMDHotData:: GetHotChannel(Int_t det, Int_t smn, Int_t row, Int_t col) const
113 return fHotChannel[det][smn][row][col];
115 // ----------------------------------------------------------------- //
116 void AliPMDHotData::SetHotChannel(Int_t det, Int_t smn, Int_t row, Int_t col, Float_t flag)
118 fHotChannel[det][smn][row][col] = flag;
120 //--------------------------------------------------------------------- //
121 void AliPMDHotData::Print(Option_t *) const
123 printf("\n ######gain factors for each cells ####\n");
124 for(Int_t det = 0; det < kDet; det++)
126 for(Int_t smn = 0; smn < kModule; smn++)
128 for(Int_t row = 0; row < kRow; row++)
130 for(Int_t col = 0; col < kCol; col++)
132 // printf("Gain[%d,%d,%d,%d]= %4.1f \n",det,smn,row,col,
133 // fHotChannel[det][smn][row][col]);