Belle II Software  release-05-01-25
ARICHBiasChannelsMapping.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2017 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Manca Mrvar *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 #include <TObject.h>
14 #include <map>
15 #include <vector>
16 
17 #define N_BIASCHANNELS 48
18 
19 namespace Belle2 {
24 
28  class ARICHBiasChannelsMapping : public TObject {
29 
30  public:
31 
34 
44  int getChannelID(int crate, int slot, int connectionID, int innerID, const std::string& type) const;
45 
53  std::vector<int> getChannelValues(int connectionID, int innerID, const std::string& type) const;
54 
60  int getPinID(std::vector<int> channelID) const;
61 
67  std::string getType(std::vector<int> channel) const;
68 
74  int getInnerID(std::vector<int> channel) const;
75 
81  int getConnectionID(std::vector<int> channel) const;
82 
88  std::tuple<int, int, std::string> getInnerConnection(std::vector<int> channel) const;
89 
100  void addMapping(int crate, int slot, int channelID, int pinID, int connectionID, int innerID, const std::string& type);
101 
105  void print() const;
106 
107  private:
108 
109  std::map<std::vector<int>, std::tuple<int, int, int, std::string>>
114  };
115 
117 } // namespace
Belle2::ARICHBiasChannelsMapping::ClassDef
ClassDef(ARICHBiasChannelsMapping, 1)
ClassDef, must be the last term before the closing {}.
Belle2::ARICHBiasChannelsMapping::print
void print() const
Print properties.
Definition: ARICHBiasChannelsMapping.cc:91
Belle2::ARICHBiasChannelsMapping::getInnerID
int getInnerID(std::vector< int > channel) const
Get inner cable pin ID from bias power supply channel ID.
Definition: ARICHBiasChannelsMapping.cc:33
Belle2::ARICHBiasChannelsMapping::addMapping
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.
Definition: ARICHBiasChannelsMapping.cc:77
Belle2::ARICHBiasChannelsMapping::getType
std::string getType(std::vector< int > channel) const
Get bias/guard type from channel.
Definition: ARICHBiasChannelsMapping.cc:38
Belle2::ARICHBiasChannelsMapping::ARICHBiasChannelsMapping
ARICHBiasChannelsMapping()
Default constructor.
Definition: ARICHBiasChannelsMapping.cc:19
Belle2::ARICHBiasChannelsMapping::getPinID
int getPinID(std::vector< int > channelID) const
Get inner cable pin ID from bias power supply channel ID.
Definition: ARICHBiasChannelsMapping.cc:23
Belle2::ARICHBiasChannelsMapping::getConnectionID
int getConnectionID(std::vector< int > channel) const
Get inner cable pin ID from bias power supply channel ID.
Definition: ARICHBiasChannelsMapping.cc:28
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::ARICHBiasChannelsMapping::getInnerConnection
std::tuple< int, int, std::string > getInnerConnection(std::vector< int > channel) const
Get inner cable ID and type, connected to bias channel.
Definition: ARICHBiasChannelsMapping.cc:45
Belle2::ARICHBiasChannelsMapping::m_channel2type
std::map< std::vector< int >, std::tuple< int, int, int, std::string > > m_channel2type
power suply channel ID link to inner cable
Definition: ARICHBiasChannelsMapping.h:110
Belle2::ARICHBiasChannelsMapping
The Class for ARICH mapping of bias power supply channels to modules.
Definition: ARICHBiasChannelsMapping.h:28
Belle2::ARICHBiasChannelsMapping::getChannelID
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.
Definition: ARICHBiasChannelsMapping.cc:53
Belle2::ARICHBiasChannelsMapping::getChannelValues
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.
Definition: ARICHBiasChannelsMapping.cc:64