|
Gaudi Framework, version v23r4 |
| Home | Generated: Mon Sep 17 2012 |
ID class for Histogram and Ntuples. More...
#include <GaudiAlg/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 | |
ID class for Histogram and Ntuples.
Internally handles both numeric and string like IDs
Definition at line 46 of file GaudiHistoID.h.
| typedef std::string GaudiAlg::ID::LiteralID |
type for internal literal ID
Definition at line 53 of file GaudiHistoID.h.
| typedef int GaudiAlg::ID::NumericID |
type for internal numeric ID
Definition at line 51 of file GaudiHistoID.h.
| GaudiAlg::ID::ID | ( | const NumericID | id = -1 ) |
Implicit constructor from a numeric ID.
Definition at line 29 of file GaudiHistoID.cpp.
: m_nID ( id ) , m_aID ( "" ) , m_hash ( boost::hash_value ( id ) ) {}
| GaudiAlg::ID::ID | ( | const LiteralID & | id ) |
Implicit constructor from a literal ID.
Definition at line 37 of file GaudiHistoID.cpp.
: m_nID ( -1 ) , m_aID ( id ) , m_hash ( boost::hash_value ( id ) ) {}
| GaudiAlg::ID::ID | ( | const char * | id ) |
Implicit constructor from a literal ID.
Definition at line 45 of file GaudiHistoID.cpp.
| GaudiAlg::ID::~ID | ( | ) | [inline] |
| size_t GaudiAlg::ID::__hash__ | ( | ) | const [inline] |
| std::ostream & GaudiAlg::ID::fillStream | ( | std::ostream & | s ) | const |
| size_t GaudiAlg::ID::hash | ( | ) | 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.
{
std::ostringstream s ;
fillStream ( s ) ;
return s.str() ;
}
| bool GaudiAlg::ID::literal | ( | ) | const [inline] |
| const LiteralID& GaudiAlg::ID::literalID | ( | ) | const [inline] |
| bool GaudiAlg::ID::numeric | ( | ) | const [inline] |
| NumericID GaudiAlg::ID::numericID | ( | ) | const [inline] |
| GaudiAlg::ID::operator std::string | ( | ) | const [inline] |
cast operator to std::string
Definition at line 78 of file GaudiHistoID.h.
{ return idAsString () ; }
| bool GaudiAlg::ID::operator! | ( | ) | const [inline] |
| bool GaudiAlg::ID::operator!= | ( | const ID & | id ) | const [inline] |
Implement the != operator, using the == operator.
Definition at line 92 of file GaudiHistoID.h.
{ return ! ( *this == id ) ; }
| 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.
{
return
//hash () < id.hash () ? true :
//hash () > id.hash () ? false :
numeric () && id.numeric() ? numericID() < id.numericID() :
literal () && id.literal() ? literalID() < id.literalID() :
idAsString () < id.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.
{
return
hash () != id.hash () ? false :
numeric () && id.numeric () ? id.numericID () == numericID () :
literal () && id.literal () ? id.literalID () == literalID () :
idAsString () == id.idAsString() ;
}
| bool GaudiAlg::ID::undefined | ( | ) | const [inline] |
Is this ID undefined.
Definition at line 70 of file GaudiHistoID.h.
LiteralID GaudiAlg::ID::m_aID [private] |
Internal alpha-numeric ID.
Definition at line 126 of file GaudiHistoID.h.
size_t GaudiAlg::ID::m_hash [private] |
the hash value of ID
Definition at line 131 of file GaudiHistoID.h.
NumericID GaudiAlg::ID::m_nID [private] |
Internal numeric ID.
Definition at line 124 of file GaudiHistoID.h.