Belle II Software  release-08-01-10
KLMChannelArrayIndex Class Reference

KLM channel array index. More...

#include <KLMChannelArrayIndex.h>

Inheritance diagram for KLMChannelArrayIndex:
Collaboration diagram for KLMChannelArrayIndex:

Public Member Functions

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

Static Public Member Functions

static const KLMChannelArrayIndexInstance ()
 Instantiation.
 

Private Member Functions

 KLMChannelArrayIndex ()
 Constructor.
 
 ~KLMChannelArrayIndex ()
 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 channel array index.

Definition at line 23 of file KLMChannelArrayIndex.h.

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.

◆ getNumber()

uint16_t getNumber ( uint16_t  index) const
inherited

Get element number.

Parameters
[in]indexElement index.

Definition at line 61 of file KLMElementArrayIndex.cc.


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