ATLAS Offline Software
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
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 More...
 
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 More...
 
typedef T::IdentifierType IdType
 define the type IdType More...
 
typedef T::HashType HashType
 define the type HashType More...
 

Public Member Functions

 MdtTubeInChamberHashTableType (const MdtChamberTypeInfo &type)
 constructor More...
 
bool operator== (const MdtTubeInChamberHashTableType &) const
 
bool operator== (const MdtChamberTypeInfo &) const
 
unsigned int nMultilayers () const
 Return the number of multilayers in the chamber. More...
 
unsigned int nLayers () const
 Return the number of layers per multilayer. More...
 
unsigned int nTubes () const
 Return the number of tubes per layer. More...
 
unsigned int nTotalTubes () const
 Return the total number of tubes in the chamber. 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 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

define type BaseClass

Definition at line 40 of file MdtTubeInChamberHashTableType.h.

◆ HashType

typedef T::HashType IdentifierHashCalc< MdtTubeInChamberIdFields >::HashType
inherited

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

typedef T::IdentifierType IdentifierHashCalc< MdtTubeInChamberIdFields >::IdType
inherited

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.

37 { NFIELDS = T::NFIELDS, NMAX=UINT_MAX };

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 }

Member Function Documentation

◆ addEntry()

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

Add an identifier to the table.

◆ checkValidity()

bool IdentifierHashCalc< MdtTubeInChamberIdFields >::checkValidity
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
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
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 56 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:
MdtTubeInChamberIdFields::kMultilayerField
@ kMultilayerField
Definition: MdtTubeInChamberIdFields.h:40
MdtChamberTypeInfo::nTubes
unsigned int nTubes() const
Return the number of tubes per layer.
Definition: MdtChamberTypeInfo.h:70
IdentifierHashCalc< MdtTubeInChamberIdFields >::setFieldLimits
void setFieldLimits(unsigned int fieldIndex, int fieldMin, int fieldMax)
Set the limits of a specific field.
MdtTubeInChamberHashTableType::m_chamberType
MdtChamberTypeInfo m_chamberType
Definition: MdtTubeInChamberHashTableType.h:56
MdtTubeInChamberIdFields::kLayerField
@ kLayerField
Definition: MdtTubeInChamberIdFields.h:40
IdentifierHashCalc< MdtTubeInChamberIdFields >::NMAX
@ NMAX
Definition: IdentifierHashCalc.h:37
IdentifierHashCalc< MdtTubeInChamberIdFields >::NFIELDS
@ NFIELDS
Definition: IdentifierHashCalc.h:37
MdtTubeInChamberIdFields::kTubeField
@ kTubeField
Definition: MdtTubeInChamberIdFields.h:40
MdtChamberTypeInfo::nMultilayers
unsigned int nMultilayers() const
Return the number of multilayers in the chamber.
Definition: MdtChamberTypeInfo.h:60
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
MdtChamberTypeInfo::nTotalTubes
unsigned int nTotalTubes() const
Return the total number of tubes in the chamber.
Definition: MdtChamberTypeInfo.h:75
MdtChamberTypeInfo::nLayers
unsigned int nLayers() const
Return the number of layers per multilayer.
Definition: MdtChamberTypeInfo.h:65