Belle II Software development
ARICHBiasChannelsMapping.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_BIASCHANNELS 48
16
17namespace Belle2 {
27 class ARICHBiasChannelsMapping : public TObject {
28
29 public:
30
35
45 int getChannelID(int crate, int slot, int connectionID, int innerID, const std::string& type) const;
46
55 std::vector<int> getChannelValues(int connectionID, int innerID, const std::string& type) const;
56
62 int getPinID(std::vector<int> channelID) const;
63
69 std::string getType(std::vector<int> channel) const;
70
76 int getInnerID(std::vector<int> channel) const;
77
83 int getConnectionID(std::vector<int> channel) const;
84
93 std::tuple<int, int, std::string> getInnerConnection(std::vector<int> channel) const;
94
105 void addMapping(int crate, int slot, int channelID, int pinID, int connectionID, int innerID, const std::string& type);
106
110 void print() const;
111
112 private:
113
114 std::map<std::vector<int>, std::tuple<int, int, int, std::string>>
119 };
120
122} // namespace
This class provides ARICH mapping of HAPD modules to bias power supply channels.
std::vector< int > getChannelValues(int connectionID, int innerID, const std::string &type) const
Get bias power supply cratem slot and channel ID from inner cable type and ID.
int getConnectionID(std::vector< int > channel) const
Get inner cable pin ID from bias power supply channel ID.
int getInnerID(std::vector< int > channel) const
Get inner cable pin ID from bias power supply channel ID.
std::string getType(std::vector< int > channel) const
Get bias/guard type from channel.
int getChannelID(int crate, int slot, int connectionID, int innerID, const std::string &type) const
Get bias power supply channel ID from inner cable type and ID.
std::tuple< int, int, std::string > getInnerConnection(std::vector< int > channel) const
Get inner cable ID and type, connected to bias channel.
int getPinID(std::vector< int > channelID) const
Get inner cable pin ID from bias power supply channel ID.
ClassDef(ARICHBiasChannelsMapping, 1)
ClassDef, must be the last term before the closing {}.
void addMapping(int crate, int slot, int channelID, int pinID, int connectionID, int innerID, const std::string &type)
Add new entry to the mapping table.
void print() const
Print properties.
std::map< std::vector< int >, std::tuple< int, int, int, std::string > > m_channel2type
power suply channel ID link to inner cable
Abstract base class for different kinds of events.