| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

DetectorId Namespace Reference


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)

Enumeration Type Documentation

enum DetectorId::DetectorId_t

Enumerator:
kUnknown 
kAD1 
kAD2 
kAD3 
kAD4 
kIWS 
kOWS 
kRPC 
kAll 

Definition at line 11 of file DetectorId.h.

00011                       {
00012         kUnknown = 0,
00013         kAD1,
00014         kAD2,
00015         kAD3,
00016         kAD4,
00017         kIWS, 
00018         kOWS,
00019         kRPC,
00020         kAll
00021     };


Function Documentation

const char * DetectorId::AsString ( DetectorId_t  id  ) 

Definition at line 21 of file DetectorId.cc.

00022 {
00023 
00024     if (id < 0 || id > kAll) return names[0];
00025     return names[id];
00026 }

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  ) 

Definition at line 56 of file DetectorId.cc.

00057 {
00058   return (id == kAD1 || id == kAD2 || id == kAD3 || id == kAD4);
00059 }

bool DetectorId::isWaterShield ( DetectorId_t  id  ) 

Definition at line 61 of file DetectorId.cc.

00062 {
00063   return (id == kIWS || id == kOWS);
00064 }

| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:14:49 2011 for Conventions by doxygen 1.4.7