]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PMD/AliPMDHotData.cxx
Preprocessor modified not to send the correct gain file
[u/mrichter/AliRoot.git] / PMD / AliPMDHotData.cxx
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
24 ClassImp(AliPMDHotData)
25
26 AliPMDHotData::AliPMDHotData()
27 {
28   // Default constructor
29   Reset();
30 }
31 // ----------------------------------------------------------------- //
32 AliPMDHotData::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 // ----------------------------------------------------------------- //
43 AliPMDHotData::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++)
51     {
52       for(Int_t smn = 0; smn < kModule; smn++)
53         {
54           for(Int_t row = 0; row < kRow; row++)
55             {
56               for(Int_t col = 0; col < kCol; col++)
57                 {
58                   fHotChannel[det][smn][row][col] = hotda.GetHotChannel(det,smn,row,col);
59                 }
60             }
61         }
62     }
63 }
64 // ----------------------------------------------------------------- //
65 AliPMDHotData &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 // ----------------------------------------------------------------- //
87 AliPMDHotData::~AliPMDHotData()
88 {
89   //destructor
90 }
91 // ----------------------------------------------------------------- //
92 void AliPMDHotData::Reset()
93 {
94
95   for(Int_t det = 0; det < kDet; det++)
96     {
97       for(Int_t smn = 0; smn < kModule; smn++)
98         {
99           for(Int_t row = 0; row < kRow; row++)
100             {
101             for(Int_t col = 0; col < kCol; col++)
102               {
103                 fHotChannel[det][smn][row][col] = 0.;
104               }
105             }
106         }
107     }
108 }
109 // ----------------------------------------------------------------- //
110 // ----------------------------------------------------------------- //
111 Float_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 }
115 void 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 }
119 //------------------------------------------------------------------------------ //
120 void AliPMDHotData::Print(Option_t *) const
121 {
122   printf("\n ######Flag for each cells ####\n");
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                 {
131                   printf("Flag[%d,%d,%d,%d]= %4.1f \n",det,smn,row,col,
132                          fHotChannel[det][smn][row][col]);
133                 }
134               printf("\n");
135             }
136         }
137     }
138 }