|
Gaudi Framework, version v21r4 |
| Home | Generated: 7 Sep 2009 |
#include <GaudiAlg/GaudiHistoID.h>

Internally handles both numeric and string like IDs
Definition at line 46 of file GaudiHistoID.h.
Public Types | |
| typedef int | NumericID |
| type for internal numeric ID | |
| typedef std::string | LiteralID |
| type for internal literal ID | |
Public Member Functions | |
| ID (const NumericID id=-1) | |
| Implicit constructor from a numeric ID. | |
| ID (const LiteralID &id) | |
| Implicit constructor from a literal ID. | |
| ID (const char *id) | |
| Implicit constructor from a literal ID. | |
| ~ID () | |
| Destructor. | |
| bool | numeric () const |
| Is this ID numeric. | |
| bool | literal () const |
| Is this ID numeric. | |
| bool | undefined () const |
| Is this ID undefined. | |
| const LiteralID & | literalID () const |
| Returns the ID as a LiteralID. | |
| NumericID | numericID () const |
| Returns the numerical ID. | |
| GAUDI_API LiteralID | idAsString () const |
| Return ID as string, for both numeric and literal IDs. | |
| operator std::string () const | |
| cast operator to std::string | |
| bool | operator== (const ID &id) const |
| Implement the operator == Implementation depends on type of ID. | |
| bool | operator!= (const ID &id) const |
| Implement the != operator, using the == operator. | |
| bool | operator< (const ID &id) const |
| Implement the operator < Implementation depends on type of ID. | |
| GAUDI_API std::ostream & | fillStream (std::ostream &s) const |
| bool | operator! () const |
| good ID? | |
| size_t | hash () const |
| return hash value (for python) | |
| size_t | __hash__ () const |
| return hash value (for python) | |
Private Attributes | |
| NumericID | m_nID |
| Internal numeric ID. | |
| LiteralID | m_aID |
| Internal alpha-numeric ID. | |
| size_t | m_hash |
| the hash value of ID | |
| typedef int GaudiAlg::ID::NumericID |
| typedef std::string GaudiAlg::ID::LiteralID |
| GaudiAlg::ID::ID | ( | const char * | id | ) |
| GaudiAlg::ID::~ID | ( | ) | [inline] |
| bool GaudiAlg::ID::numeric | ( | ) | const [inline] |
| bool GaudiAlg::ID::literal | ( | ) | const [inline] |
| bool GaudiAlg::ID::undefined | ( | ) | const [inline] |
| const LiteralID& GaudiAlg::ID::literalID | ( | ) | const [inline] |
Returns the ID as a LiteralID.
Definition at line 72 of file GaudiHistoID.h.
00072 { return m_aID; }
| NumericID GaudiAlg::ID::numericID | ( | ) | const [inline] |
| GaudiAlg::ID::LiteralID GaudiAlg::ID::idAsString | ( | ) | const |
Return ID as string, for both numeric and literal IDs.
Definition at line 51 of file GaudiHistoID.cpp.
00052 { 00053 std::ostringstream s ; 00054 fillStream ( s ) ; 00055 return s.str() ; 00056 }
| GaudiAlg::ID::operator std::string | ( | ) | const [inline] |
cast operator to std::string
Definition at line 78 of file GaudiHistoID.h.
00078 { return idAsString () ; }
| bool GaudiAlg::ID::operator== | ( | const ID & | id | ) | const [inline] |
Implement the operator == Implementation depends on type of ID.
Definition at line 83 of file GaudiHistoID.h.
00084 { 00085 return 00086 hash () != id.hash () ? false : 00087 numeric () && id.numeric () ? id.numericID () == numericID () : 00088 literal () && id.literal () ? id.literalID () == literalID () : 00089 idAsString () == id.idAsString() ; 00090 }
| bool GaudiAlg::ID::operator!= | ( | const ID & | id | ) | const [inline] |
| bool GaudiAlg::ID::operator< | ( | const ID & | id | ) | const [inline] |
Implement the operator < Implementation depends on type of ID.
Definition at line 97 of file GaudiHistoID.h.
00098 { 00099 return 00100 //hash () < id.hash () ? true : 00101 //hash () > id.hash () ? false : 00102 numeric () && id.numeric() ? numericID() < id.numericID() : 00103 literal () && id.literal() ? literalID() < id.literalID() : 00104 idAsString () < id.idAsString() ; 00105 }
| std::ostream & GaudiAlg::ID::fillStream | ( | std::ostream & | s | ) | const |
| bool GaudiAlg::ID::operator! | ( | ) | const [inline] |
| size_t GaudiAlg::ID::hash | ( | ) | const [inline] |
return hash value (for python)
Definition at line 117 of file GaudiHistoID.h.
00117 { return m_hash ; }
| size_t GaudiAlg::ID::__hash__ | ( | ) | const [inline] |
return hash value (for python)
Definition at line 119 of file GaudiHistoID.h.
00119 { return hash () ; }
NumericID GaudiAlg::ID::m_nID [private] |
LiteralID GaudiAlg::ID::m_aID [private] |
size_t GaudiAlg::ID::m_hash [private] |