![]() |
ATLAS Offline Software
|
#include <IdentifierHashCalc.h>
Public Types | |
| enum | { NFIELDS = T::NFIELDS, NMAX =UINT_MAX } |
| N is the number of fields to use from the identifier NMAX is just to make sure we get unsigned int type of enum. More... | |
| typedef T | IdFieldsType |
| define the type IdFieldsType More... | |
| typedef T::IdentifierType | IdType |
| define the type IdType More... | |
| typedef T::HashType | HashType |
| define the type HashType More... | |
Public Member Functions | |
| IdentifierHashCalc () | |
| Default constructor makes empty hash table. More... | |
| IdentifierHashCalc (const T &idFields) | |
| Make empty table with pointer set to external idHelper, which will be transmitted to the constructor of class T. More... | |
| void | clear () |
| Clear the hashtable. More... | |
| unsigned int | size () const |
| Number of hashes in the table. More... | |
| bool | checkValidity () const |
| Check that the table is internally consistent. More... | |
| bool | addEntry (const IdType &id) |
| Add an identifier to the table. More... | |
| void | setFieldLimits (unsigned int fieldIndex, int fieldMin, int fieldMax) |
| Set the limits of a specific field. More... | |
| HashType | getHash (const IdType &id) const |
| Get hash from 0 to size()-1. More... | |
| IdType | getIdentifier (const HashType &idHash) const |
| Get identifier from hash. More... | |
| void | dump (std::ostream &os=std::cout) const |
| Dump complete table to output stream. More... | |
| std::string | dumpToString () const |
| Dump complete table into a string. More... | |
Private Member Functions | |
| bool | isInRange (const T &idFields) const |
| void | update () |
Private Attributes | |
| int | m_fieldsMin [NFIELDS] |
| int | m_fieldsMax [NFIELDS] |
| unsigned int | m_fieldsSize [NFIELDS] |
| unsigned int | m_fieldsFactor [NFIELDS] |
| T | m_idFields |
Definition at line 29 of file IdentifierHashCalc.h.
| typedef T::HashType IdentifierHashCalc< T >::HashType |
define the type HashType
Definition at line 43 of file IdentifierHashCalc.h.
| typedef T IdentifierHashCalc< T >::IdFieldsType |
define the type IdFieldsType
Definition at line 39 of file IdentifierHashCalc.h.
| typedef T::IdentifierType IdentifierHashCalc< T >::IdType |
define the type IdType
Definition at line 41 of file IdentifierHashCalc.h.
| anonymous enum |
N is the number of fields to use from the identifier NMAX is just to make sure we get unsigned int type of enum.
| Enumerator | |
|---|---|
| NFIELDS | |
| NMAX | |
Definition at line 37 of file IdentifierHashCalc.h.
| IdentifierHashCalc< T >::IdentifierHashCalc | ( | ) |
Default constructor makes empty hash table.
|
explicit |
Make empty table with pointer set to external idHelper, which will be transmitted to the constructor of class T.
| bool IdentifierHashCalc< T >::addEntry | ( | const IdType & | id | ) |
Add an identifier to the table.
| bool IdentifierHashCalc< T >::checkValidity | ( | ) | const |
Check that the table is internally consistent.
An empty table will return false.
| void IdentifierHashCalc< T >::clear | ( | ) |
Clear the hashtable.
| void IdentifierHashCalc< T >::dump | ( | std::ostream & | os = std::cout | ) | const |
Dump complete table to output stream.
| std::string IdentifierHashCalc< T >::dumpToString | ( | ) | const |
Dump complete table into a string.
| HashType IdentifierHashCalc< T >::getHash | ( | const IdType & | id | ) | const |
Get hash from 0 to size()-1.
Returns invalid hash if id is not in table.
| IdType IdentifierHashCalc< T >::getIdentifier | ( | const HashType & | idHash | ) | const |
Get identifier from hash.
Returns invalid identifier if hash is out of range.
|
private |
| void IdentifierHashCalc< T >::setFieldLimits | ( | unsigned int | fieldIndex, |
| int | fieldMin, | ||
| int | fieldMax | ||
| ) |
Set the limits of a specific field.
| unsigned int IdentifierHashCalc< T >::size | ( | ) | const |
Number of hashes in the table.
|
private |
|
private |
Definition at line 76 of file IdentifierHashCalc.h.
|
private |
Definition at line 74 of file IdentifierHashCalc.h.
|
private |
Definition at line 73 of file IdentifierHashCalc.h.
|
private |
Definition at line 75 of file IdentifierHashCalc.h.
|
mutableprivate |
Definition at line 77 of file IdentifierHashCalc.h.
1.8.18