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