|
ATLAS Offline Software
|
Go to the documentation of this file.
16 #ifndef MUONCALIBIDENTIFIER_IDHASHTABLEHELPER_H
17 # define MUONCALIBIDENTIFIER_IDHASHTABLEHELPER_H
23 template <
unsigned int N,
class ID,
class HASH >
54 int operator[](
unsigned int fieldIndex )
const;
86 template <
unsigned int N,
class ID,
class HASH >
88 for (
unsigned int i = 0;
i <
N; ++
i ) m_fields[
i] = INT_MAX;
91 template <
unsigned int N,
class ID,
class HASH >
100 template <
unsigned int N,
class ID,
class HASH >
102 for (
unsigned int i = 0;
i <
N; ++
i ) m_fields[
i] =
fields[
i];
105 template <
unsigned int N,
class ID,
class HASH >
110 template <
unsigned int N,
class ID,
class HASH >
112 return m_fields[
index];
115 template <
unsigned int N,
class ID,
class HASH >
121 template <
unsigned int N,
class ID,
class HASH >
127 template <
unsigned int N,
class ID,
class HASH >
132 template <
unsigned int N,
class ID,
class HASH >
134 for (
unsigned int i = 0;
i <
N; ++
i ) m_fields[
i] =
fields[
i];
137 template <
unsigned int N,
class ID,
class HASH >
142 s_defaultHash = defHash;
145 template <
unsigned int N,
class ID,
class HASH >
148 return s_defaultHash;
151 template <
unsigned int N,
class ID,
class HASH >
157 template <
unsigned int N,
class ID,
class HASH >
160 return defaultHash();
163 template <
unsigned int N,
class ID,
class HASH >
165 return id != s_defaultId;
171 template <
unsigned int N,
class ID,
class HASH >
176 template <
unsigned int N,
class ID,
class HASH >
181 #endif // MUONCALIBIDENTIFIER_IDHASHTABLEHELPER_H
virtual ~IdHashTableHelper()
virtual destructor needed because of derivation
std::vector< Identifier > ID
static bool isValid(const IdentifierType &)
void setField(int index, int value)
Set field at index to value.
void setFields(int fields[N])
Set fields from array.
int operator[](unsigned int fieldIndex) const
Return the value encoded in field.
static IdentifierType defaultIdentifier()
Return default (=invalid) identifier.
static IdentifierType s_defaultId
const IdentifierType & getId() const
Get the identifier.
HASH ValueType
needed for MultiDimArray<> instantiation
ID IdentifierType
define type IdentifierType
IdHashTableHelper()
Default constructor.
static HashType defaultHash()
Returns default (=invalid) hash.
static void setDefaults(const IdentifierType &defId, const HashType &defHash)
Set the default (invalid) values for identifier and hash.
static HashType s_defaultHash
Helper base class for instantiation of templated class IdentifierHashTable.
HASH HashType
define type HashType
static ValueType defaultValue()
Return default hash.
void setId(const IdentifierType &id)
Set (only) the identifier.