Belle II Software  release-05-01-25
ARICHHvChannelsMapping.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_HVCHANNELS 24
18 
19 namespace Belle2 {
24 
28  class ARICHHvChannelsMapping : public TObject {
29 
30  public:
31 
34 
41  std::vector<int> getChannelValues(int connectionID, int pinID) const;
42 
48  int getPinID(std::vector<int> channel) const;
49 
55  int getConnectionID(std::vector<int> channel) const;
56 
63  int getCrate(int connectionID, int pinID) const;
64 
71  int getSlot(int connectionID, int pinID) const;
72 
79  int getChannel(int connectionID, int pinID) const;
80 
87  void addMapping(int crate, int slot, int channelID, int connectionID, int pinID);
88 
89  private:
90 
91  std::map<std::vector<int>, std::vector<int>> m_channel2type;
95  };
96 
98 } // namespace
Belle2::ARICHHvChannelsMapping::getConnectionID
int getConnectionID(std::vector< int > channel) const
Get connection ID from hv power supply channel ID.
Definition: ARICHHvChannelsMapping.cc:39
Belle2::ARICHHvChannelsMapping
The Class for ARICH mapping of bias power supply channels to modules.
Definition: ARICHHvChannelsMapping.h:28
Belle2::ARICHHvChannelsMapping::getChannelValues
std::vector< int > getChannelValues(int connectionID, int pinID) const
Get bias power supply channel ID from inner cable type and ID.
Definition: ARICHHvChannelsMapping.cc:23
Belle2::ARICHHvChannelsMapping::getCrate
int getCrate(int connectionID, int pinID) const
Get connection ID from hv power supply channel ID.
Definition: ARICHHvChannelsMapping.cc:45
Belle2::ARICHHvChannelsMapping::ARICHHvChannelsMapping
ARICHHvChannelsMapping()
Default constructor.
Definition: ARICHHvChannelsMapping.cc:19
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::ARICHHvChannelsMapping::getSlot
int getSlot(int connectionID, int pinID) const
Get connection ID from hv power supply channel ID.
Definition: ARICHHvChannelsMapping.cc:50
Belle2::ARICHHvChannelsMapping::getChannel
int getChannel(int connectionID, int pinID) const
Get connection ID from hv power supply channel ID.
Definition: ARICHHvChannelsMapping.cc:55
Belle2::ARICHHvChannelsMapping::addMapping
void addMapping(int crate, int slot, int channelID, int connectionID, int pinID)
Add new entry to the mapping table.
Definition: ARICHHvChannelsMapping.cc:60
Belle2::ARICHHvChannelsMapping::getPinID
int getPinID(std::vector< int > channel) const
Get inner cable pin ID from hv power supply channel ID.
Definition: ARICHHvChannelsMapping.cc:33
Belle2::ARICHHvChannelsMapping::ClassDef
ClassDef(ARICHHvChannelsMapping, 1)
ClassDef, must be the last term before the closing {}.
Belle2::ARICHHvChannelsMapping::m_channel2type
std::map< std::vector< int >, std::vector< int > > m_channel2type
power suply channel ID link to inner cable
Definition: ARICHHvChannelsMapping.h:91