29 if (!tileHWID)
return;
36 std::vector<HWIdentifier>::const_iterator first = tileHWID->
drawer_begin();
37 std::vector<HWIdentifier>::const_iterator last = tileHWID->
drawer_end();
42 for ( ; first!=last; ++first) {
43 ID id = tileHWID->
frag(*first);
44 if (
id >= 0x100)
continue;
54 for ( ; first!=last; ++first) {
55 ID id = tileHWID->
frag(*first);
56 if (
id < 0x100)
continue;
88#define CASE(X) case TileFragHash::X: return #X
void initialize(const TileHWID *tileHWID, TYPE type=Default)
int hash(const ID &id) const
Convert ID to int (same as the converter, but easier to call from python)
static std::string typeToString(TYPE type)
Printable representation of a type.
int m_size
total number of IDs
int m_lookup[m_table_size]
ID identifier(int i) const
reverse conversion
std::vector< ID > m_int2id
TYPE type() const
return hash type
static const int m_table_size
lookup table
Helper class for TileCal online (hardware) identifiers.
int frag(const HWIdentifier &id) const
extract frag field from HW identifier
std::vector< HWIdentifier >::const_iterator drawer_end() const
end iterator for drawer Identifiers
std::vector< HWIdentifier >::const_iterator drawer_begin() const
begin iterator for drawer Identifiers
size_type drawer_hash_max() const
drawer hash table max size