1 #ifndef GAUDIALG_GAUDIHISTOID_H 2 #define GAUDIALG_GAUDIHISTOID_H 1 56 ID (
const NumericID
id = -1 ) ;
58 ID (
const LiteralID&
id ) ;
60 ID (
const char*
id ) ;
64 inline bool numeric ()
const {
return -1 != m_nID ; }
66 inline bool literal ()
const {
return !m_aID.empty() ; }
68 inline bool undefined ()
const {
return !numeric() && !literal(); }
70 inline const LiteralID&
literalID()
const {
return m_aID; }
72 inline NumericID
numericID()
const {
return m_nID; }
84 hash () !=
id.hash () ?
false :
85 numeric () &&
id.numeric () ?
id.numericID () == numericID () :
86 literal () &&
id.literal () ?
id.literalID () == literalID () :
87 idAsString () ==
id.idAsString() ;
90 inline bool operator!=(
const ID&
id )
const {
return ! ( *
this == id ) ; }
100 numeric () &&
id.numeric() ? numericID() <
id.numericID() :
101 literal () &&
id.literal() ? literalID() <
id.literalID() :
102 idAsString () <
id.idAsString() ;
115 inline size_t hash ()
const {
return m_hash ; }
117 inline size_t __hash__ ()
const {
return hash () ; }
135 {
return id.fillStream ( str ) ; }
151 #endif // GAUDIALG_GAUDIHISTOID_H
size_t m_hash
the hash value of ID
int NumericID
type for internal numeric ID
size_t hash() const
return hash value (for python)
bool operator!=(const ID &id) const
Implement the != operator, using the == operator.
NumericID m_nID
Internal numeric ID.
bool operator==(const ID &id) const
Implement the operator == Implementation depends on type of ID.
NumericID numericID() const
Returns the numerical ID.
bool operator!() const
good ID?
const LiteralID & literalID() const
Returns the ID as a LiteralID.
std::string LiteralID
type for internal literal ID
size_t __hash__() const
return hash value (for python)
bool undefined() const
Is this ID undefined.
bool operator<(const ID &id) const
Implement the operator < Implementation depends on type of ID.
Forward declarations for the functions in SerializeSTL.h.
LiteralID m_aID
Internal alpha-numeric ID.
bool literal() const
Is this ID numeric.
GaudiAlg.h GaudiAlg/GaudiAlg.h Namespace with definition of useful constants, types and function...
ID class for Histogram and Ntuples.
bool numeric() const
Is this ID numeric.
std::ostream & operator<<(std::ostream &str, const GaudiAlg::ID &id)
Operator overloading for ostream.