ATLAS Offline Software
DetectorDescription
Identifier
Identifier
IdentifierHash.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
6
#ifndef IDENTIFIER_IDENTIFIERHASH_H
7
#define IDENTIFIER_IDENTIFIERHASH_H
8
9
#include "GaudiKernel/MsgStream.h"
25
class
IdentifierHash
{
26
public
:
27
using
value_type
=
unsigned
int
;
29
IdentifierHash
() =
default
;
31
IdentifierHash
(
value_type
value
);
34
operator
value_type
()
const
;
35
value_type
value
()
const
;
38
bool
is_valid
()
const
;
40
IdentifierHash
&
operator =
(
value_type
value
);
41
IdentifierHash
&
operator +=
(
value_type
value
);
42
IdentifierHash
&
operator -=
(
value_type
value
);
43
44
private
:
46
static
constexpr
value_type
m_max_value
= 0xFFFFFFFF;
47
//
48
value_type
m_value
=
m_max_value
;
49
};
50
51
52
// Define a hash functional
53
namespace
std {
54
template
<>
55
struct
hash
<
IdentifierHash
>{
56
size_t
operator()
(
const
IdentifierHash
&
id
)
const
{
57
return
static_cast<
size_t
>
(
id
.value());
58
}
59
};
60
}
61
62
#include "
Identifier/IdentifierHash.icc
"
63
#endif // IDENTIFIER_IDENTIFIERHASH_H
IdentifierHash::operator+=
IdentifierHash & operator+=(value_type value)
std::hash< IdentifierHash >::operator()
size_t operator()(const IdentifierHash &id) const
Definition:
IdentifierHash.h:56
IdentifierHash::value_type
unsigned int value_type
Definition:
IdentifierHash.h:27
IdentifierHash::m_value
value_type m_value
Definition:
IdentifierHash.h:48
IdentifierHash.icc
IdentifierHash::m_max_value
static constexpr value_type m_max_value
default value, and indicator of invalid state
Definition:
IdentifierHash.h:46
IdentifierHash::is_valid
bool is_valid() const
Check if id is in a valid state.
IdentifierHash::IdentifierHash
IdentifierHash()=default
Default methods.
IdentifierHash::value
value_type value() const
python.CaloAddPedShiftConfig.int
int
Definition:
CaloAddPedShiftConfig.py:45
CaloCondBlobAlgs_fillNoiseFromASCII.hash
dictionary hash
Definition:
CaloCondBlobAlgs_fillNoiseFromASCII.py:109
IdentifierHash::operator-=
IdentifierHash & operator-=(value_type value)
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition:
IdentifierHash.h:25
value_type
Definition:
EDM_MasterSearch.h:11
IdentifierHash::operator=
IdentifierHash & operator=(value_type value)
Assignment operators.
IdentifierHash::IdentifierHash
IdentifierHash(value_type value)
Initialization with value.
Generated on Tue Jul 15 2025 21:10:58 for ATLAS Offline Software by
1.8.18