1 #ifndef GAUDIALG_GAUDIHISTOID_H 2 #define GAUDIALG_GAUDIHISTOID_H 1 64 inline bool numeric() const noexcept {
return -1 != m_nID; }
66 inline bool literal() const noexcept {
return !m_aID.empty(); }
68 inline bool undefined() const noexcept {
return !numeric() && !literal(); }
82 return hash() !=
id.hash()
84 : numeric() &&
id.numeric()
85 ?
id.numericID() == numericID()
86 : literal() &&
id.literal() ?
id.literalID() == literalID() : idAsString() ==
id.idAsString();
89 inline bool operator!=(
const ID&
id )
const {
return !( *
this == id ); }
98 numeric() &&
id.numeric()
99 ? numericID() <
id.numericID()
100 : literal() &&
id.literal() ? literalID() <
id.literalID() : idAsString() <
id.idAsString();
113 inline size_t hash() const noexcept {
return m_hash; }
115 inline size_t __hash__() const noexcept {
return hash(); }
148 #endif // GAUDIALG_GAUDIHISTOID_H ID(const LiteralID &id)
Implicit 'copy' constructor from a literal ID.
const LiteralID & literalID() const noexcept
Returns the ID as a LiteralID.
std::size_t operator()(const T &key) const
the hash-function
bool operator!() const noexcept
good ID?
ID(LiteralID &&id)
Implicit 'move' constructor from a literal ID.
bool operator!=(const ID &id) const
Implement the != operator, using the == operator.
int NumericID
type for internal numeric ID
NumericID numericID() const noexcept
Returns the numerical ID.
bool undefined() const noexcept
Is this ID undefined.
bool literal() const noexcept
Is this ID numeric.
ID(const NumericID id=-1)
Implicit constructor from a numeric ID.
std::size_t hash_value(TupleID const &b)
size_t __hash__() const noexcept
return hash value (for python)
bool operator<(const ID &id) const noexcept
Implement the operator < Implementation depends on type of ID.
std::string LiteralID
type for internal literal ID
size_t hash() const noexcept
return hash value (for python)
Forward declarations for the functions in SerializeSTL.h.
bool operator==(const ID &id) const noexcept
Implement the operator == Implementation depends on type of ID.
LiteralID m_aID
Internal alpha-numeric ID.
bool numeric() const noexcept
Is this ID numeric.
GaudiAlg.h GaudiAlg/GaudiAlg.h Namespace with definition of useful constants, types and function,...
ID class for Histogram and Ntuples.
std::ostream & operator<<(std::ostream &str, const GaudiAlg::ID &id)
Operator overloading for ostream.
ID(const char *id)
Implicit constructor from a literal ID.