6#include "Identifier/Identifier.h"
7#include "GaudiKernel/MsgStream.h"
13 const auto start =
id.data();
14 const auto end = start +
id.size();
15 static constexpr int base = 16;
17 const auto [p,ec] = std::from_chars(start+2, end,
m_id,
base);
18 if (ec != std::errc()){
19 throw std::runtime_error(
"Number was not parsed in Identifier::set");
26 return std::format(
"0x{:0x}",
m_id);
MsgStream & operator<<(MsgStream &f, const Identifier &id)
std::string getString() const
Provide a string form of the identifier - hexadecimal.
value_type m_id
The only data member.
void show(std::ostream &out=std::cout) const
Print out in hex form.
void set(const std::string &id)
build from a string form - hexadecimal