Belle II Software development
KLMElementArrayIndex.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#pragma once
10
11/* KLM headers. */
12#include <klm/dataobjects/KLMChannelIndex.h>
13
14/* C++ headers. */
15#include <map>
16
17namespace Belle2 {
27
28 public:
29
33 explicit KLMElementArrayIndex(enum KLMChannelIndex::IndexLevel indexLevel);
34
38 virtual ~KLMElementArrayIndex();
39
44 uint16_t getIndex(uint16_t number) const;
45
50 uint16_t getNumber(uint16_t index) const;
51
55 uint16_t getNElements() const
56 {
57 return m_NElements;
58 }
59
60 private:
61
63 std::map<uint16_t, uint16_t> m_MapNumberIndex;
64
66 std::map<uint16_t, uint16_t> m_MapIndexNumber;
67
69 uint16_t m_NElements;
70
71 };
72
74}
IndexLevel
Index level (loop over KLM elements at the specified level).
KLM element array index.
uint16_t getNumber(uint16_t index) const
Get element number.
uint16_t m_NElements
Number of elements.
uint16_t getNElements() const
Get number of elements.
uint16_t getIndex(uint16_t number) const
Get element index.
std::map< uint16_t, uint16_t > m_MapIndexNumber
Map KLM element index - KLM element number.
virtual ~KLMElementArrayIndex()
Destructor.
std::map< uint16_t, uint16_t > m_MapNumberIndex
Map KLM element number - KLM element index.
Abstract base class for different kinds of events.