Belle II Software development
ARICHCopperMapping.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#include <TObject.h>
12#include <map>
13#include <vector>
14
15#define N_COPPERS 18
16
17namespace Belle2 {
23
28 class ARICHCopperMapping : public TObject {
29
30 public:
31
34
40 unsigned getCopperID(unsigned mergerID) const;
41
47 unsigned getFinesse(unsigned mergerID) const;
48
49
56 void addMapping(unsigned mergerID, unsigned copperID, unsigned finesse);
57
64 unsigned getMergerID(unsigned copperID, unsigned finesse) const;
65
70 const std::vector<uint16_t>& getCopperIDs() const { return m_copperIDs;}
71
75 void print() const;
76
77 private:
78
79 std::vector<std::pair<uint16_t, uint16_t>> m_merger2copper;
81 std::map<uint16_t, std::vector<uint16_t>> m_copper2merger;
83 std::vector<uint16_t> m_copperIDs;
87 };
88
90} // namespace
The Class for ARICH mapping of merger to copper boards.
unsigned getCopperID(unsigned mergerID) const
Get copper board to which merger is connected.
void addMapping(unsigned mergerID, unsigned copperID, unsigned finesse)
Add new entry to the mapping table.
unsigned getMergerID(unsigned copperID, unsigned finesse) const
Get ID of merger connected to the given finesse of copper board.
std::map< uint16_t, std::vector< uint16_t > > m_copper2merger
map coppers to mergers
std::vector< uint16_t > m_copperIDs
vector of IDs of used copper boards
ARICHCopperMapping()
Default constructor.
const std::vector< uint16_t > & getCopperIDs() const
Get vector of IDs of copper boards.
void print() const
Print mapping parameters.
std::vector< std::pair< uint16_t, uint16_t > > m_merger2copper
map of mergers to copper boards
ClassDef(ARICHCopperMapping, 1)
ClassDef, must be the last term before the closing {}.
unsigned getFinesse(unsigned mergerID) const
Get finesse of copper board to which merger is connected.
Abstract base class for different kinds of events.