FairRoot/PandaRoot
Public Member Functions | Public Attributes | List of all members
Tkey Class Reference

#include <PndLmdDim.h>

Public Member Functions

bool operator< (const Tkey &comp) const
 
bool operator== (const Tkey &comp) const
 
 Tkey (const Tkey &copy)
 
 Tkey (int ihalf, int iplane, int imodule, int iside, int idie, int isensor)
 
 Tkey (string key)
 
 Tkey ()
 

Public Attributes

signed char half
 
signed char plane
 
signed char module
 
signed char side
 
signed char die
 
signed char sensor
 

Detailed Description

Definition at line 142 of file PndLmdDim.h.

Constructor & Destructor Documentation

Tkey::Tkey ( const Tkey copy)
inline

Definition at line 175 of file PndLmdDim.h.

References die, half, module, plane, sensor, sensor, and side.

175  {
176  half = copy.half;
177  plane = copy.plane;
178  module = copy.module;
179  side = copy.side;
180  die = copy.die;
181  sensor = copy.sensor;
182  }
signed char die
Definition: PndLmdDim.h:148
signed char sensor
Definition: PndLmdDim.h:149
signed char module
Definition: PndLmdDim.h:146
signed char plane
Definition: PndLmdDim.h:145
signed char side
Definition: PndLmdDim.h:147
signed char half
Definition: PndLmdDim.h:144
Tkey::Tkey ( int  ihalf,
int  iplane,
int  imodule,
int  iside,
int  idie,
int  isensor 
)
inline

Definition at line 184 of file PndLmdDim.h.

References sensor.

184  {
185  half = ihalf;
186  plane = iplane;
187  module = imodule;
188  side = iside;
189  die = idie;
190  sensor = isensor;
191  }
signed char die
Definition: PndLmdDim.h:148
signed char sensor
Definition: PndLmdDim.h:149
signed char module
Definition: PndLmdDim.h:146
signed char plane
Definition: PndLmdDim.h:145
signed char side
Definition: PndLmdDim.h:147
signed char half
Definition: PndLmdDim.h:144
Tkey::Tkey ( string  key)
inline

Definition at line 193 of file PndLmdDim.h.

References sensor, and sign().

193  {
194  int sign (1);
195  int ikey(0); // 0,1,2,3,4,5 = ihalf, iplane, imodule, iside, idie, isensor
196  int number;
197  for (unsigned int ichar = 0; ichar < key.size(); ichar++){
198  if (key[ichar] == '-'){
199  sign = -1;
200  }
201  if (isdigit(key[ichar])){
202  number = (key[ichar]-'0')*sign;
203  sign = 1;
204  if (ikey == 0) half = number;
205  if (ikey == 1) plane = number;
206  if (ikey == 2) module = number;
207  if (ikey == 3) side = number;
208  if (ikey == 4) die = number;
209  if (ikey == 5) sensor = number;
210  ikey++;
211  }
212  }
213  if (ikey != 6) cout << " Error in Generate_Tkey: key string " << key << " is not valid " << endl;
214  }
signed char die
Definition: PndLmdDim.h:148
signed char sensor
Definition: PndLmdDim.h:149
signed char module
Definition: PndLmdDim.h:146
int sign(T val)
Definition: PndCADef.h:48
signed char plane
Definition: PndLmdDim.h:145
signed char side
Definition: PndLmdDim.h:147
signed char half
Definition: PndLmdDim.h:144
Tkey::Tkey ( )
inline

Definition at line 215 of file PndLmdDim.h.

215  {
216 
217  }

Member Function Documentation

bool Tkey::operator< ( const Tkey comp) const
inline

Definition at line 150 of file PndLmdDim.h.

References die, half, module, plane, sensor, sensor, and side.

150  {
151  if (half < comp.half) return true;
152  if (half > comp.half) return false;
153  if (plane < comp.plane) return true;
154  if (plane > comp.plane) return false;
155  if (module < comp.module) return true;
156  if (module > comp.module) return false;
157  if (side < comp.side) return true;
158  if (side > comp.side) return false;
159  if (die < comp.die) return true;
160  if (die > comp.die) return false;
161  if (sensor < comp.sensor) return true;
162  if (sensor >= comp.sensor) return false;
163  return false;
164  }
signed char die
Definition: PndLmdDim.h:148
signed char sensor
Definition: PndLmdDim.h:149
signed char module
Definition: PndLmdDim.h:146
signed char plane
Definition: PndLmdDim.h:145
signed char side
Definition: PndLmdDim.h:147
signed char half
Definition: PndLmdDim.h:144
bool Tkey::operator== ( const Tkey comp) const
inline

Definition at line 166 of file PndLmdDim.h.

References die, half, module, plane, sensor, sensor, and side.

166  {
167  return (half == comp.half) &&
168  (plane == comp.plane) &&
169  (module == comp.module) &&
170  (side == comp.side) &&
171  (die == comp.die) &&
172  (sensor == comp.sensor);
173  }
signed char die
Definition: PndLmdDim.h:148
signed char sensor
Definition: PndLmdDim.h:149
signed char module
Definition: PndLmdDim.h:146
signed char plane
Definition: PndLmdDim.h:145
signed char side
Definition: PndLmdDim.h:147
signed char half
Definition: PndLmdDim.h:144

Member Data Documentation

signed char Tkey::die

Definition at line 148 of file PndLmdDim.h.

Referenced by operator<(), operator==(), Tkey(), and PndLmdDim::Write_transformation_matrices().

signed char Tkey::half

Definition at line 144 of file PndLmdDim.h.

Referenced by operator<(), operator==(), Tkey(), and PndLmdDim::Write_transformation_matrices().

signed char Tkey::module

Definition at line 146 of file PndLmdDim.h.

Referenced by operator<(), operator==(), Tkey(), and PndLmdDim::Write_transformation_matrices().

signed char Tkey::plane

Definition at line 145 of file PndLmdDim.h.

Referenced by operator<(), operator==(), Tkey(), and PndLmdDim::Write_transformation_matrices().

signed char Tkey::sensor

Definition at line 149 of file PndLmdDim.h.

Referenced by operator<(), operator==(), Tkey(), and PndLmdDim::Write_transformation_matrices().

signed char Tkey::side

Definition at line 147 of file PndLmdDim.h.

Referenced by operator<(), operator==(), Tkey(), and PndLmdDim::Write_transformation_matrices().


The documentation for this class was generated from the following file: