ATLAS Offline Software
Loading...
Searching...
No Matches
MdtTubeInChamberHashTableType Class Reference

holds the MDT chamber type information in the form of a MdtChamberTypeInfo data member. More...

#include <MdtTubeInChamberHashTableType.h>

Inheritance diagram for MdtTubeInChamberHashTableType:
Collaboration diagram for MdtTubeInChamberHashTableType:

Public Types

typedef IdentifierHashCalc< MdtTubeInChamberIdFieldsBaseClass
 define type BaseClass
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. More...
typedef MdtTubeInChamberIdFields IdFieldsType
 define the type IdFieldsType
typedef MdtTubeInChamberIdFields::IdentifierType IdType
 define the type IdType
typedef MdtTubeInChamberIdFields::HashType HashType
 define the type HashType

Public Member Functions

 MdtTubeInChamberHashTableType (const MdtChamberTypeInfo &type)
 constructor
bool operator== (const MdtTubeInChamberHashTableType &) const
bool operator== (const MdtChamberTypeInfo &) const
unsigned int nMultilayers () const
 Return the number of multilayers in the chamber.
unsigned int nLayers () const
 Return the number of layers per multilayer.
unsigned int nTubes () const
 Return the number of tubes per layer.
unsigned int nTotalTubes () const
 Return the total number of tubes in the chamber.
void clear ()
 Clear the hashtable.
unsigned int size () const
 Number of hashes in the table.
bool checkValidity () const
 Check that the table is internally consistent.
bool addEntry (const IdType &id)
 Add an identifier to the table.
void setFieldLimits (unsigned int fieldIndex, int fieldMin, int fieldMax)
 Set the limits of a specific field.
HashType getHash (const IdType &id) const
 Get hash from 0 to size()-1.
IdType getIdentifier (const HashType &idHash) const
 Get identifier from hash.
void dump (std::ostream &os=std::cout) const
 Dump complete table to output stream.
std::string dumpToString () const
 Dump complete table into a string.

Private Member Functions

bool isInRange (const MdtTubeInChamberIdFields &idFields) const
void update ()

Private Attributes

MdtChamberTypeInfo m_chamberType
int m_fieldsMin [NFIELDS]
int m_fieldsMax [NFIELDS]
unsigned int m_fieldsSize [NFIELDS]
unsigned int m_fieldsFactor [NFIELDS]
MdtTubeInChamberIdFields m_idFields

Detailed Description

holds the MDT chamber type information in the form of a MdtChamberTypeInfo data member.

Is is used by MdtHashTable.

Definition at line 29 of file MdtTubeInChamberHashTableType.h.

Member Typedef Documentation

◆ BaseClass

◆ HashType

define the type HashType

Definition at line 43 of file IdentifierHashCalc.h.

◆ IdFieldsType

define the type IdFieldsType

Definition at line 39 of file IdentifierHashCalc.h.

◆ IdType

define the type IdType

Definition at line 41 of file IdentifierHashCalc.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
inherited

N is the number of fields to use from the identifier NMAX is just to make sure we get unsigned int type of enum.

Definition at line 37 of file IdentifierHashCalc.h.

Constructor & Destructor Documentation

◆ MdtTubeInChamberHashTableType()

MdtTubeInChamberHashTableType::MdtTubeInChamberHashTableType ( const MdtChamberTypeInfo & type)
inlineexplicit

constructor

Definition at line 53 of file MdtTubeInChamberHashTableType.h.

55 : m_chamberType( type )
56{
58 MdtTubeId::multilayerMin(),
59 MdtTubeId::multilayerMin() + m_chamberType.nMultilayers() - 1 );
61 MdtTubeId::layerMin(),
62 MdtTubeId::layerMin() + m_chamberType.nLayers() - 1 );
64 MdtTubeId::tubeMin(),
65 MdtTubeId::tubeMin() + m_chamberType.nTubes() - 1 );
66}
void setFieldLimits(unsigned int fieldIndex, int fieldMin, int fieldMax)

Member Function Documentation

◆ addEntry()

bool IdentifierHashCalc< MdtTubeInChamberIdFields >::addEntry ( const IdType & id)
inherited

Add an identifier to the table.

◆ checkValidity()

bool IdentifierHashCalc< MdtTubeInChamberIdFields >::checkValidity ( ) const
inherited

Check that the table is internally consistent.

An empty table will return false.

◆ clear()

void IdentifierHashCalc< MdtTubeInChamberIdFields >::clear ( )
inherited

Clear the hashtable.

◆ dump()

void IdentifierHashCalc< MdtTubeInChamberIdFields >::dump ( std::ostream & os = std::cout) const
inherited

Dump complete table to output stream.

◆ dumpToString()

std::string IdentifierHashCalc< MdtTubeInChamberIdFields >::dumpToString ( ) const
inherited

Dump complete table into a string.

◆ getHash()

HashType IdentifierHashCalc< MdtTubeInChamberIdFields >::getHash ( const IdType & id) const
inherited

Get hash from 0 to size()-1.

Returns invalid hash if id is not in table.

◆ getIdentifier()

IdType IdentifierHashCalc< MdtTubeInChamberIdFields >::getIdentifier ( const HashType & idHash) const
inherited

Get identifier from hash.

Returns invalid identifier if hash is out of range.

◆ isInRange()

bool IdentifierHashCalc< MdtTubeInChamberIdFields >::isInRange ( const MdtTubeInChamberIdFields & idFields) const
privateinherited

◆ nLayers()

unsigned int MdtTubeInChamberHashTableType::nLayers ( ) const
inline

Return the number of layers per multilayer.

Definition at line 81 of file MdtTubeInChamberHashTableType.h.

81 {
82 return m_chamberType.nLayers();
83}

◆ nMultilayers()

unsigned int MdtTubeInChamberHashTableType::nMultilayers ( ) const
inline

Return the number of multilayers in the chamber.

Definition at line 68 of file MdtTubeInChamberHashTableType.h.

68 {
69 return m_chamberType.nMultilayers();
70}

◆ nTotalTubes()

unsigned int MdtTubeInChamberHashTableType::nTotalTubes ( ) const
inline

Return the total number of tubes in the chamber.

Definition at line 89 of file MdtTubeInChamberHashTableType.h.

89 {
90 return m_chamberType.nTotalTubes();
91}

◆ nTubes()

unsigned int MdtTubeInChamberHashTableType::nTubes ( ) const
inline

Return the number of tubes per layer.

Definition at line 85 of file MdtTubeInChamberHashTableType.h.

85 {
86 return m_chamberType.nTubes();
87}

◆ operator==() [1/2]

bool MdtTubeInChamberHashTableType::operator== ( const MdtChamberTypeInfo & rhs) const
inline
Returns
true if chambertype is equal (=number of multilayers, layers and tubes)

Definition at line 77 of file MdtTubeInChamberHashTableType.h.

77 {
78 return m_chamberType == rhs;
79}

◆ operator==() [2/2]

bool MdtTubeInChamberHashTableType::operator== ( const MdtTubeInChamberHashTableType & rhs) const
inline
Returns
true if chambertype is equal (=number of multilayers, layers and tubes)

Definition at line 73 of file MdtTubeInChamberHashTableType.h.

73 {
74 return m_chamberType == rhs.m_chamberType;
75}

◆ setFieldLimits()

void IdentifierHashCalc< MdtTubeInChamberIdFields >::setFieldLimits ( unsigned int fieldIndex,
int fieldMin,
int fieldMax )
inherited

Set the limits of a specific field.

◆ size()

unsigned int IdentifierHashCalc< MdtTubeInChamberIdFields >::size ( ) const
inherited

Number of hashes in the table.

◆ update()

void IdentifierHashCalc< MdtTubeInChamberIdFields >::update ( )
privateinherited

Member Data Documentation

◆ m_chamberType

MdtChamberTypeInfo MdtTubeInChamberHashTableType::m_chamberType
private

Definition at line 49 of file MdtTubeInChamberHashTableType.h.

◆ m_fieldsFactor

unsigned int IdentifierHashCalc< MdtTubeInChamberIdFields >::m_fieldsFactor[NFIELDS]
privateinherited

Definition at line 76 of file IdentifierHashCalc.h.

◆ m_fieldsMax

int IdentifierHashCalc< MdtTubeInChamberIdFields >::m_fieldsMax[NFIELDS]
privateinherited

Definition at line 74 of file IdentifierHashCalc.h.

◆ m_fieldsMin

int IdentifierHashCalc< MdtTubeInChamberIdFields >::m_fieldsMin[NFIELDS]
privateinherited

Definition at line 73 of file IdentifierHashCalc.h.

◆ m_fieldsSize

unsigned int IdentifierHashCalc< MdtTubeInChamberIdFields >::m_fieldsSize[NFIELDS]
privateinherited

Definition at line 75 of file IdentifierHashCalc.h.

◆ m_idFields

Definition at line 77 of file IdentifierHashCalc.h.


The documentation for this class was generated from the following file: