5#ifndef IDENTIFIER_IDENTIFIER_H
6#define IDENTIFIER_IDENTIFIER_H
8#include "GaudiKernel/MsgStream.h"
67 void set (
const std::string&
id);
85 return id.get_compact();
90 inline auto operator <=> (
const Identifier & other)
const {
return m_id <=> other.m_id;}
139 return static_cast<size_t>(
id.get_compact());
bool operator==(const DataVector< T > &a, const DataVector< T > &b)
Vector equality comparison.
constexpr std::enable_if_t< is_bitmask_v< E >, E & > operator&=(E &lhs, E rhs)
operator&=
constexpr std::enable_if_t< is_bitmask_v< E >, E & > operator|=(E &lhs, E rhs)
operator|=
std::string getString() const
Provide a string form of the identifier - hexadecimal.
static constexpr value_type MAX_BIT
friend class IdDictDictionary
value_type m_id
The only data member.
bool is_valid() const
Check if id is in a valid state.
void clear()
Reset to invalid state.
friend class AtlasDetectorID
value_type get_compact() const
Get the compact id.
Identifier(const Identifier32 &other)
Constructor from Identifier32.
Identifier(Identifier32::value_type value)
Constructor from 32-bit value_type and int (to avoid common implicit conversions)
Identifier & set_literal(value_type value)
Set literal value.
static constexpr value_type ALL_BITS
void show() const
Print out in hex form.
value_type extract(size_type shift, size_type mask) const
extract field from identifier (shift first, then mask)
static constexpr unsigned int NBITS
value_type mask_shift(value_type mask, size_type shift) const
extract field(s) by masking first, then shifting
unsigned long long size_type
value_type extract(size_type shift) const
extract field, no mask
Identifier()=default
Default constructor.
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
Identifier(value_type value)
friend class IdDictFieldImplementation
unsigned long long value_type
void set(const std::string &id)
build from a string form - hexadecimal
A get_compact functional for use in STL algorithms.
value_type operator()(const Identifier &id)
size_t operator()(const Identifier &id) const