Belle II Software development
KLMModuleArrayIndex Class Reference

KLM module array index. More...

#include <KLMModuleArrayIndex.h>

Inheritance diagram for KLMModuleArrayIndex:
KLMElementArrayIndex

Public Member Functions

uint16_t getIndex (uint16_t number) const
 Get element index.
 
uint16_t getNumber (uint16_t index) const
 Get element number.
 
uint16_t getNElements () const
 Get number of elements.
 

Static Public Member Functions

static const KLMModuleArrayIndexInstance ()
 Instantiation.
 

Private Member Functions

 KLMModuleArrayIndex ()
 Constructor.
 
 ~KLMModuleArrayIndex ()
 Destructor.
 

Private Attributes

std::map< uint16_t, uint16_t > m_MapNumberIndex
 Map KLM element number - KLM element index.
 
std::map< uint16_t, uint16_t > m_MapIndexNumber
 Map KLM element index - KLM element number.
 
uint16_t m_NElements
 Number of elements.
 

Detailed Description

KLM module array index.

Definition at line 23 of file KLMModuleArrayIndex.h.

Constructor & Destructor Documentation

◆ KLMModuleArrayIndex()

KLMModuleArrayIndex ( )
private

Constructor.

Definition at line 17 of file KLMModuleArrayIndex.cc.

◆ ~KLMModuleArrayIndex()

~KLMModuleArrayIndex ( )
private

Destructor.

Definition at line 22 of file KLMModuleArrayIndex.cc.

23{
24}

Member Function Documentation

◆ getIndex()

uint16_t getIndex ( uint16_t  number) const
inherited

Get element index.

Parameters
[in]numberElement number.

Definition at line 52 of file KLMElementArrayIndex.cc.

53{
54 std::map<uint16_t, uint16_t>::const_iterator it =
55 m_MapNumberIndex.find(number);
56 if (it == m_MapNumberIndex.end())
57 B2FATAL("Incorrect KLM element number.");
58 return it->second;
59}
std::map< uint16_t, uint16_t > m_MapNumberIndex
Map KLM element number - KLM element index.

◆ getNElements()

uint16_t getNElements ( ) const
inlineinherited

Get number of elements.

Definition at line 55 of file KLMElementArrayIndex.h.

56 {
57 return m_NElements;
58 }
uint16_t m_NElements
Number of elements.

◆ getNumber()

uint16_t getNumber ( uint16_t  index) const
inherited

Get element number.

Parameters
[in]indexElement index.

Definition at line 61 of file KLMElementArrayIndex.cc.

62{
63 std::map<uint16_t, uint16_t>::const_iterator it =
64 m_MapIndexNumber.find(index);
65 if (it == m_MapIndexNumber.end())
66 B2FATAL("Incorrect KLM element index.");
67 return it->second;
68}
std::map< uint16_t, uint16_t > m_MapIndexNumber
Map KLM element index - KLM element number.

◆ Instance()

const KLMModuleArrayIndex & Instance ( )
static

Instantiation.

Definition at line 26 of file KLMModuleArrayIndex.cc.

27{
28 static KLMModuleArrayIndex klmModuleArrayIndex;
29 return klmModuleArrayIndex;
30}
KLM module array index.

Member Data Documentation

◆ m_MapIndexNumber

std::map<uint16_t, uint16_t> m_MapIndexNumber
privateinherited

Map KLM element index - KLM element number.

Definition at line 66 of file KLMElementArrayIndex.h.

◆ m_MapNumberIndex

std::map<uint16_t, uint16_t> m_MapNumberIndex
privateinherited

Map KLM element number - KLM element index.

Definition at line 63 of file KLMElementArrayIndex.h.

◆ m_NElements

uint16_t m_NElements
privateinherited

Number of elements.

Definition at line 69 of file KLMElementArrayIndex.h.


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