]> git.uio.no Git - u/mrichter/AliRoot.git/blob - RALICE/AliCalmodule.cxx
Introduction of the Copyright and cvs Log
[u/mrichter/AliRoot.git] / RALICE / AliCalmodule.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 /*
17 $Log$
18 */
19
20 #include "AliCalmodule.h"
21  
22 ClassImp(AliCalmodule) // Class implementation to enable ROOT I/O
23  
24 AliCalmodule::AliCalmodule()
25 {
26 // Default constructor, all module data is set to 0
27  fRow=0;
28  fCol=0;
29  fSigc=0;
30  fEdge=0;
31  fDead=0;
32  fGain=1;
33 }
34 ///////////////////////////////////////////////////////////////////////////
35 AliCalmodule::~AliCalmodule()
36 {
37 // Default destructor
38 }
39 ///////////////////////////////////////////////////////////////////////////
40 AliCalmodule::AliCalmodule(Int_t row,Int_t col,Float_t sig)
41 {
42 // Module constructor with initialisation of module data
43  fRow=row;
44  fCol=col;
45  fSignal=sig;
46  fSigc=sig;
47  fEdge=0;
48  fDead=0;
49  fGain=1;
50 }
51 ///////////////////////////////////////////////////////////////////////////
52 void AliCalmodule::SetRow(Int_t i)
53 {
54 // Set the row number for this module
55  fRow=i;
56 }
57 ///////////////////////////////////////////////////////////////////////////
58 void AliCalmodule::SetColumn(Int_t i)
59 {
60 // Set the column number for this module
61  fCol=i;
62 }
63 ///////////////////////////////////////////////////////////////////////////
64 void AliCalmodule::SetSignal(Int_t row,Int_t col,Float_t sig)
65 {
66 // Set or change the data of the module
67  fRow=row;
68  fCol=col;
69  fSignal=sig;
70  fSigc=sig;
71 }
72 ///////////////////////////////////////////////////////////////////////////
73 void AliCalmodule::AddSignal(Int_t row,Int_t col,Float_t sig)
74 {
75 // Add or change the data of the module
76  fRow=row;
77  fCol=col;
78  fSignal+=sig;
79  fSigc+=sig;
80 }
81 ///////////////////////////////////////////////////////////////////////////
82 void AliCalmodule::SetClusteredSignal(Float_t sig)
83 {
84 // Set or change the signal of the module after clustering
85  fSigc=sig;
86 }
87 ///////////////////////////////////////////////////////////////////////////
88 void AliCalmodule::SetEdgeOn()
89 {
90 // Indicate the module as edge module
91  fEdge=1;
92 }
93 ///////////////////////////////////////////////////////////////////////////
94 void AliCalmodule::SetEdgeOff()
95 {
96 // Indicate the module as non-edge module
97  fEdge=0;
98 }
99 ///////////////////////////////////////////////////////////////////////////
100 void AliCalmodule::EdgeUp()
101 {
102 // Increase the edge value by 1
103 // This simplifies treatment of edge modules around temp. dead modules
104  fEdge+=1;
105 }
106 ///////////////////////////////////////////////////////////////////////////
107 void AliCalmodule::EdgeDown()
108 {
109 // Decrease the edge value by 1
110 // This simplifies treatment of edge modules around temp. dead modules
111  if (fEdge > 0) fEdge-=1;
112 }
113 ///////////////////////////////////////////////////////////////////////////
114 void AliCalmodule::SetDead()
115 {
116 // Indicate the module as dead
117  fDead=1;
118 }
119 ///////////////////////////////////////////////////////////////////////////
120 void AliCalmodule::SetAlive()
121 {
122 // Indicate the module as dead
123  fDead=0;
124 }
125 ///////////////////////////////////////////////////////////////////////////
126 void AliCalmodule::SetGain(Float_t gain)
127 {
128 // Set the gain value of the readout system
129  fGain=gain;
130 }
131 ///////////////////////////////////////////////////////////////////////////
132 Int_t AliCalmodule::GetRow()
133 {
134 // Provide the row number of the module
135  return fRow;
136 }
137 ///////////////////////////////////////////////////////////////////////////
138 Int_t AliCalmodule::GetColumn()
139 {
140 // Provide the column number of the module
141  return fCol;
142 }
143 ///////////////////////////////////////////////////////////////////////////
144 Float_t AliCalmodule::GetSignal()
145 {
146 // Provide the signal value of the module
147  if (!fDead)
148  {
149   return fSignal;
150  }
151  else
152  {
153   return 0;
154  }
155 }
156 ///////////////////////////////////////////////////////////////////////////
157 Float_t AliCalmodule::GetClusteredSignal()
158 {
159 // Provide the signal of the module after clustering
160  if (!fDead)
161  {
162   return fSigc;
163  }
164  else
165  {
166   return 0;
167  }
168 }
169 ///////////////////////////////////////////////////////////////////////////
170 Int_t AliCalmodule::GetEdgeValue()
171 {
172 // Provide the value of the edge indicator (1=edge 0=no-edge)
173  return fEdge;
174 }
175 ///////////////////////////////////////////////////////////////////////////
176 Int_t AliCalmodule::GetDeadValue()
177 {
178 // Provide the value of the dead indicator (1=dead 0=alive)
179  return fDead;
180 }
181 ///////////////////////////////////////////////////////////////////////////
182 Float_t AliCalmodule::GetGain()
183 {
184 // Provide the gain value of the readout system
185  return fGain;
186 }
187 ///////////////////////////////////////////////////////////////////////////