bug fixed for alignment, removed alignment database access from AliPMDUtility class
[u/mrichter/AliRoot.git] / PMD / AliPMDHotData.cxx
CommitLineData
9f77d08c 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// Author : Z. Ahmed
17//
18#include "TNamed.h"
19#include "AliCDBEntry.h"
9f77d08c 20#include "AliPMDHotData.h"
21
22
23ClassImp(AliPMDHotData)
24
25AliPMDHotData::AliPMDHotData()
26{
27 // Default constructor
28 Reset();
29}
30// ----------------------------------------------------------------- //
31AliPMDHotData::AliPMDHotData(const char* name)
32{
33 //constructor
34 TString namst = "hot_";
35 namst += name;
36 SetName(namst.Data());
37 SetTitle(namst.Data());
38 Reset();
39
40}
41// ----------------------------------------------------------------- //
42AliPMDHotData::AliPMDHotData(const AliPMDHotData& hotda) :
43 TNamed(hotda)
44{
45 // copy constructor
46 SetName(hotda.GetName());
47 SetTitle(hotda.GetName());
48 Reset();
49 for(Int_t det = 0; det < kDet; det++)
0556b898 50 {
9f77d08c 51 for(Int_t smn = 0; smn < kModule; smn++)
0556b898 52 {
9f77d08c 53 for(Int_t row = 0; row < kRow; row++)
0556b898 54 {
9f77d08c 55 for(Int_t col = 0; col < kCol; col++)
0556b898 56 {
9f77d08c 57 fHotChannel[det][smn][row][col] = hotda.GetHotChannel(det,smn,row,col);
0556b898 58 }
59 }
60 }
61 }
9f77d08c 62}
63// ----------------------------------------------------------------- //
64AliPMDHotData &AliPMDHotData::operator =(const AliPMDHotData& hotda)
65{
66 //asignment operator
67 SetName(hotda.GetName());
68 SetTitle(hotda.GetName());
69 Reset();
70 for(Int_t det = 0; det < kDet; det++)
71 {
72 for(Int_t smn = 0; smn < kModule; smn++)
73 {
74 for(Int_t row = 0; row < kRow; row++)
75 {
76 for(Int_t col = 0; col < kCol; col++)
77 {
78 fHotChannel[det][smn][row][col] = hotda.GetHotChannel(det,smn,row,col);
79 }
80 }
81 }
82 }
83 return *this;
84}
85// ----------------------------------------------------------------- //
86AliPMDHotData::~AliPMDHotData()
87{
88 //destructor
89}
90// ----------------------------------------------------------------- //
91void AliPMDHotData::Reset()
92{
9f77d08c 93
94 for(Int_t det = 0; det < kDet; det++)
0556b898 95 {
9f77d08c 96 for(Int_t smn = 0; smn < kModule; smn++)
0556b898 97 {
9f77d08c 98 for(Int_t row = 0; row < kRow; row++)
0556b898 99 {
100 for(Int_t col = 0; col < kCol; col++)
9f77d08c 101 {
0556b898 102 fHotChannel[det][smn][row][col] = 0.;
9f77d08c 103 }
0556b898 104 }
105 }
106 }
9f77d08c 107}
108// ----------------------------------------------------------------- //
0556b898 109// ----------------------------------------------------------------- //
9f77d08c 110Float_t AliPMDHotData:: GetHotChannel(Int_t det, Int_t smn, Int_t row, Int_t col) const
111{
112 return fHotChannel[det][smn][row][col];
113}
9f77d08c 114void AliPMDHotData::SetHotChannel(Int_t det, Int_t smn, Int_t row, Int_t col, Float_t flag)
115{
116 fHotChannel[det][smn][row][col] = flag;
117}
0556b898 118//------------------------------------------------------------------------------ //
9f77d08c 119void AliPMDHotData::Print(Option_t *) const
120{
0556b898 121 printf("\n ######Flag for each cells ####\n");
9f77d08c 122 for(Int_t det = 0; det < kDet; det++)
123 {
124 for(Int_t smn = 0; smn < kModule; smn++)
125 {
126 for(Int_t row = 0; row < kRow; row++)
127 {
128 for(Int_t col = 0; col < kCol; col++)
129 {
0556b898 130 printf("Flag[%d,%d,%d,%d]= %4.1f \n",det,smn,row,col,
131 fHotChannel[det][smn][row][col]);
9f77d08c 132 }
0556b898 133 printf("\n");
9f77d08c 134 }
135 }
136 }
137}