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