1 #ifndef GAUDIALG_GAUDIHISTOID_H 2 #define GAUDIALG_GAUDIHISTOID_H 1 66 inline bool numeric() const noexcept {
return -1 != m_nID; }
68 inline bool literal() const noexcept {
return !m_aID.empty(); }
70 inline bool undefined() const noexcept {
return !numeric() && !literal(); }
72 inline const LiteralID&
literalID() const noexcept {
return m_aID; }
74 inline NumericID
numericID() const noexcept {
return m_nID; }
85 return hash() !=
id.hash()
87 : numeric() &&
id.numeric()
88 ?
id.numericID() == numericID()
89 : literal() &&
id.literal() ?
id.literalID() == literalID() : idAsString() ==
id.idAsString();
92 inline bool operator!=(
const ID&
id )
const {
return !( *
this == id ); }
102 numeric() &&
id.numeric()
103 ? numericID() <
id.numericID()
104 : literal() &&
id.literal() ? literalID() <
id.literalID() : idAsString() <
id.idAsString();
117 inline size_t hash() const noexcept {
return m_hash; }
119 inline size_t __hash__() const noexcept {
return hash(); }
154 #endif // GAUDIALG_GAUDIHISTOID_H ID(const LiteralID &id)
Implicit 'copy' constructor from a literal ID.
bool operator!() const noexcept
good ID?
bool operator==(const ID &id) const noexcept
Implement the operator == Implementation depends on type of ID.
ID(LiteralID &&id)
Implicit 'move' constructor from a literal ID.
NumericID numericID() const noexcept
Returns the numerical ID.
int NumericID
type for internal numeric ID
bool operator!=(const ID &id) const
Implement the != operator, using the == operator.
bool operator<(const ID &id) const noexcept
Implement the operator < Implementation depends on type of ID.
size_t __hash__() const noexcept
return hash value (for python)
ID(const NumericID id=-1)
Implicit constructor from a numeric ID.
std::size_t hash_value(TupleID const &b)
bool literal() const noexcept
Is this ID numeric.
std::string LiteralID
type for internal literal ID
virtual Out operator()(const vector_of_const_< In > &inputs) const =0
Forward declarations for the functions in SerializeSTL.h.
const LiteralID & literalID() const noexcept
Returns the ID as a LiteralID.
LiteralID m_aID
Internal alpha-numeric ID.
bool numeric() const noexcept
Is this ID numeric.
size_t hash() const noexcept
return hash value (for python)
bool undefined() const noexcept
Is this ID undefined.
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.