Enumerations | |
enum | DetectorId_t { kUnknown = 0, kAD1, kAD2, kAD3, kAD4, kIWS, kOWS, kRPC, kAll } |
Functions | |
const char * | AsString (DetectorId_t id) |
DetectorId::DetectorId_t | FromString0 (const char *str) |
DetectorId::DetectorId_t | FromString (const char *str) |
bool | isAD (DetectorId_t id) |
bool | isWaterShield (DetectorId_t id) |
const char * DetectorId::AsString | ( | DetectorId_t | id | ) |
DetectorId_t DetectorId::FromString0 | ( | const char * | str | ) |
Definition at line 28 of file DetectorId.cc.
00029 { 00030 string s = str; 00031 transform(s.begin(),s.end(),s.begin(),::toupper); 00032 00033 for (int ind=1; names[ind]; ++ind) { 00034 if (s == names[ind]) return (DetectorId::DetectorId_t)ind; 00035 } 00036 return kUnknown; 00037 // not working for "All" 00038 }
DetectorId_t DetectorId::FromString | ( | const char * | str | ) |
Definition at line 41 of file DetectorId.cc.
00042 { 00043 if(strncasecmp("Unknown",str,7)==0) return kUnknown ; 00044 if(strncasecmp("AD1",str,3)==0) return kAD1; 00045 if(strncasecmp("AD2",str,3)==0) return kAD2; 00046 if(strncasecmp("AD3",str,3)==0) return kAD3; 00047 if(strncasecmp("AD4",str,3)==0) return kAD4; 00048 if(strncasecmp("IWS",str,3)==0) return kIWS; 00049 if(strncasecmp("OWS",str,3)==0) return kOWS; 00050 if(strncasecmp("RPC",str,3)==0) return kRPC; 00051 if(strncasecmp("All",str,3)==0) return kAll; 00052 return kUnknown ; 00053 }
bool DetectorId::isAD | ( | DetectorId_t | id | ) |
bool DetectorId::isWaterShield | ( | DetectorId_t | id | ) |