Enumerations | |
enum | ReconStatus_t { kUnknown = 0, kGood = 1, kNotProcessed = 2, kBadReadout = 3, kNoHits = 4, kNotConverged = 5 } |
Functions | |
const char * | AsString (ReconStatus_t id) |
ReconStatus::ReconStatus_t | FromString (const char *str) |
dandwyer@caltech.edu 2009/04/17
Definition at line 15 of file Reconstruction.h.
00015 { 00016 kUnknown = 0, 00017 kGood = 1, 00018 kNotProcessed = 2, 00019 kBadReadout = 3, 00020 kNoHits = 4, 00021 kNotConverged = 5 00022 };
const char * ReconStatus::AsString | ( | ReconStatus_t | id | ) |
Definition at line 19 of file Reconstruction.cc.
00020 { 00021 00022 if (id < 0 || id > kNotConverged) return names[0]; 00023 return names[id]; 00024 }
ReconStatus_t ReconStatus::FromString | ( | const char * | str | ) |
Definition at line 26 of file Reconstruction.cc.
00027 { 00028 string s = str; 00029 transform(s.begin(),s.end(),s.begin(),::toupper); 00030 00031 for (int ind=1; names[ind]; ++ind) { 00032 if (s == names[ind]) return (ReconStatus::ReconStatus_t)ind; 00033 } 00034 return kUnknown; 00035 }