TPCCondData
TimePixPixelMode.cc
Go to the documentation of this file.
1 /* TimePixPixelMode.cc
2  * $Id$
3  */
4 
5 #include "TimePixPixelMode.h"
6 
7 namespace tpcconddata{
8 
10  return std::string("$Rev: 2624 $");
11 }
12 
13 
14  TimePixPixelMode::TimePixPixelMode(int ChipID, int PixelID, int PixelMode, int PixelStatus ,int PixelCalibration){
15  setChipID(ChipID);
16  setPixelID(PixelID);
17  // setPixelMode(PixelMode);
18  setPixelStatusWord( PixelStatus | PixelMode );
19  setPixelCalibration( PixelCalibration );
20 }
21 
23 
25  return obj()->getIntVal( 0 ) ;
26 }
27 
29  return obj()->getIntVal( 1 ) ;
30 }
31 
33  return obj()->getIntVal( 2 ) & 0x3 ;
34 }
35 
37  return obj()->getIntVal( 2 ) & 0x30000 ;
38 }
39 
41  return obj()->getIntVal( 2 ) ;
42 }
43 
45  return obj()->getIntVal( 3 ) ;
46 }
47 
49  return TimePixPixelMode::PixelKey( obj()->getIntVal( 0 ),
50  obj()->getIntVal( 1 ) ) ;
51 }
52 
53 
55  obj()->setIntVal( 0, Chip) ;
56 }
57 
59  obj()->setIntVal( 1, Pixel) ;
60 }
61 
63  obj()->setIntVal( 2,
64  // everything but the last two bits of the previous value
65  (obj()->getIntVal( 2 ) & ~0x3) |
66  // only the last two bits of the given mode
67  (Mode & 0x3) ) ;
68 }
69 
71  obj()->setIntVal( 2,
72  // everything but the status bits of the previous value
73  (obj()->getIntVal( 2 ) & ~0x30000) |
74  // only the status bits of the given status
75  (Status & 0x30000) ) ;
76 
77 }
78 
79 
81  obj()->setIntVal( 2, StatusWord) ;
82 }
83 
85  obj()->setIntVal( 3, Calibration) ;
86 }
87 
88 
89 TimePixPixelMode::PixelKey::PixelKey( int chipid, int pixelid ) {
90 
91  ChipID = chipid;
92  PixelID = pixelid;
93 
94  }
95 
96 
97 
98 
99 }
static std::string getRevision()
void setPixelStatus(int Status)
Sets the status of this pixel.
TimePixPixelMode(int ChipID=0, int PixelID=0, int PixelMode=0, int PixelStatus=0, int PixelCalibration=0)
int getPixelMode()
Gets the mode of the pixel four possibilities: MEDIPIX, TOT, TIMEPIX, ONEHIT.
void setPixelMode(int Mode)
Sets the mode of this pixel.
int getPixelCalibration()
Gets the pixel calibration value to correct clock distribution.
void setPixelCalibration(int Calibration)
Sets the calibration correction value.
void setPixelStatusWord(int StatusWord)
Sets the status word of a pixel.
int getPixelStatus()
Gets the status of the pixel three possibilities: INTACT (default), NOISY, DEAD.
PixelKey getPixelKey()
Gets the pixelKey of the pixel.
int getPixelID()
Gets the pixelID of the pixel count begins with 0.
int getPixelStatusWord()
Gets the status word which is a combination of the pixel mode and the pixel status.
int getChipID()
Gets the chipID of the chip.