Typedefs | |
| typedef enum ElecType::EElecType | Elec_t |
Enumerations | |
| enum | EElecType { kVA = 0x00, kQIE = 0x01, kReroot = 0x02, kUnknown = 0x03 } |
Functions | |
| const Char_t * | AsString (Elec_t etype) |
| ElecType::Elec_t | StringToEnum (const Char_t *chars, Int_t maxChar=0) |
| ElecType::Elec_t | CharToEnum (Char_t c) |
|
|
Referenced by StringToEnum(). |
|
|
Definition at line 25 of file ElecType.h. 00025 {
00026 kVA = 0x00,
00027 kQIE = 0x01,
00028 kReroot = 0x02,
00029 kUnknown = 0x03
00030 } Elec_t;
|
|
|
|
Definition at line 49 of file ElecType.cxx. Referenced by PlexRawChannelToPinDiode::Fill(), PlexRawChannelReadoutType::Fill(), PlexPixelToRawChannel::Fill(), PlexPixelSpotToStripEnd::Fill(), and PlexPinDiodeToLed::Fill(). 00050 {
00051 switch (c) {
00052 case 'V':
00053 case 'v':
00054 case '0':
00055 case 0x0:
00056 return kVA;
00057 case 'Q':
00058 case 'q':
00059 case '1':
00060 case 0x1:
00061 return kQIE;
00062 case 'R':
00063 case 'r':
00064 case '2':
00065 case 0x2:
00066 return kReroot;
00067 default:
00068 return kUnknown;
00069 }
00070
00071 }
|
|
||||||||||||
|
Definition at line 25 of file ElecType.cxx. References Elec_t. Referenced by PulserRefDriftPin::Fill(), PulserRawGainPin::Fill(), PulserRawDriftPin::Fill(), PulserGainPin::Fill(), and PulserDriftPin::Fill(). 00026 {
00027 // convert a set of chars to a valid enum
00028 // based on existence of only one of:
00029 // VA: far detector electronics
00030 // QIE: near detector electronics
00031 // Reroot: pseudo-numbering scheme
00032
00033 if (maxChar==0) maxChar = strlen(chars);
00034 Char_t* lowchars = new Char_t [maxChar];
00035 for (int i=0; i<maxChar; ++i) lowchars[i] = tolower(chars[i]);
00036
00037 Elec_t etype = kUnknown;
00038 if (0==strncmp(lowchars,"va",TMath::Min(maxChar,2))) etype = kVA;
00039 else if (0==strncmp(lowchars,"qie",TMath::Min(maxChar,3))) etype = kQIE;
00040 else if (0==strncmp(lowchars,"reroot",TMath::Min(maxChar,6))) etype = kReroot;
00041
00042 delete [] lowchars;
00043
00044 return etype;
00045 }
|
1.3.9.1