/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Enumerations | Functions
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_t FromString (const char *str)
DetectorId_t FromString0 (const char *str)
bool isAD (DetectorId_t id)
bool isWaterShield (DetectorId_t id)
bool isRPC (DetectorId_t id)

Enumeration Type Documentation

Enumerator:
kUnknown 
kAD1 
kAD2 
kAD3 
kAD4 
kIWS 
kOWS 
kRPC 
kAll 

Definition at line 11 of file DetectorId.h.

                      {
        kUnknown = 0,
        kAD1,
        kAD2,
        kAD3,
        kAD4,
        kIWS, 
        kOWS,
        kRPC,
        kAll
    };

Function Documentation

const char * DetectorId::AsString ( DetectorId_t  id)

Definition at line 21 of file DetectorId.cc.

{

    if (id < 0 || id > kAll) return names[0];
    return names[id];
}
DetectorId::DetectorId_t DetectorId::FromString ( const char *  str)

Definition at line 41 of file DetectorId.cc.

{
  if(strncasecmp("Unknown",str,7)==0) return kUnknown ;
  if(strncasecmp("AD1",str,3)==0) return kAD1;
  if(strncasecmp("AD2",str,3)==0) return kAD2;
  if(strncasecmp("AD3",str,3)==0) return kAD3;
  if(strncasecmp("AD4",str,3)==0) return kAD4;
  if(strncasecmp("IWS",str,3)==0) return kIWS;
  if(strncasecmp("OWS",str,3)==0) return kOWS;
  if(strncasecmp("RPC",str,3)==0) return kRPC;
  if(strncasecmp("All",str,3)==0) return kAll;
  return kUnknown ;
}
DetectorId::DetectorId_t DetectorId::FromString0 ( const char *  str)

Definition at line 28 of file DetectorId.cc.

{
    string s = str;
    transform(s.begin(),s.end(),s.begin(),::toupper);

    for (int ind=1; names[ind]; ++ind) {
        if (s == names[ind]) return (DetectorId::DetectorId_t)ind;
    }
    return kUnknown;
   // not working for "All"
}
bool DetectorId::isAD ( DetectorId_t  id)

Definition at line 56 of file DetectorId.cc.

{
  return (id == kAD1 || id == kAD2 || id == kAD3 || id == kAD4);
}
bool DetectorId::isWaterShield ( DetectorId_t  id)

Definition at line 61 of file DetectorId.cc.

{
  return (id == kIWS || id == kOWS);
}
bool DetectorId::isRPC ( DetectorId_t  id)

Definition at line 66 of file DetectorId.cc.

{
  return (id == kRPC);
}
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 09:56:20 for Conventions by doxygen 1.7.4