GenericThingId Class Reference

#include <GenericThingId.h>

List of all members.

Public Types

enum  EThingType {
  kUnknown = 0, kRawChannelId, kPlexPixelSpotId, kPlexStripEndId,
  kPlexLedId
}
typedef enum
GenericThingId::EThingType 
ThingType_t

Public Member Functions

 GenericThingId ()
 GenericThingId (Int_t encoded)
 GenericThingId (const RawChannelId &c)
 GenericThingId (const PlexPixelSpotId &c)
 GenericThingId (const PlexStripEndId &c)
 GenericThingId (const PlexLedId &c)
const char * AsString (const char *opt="") const
bool operator< (const GenericThingId &other) const

Public Attributes

Int_t fType
Int_t fEncoded

Detailed Description

Definition at line 25 of file GenericThingId.h.


Member Typedef Documentation


Member Enumeration Documentation

Enumerator:
kUnknown 
kRawChannelId 
kPlexPixelSpotId 
kPlexStripEndId 
kPlexLedId 

Definition at line 41 of file GenericThingId.h.

00041                           {
00042     kUnknown = 0,
00043     kRawChannelId,
00044     kPlexPixelSpotId,
00045     kPlexStripEndId,
00046     kPlexLedId
00047   } ThingType_t;


Constructor & Destructor Documentation

GenericThingId::GenericThingId (  ) 

Definition at line 17 of file GenericThingId.cxx.

00018   : fType(kUnknown), 
00019     fEncoded(0)
00020 {}

GenericThingId::GenericThingId ( Int_t  encoded  ) 

Definition at line 22 of file GenericThingId.cxx.

00023   : fType(kUnknown),
00024     fEncoded(encoded)
00025 {}

GenericThingId::GenericThingId ( const RawChannelId c  ) 

Definition at line 27 of file GenericThingId.cxx.

00028   : fType(kRawChannelId),
00029     fEncoded(c.GetEncoded())
00030 {}

GenericThingId::GenericThingId ( const PlexPixelSpotId c  ) 

Definition at line 32 of file GenericThingId.cxx.

00033   : fType(kPlexPixelSpotId),
00034     fEncoded(c.GetEncoded())
00035 {}

GenericThingId::GenericThingId ( const PlexStripEndId c  ) 

Definition at line 37 of file GenericThingId.cxx.

00038   : fType(kPlexStripEndId),
00039     fEncoded(c.GetEncoded())
00040 {}

GenericThingId::GenericThingId ( const PlexLedId c  ) 

Definition at line 42 of file GenericThingId.cxx.

00043   : fType(kPlexLedId),
00044     fEncoded(c.GetEncoded())
00045 {}


Member Function Documentation

const char * GenericThingId::AsString ( const char *  opt = ""  )  const

Definition at line 47 of file GenericThingId.cxx.

References fEncoded, Form(), fType, kPlexLedId, kPlexPixelSpotId, kPlexStripEndId, kRawChannelId, and kUnknown.

00048 {
00049   switch(fType) {
00050   case kRawChannelId:
00051     return RawChannelId(fEncoded).AsString(opt);
00052     
00053   case kPlexPixelSpotId:
00054     return PlexPixelSpotId(fEncoded).AsString(opt);
00055 
00056   case kPlexLedId:
00057     return PlexLedId(fEncoded).AsString(opt);
00058     
00059   case kPlexStripEndId:
00060     return PlexStripEndId(fEncoded).AsString(opt);
00061 
00062   case kUnknown:
00063     return Form("GenericThingId: %d",fEncoded);
00064 
00065   default:
00066     return Form("GenericThingId: (%d)%d",fType,fEncoded);
00067   }
00068 }

bool GenericThingId::operator< ( const GenericThingId other  )  const

Definition at line 70 of file GenericThingId.cxx.

References fEncoded, and fType.

00071 {
00072   // Used for std::map
00073   if(fType<other.fType) return true;
00074   if(fEncoded<other.fEncoded) return true;
00075   return false;
00076 }


Member Data Documentation

Definition at line 39 of file GenericThingId.h.

Referenced by AsString(), and operator<().

Definition at line 38 of file GenericThingId.h.

Referenced by AsString(), and operator<().


The documentation for this class was generated from the following files:

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1