Belle II Software development
ARICHHvCrateCableMapping Class Reference

The Class for ARICH bias voltages at gain 40. More...

#include <ARICHHvCrateCableMapping.h>

Inheritance diagram for ARICHHvCrateCableMapping:

Public Member Functions

 ARICHHvCrateCableMapping ()
 Default constructor.
 
int getSector (int connectionID) const
 Get sector ID.
 
int getCable (int connectionID) const
 Get sector ID.
 
int getConnectionID (const std::vector< int > &sectorCable) const
 Get sector ID.
 
void addMapping (int connectionID, std::vector< int > sectorCable)
 Add new entry to the mapping table.
 
void print () const
 Print mapping parameters.
 

Private Member Functions

 ClassDef (ARICHHvCrateCableMapping, 1)
 ClassDef, must be the last term before the closing {}.
 

Private Attributes

std::map< int, std::vector< int > > m_connection2cable
 map of modules to cables
 

Detailed Description

The Class for ARICH bias voltages at gain 40.

This class provides ARICH bias voltages at gain 40

Definition at line 24 of file ARICHHvCrateCableMapping.h.

Constructor & Destructor Documentation

◆ ARICHHvCrateCableMapping()

Default constructor.

Definition at line 17 of file ARICHHvCrateCableMapping.cc.

18{
19}

Member Function Documentation

◆ addMapping()

void addMapping ( int  connectionID,
std::vector< int >  sectorCable 
)

Add new entry to the mapping table.

Parameters
connectionIDconnection ID
sectorCablesector and cable number

Definition at line 43 of file ARICHHvCrateCableMapping.cc.

44{
45 m_connection2cable.insert(std::pair<int, std::vector<int>>(connectionID, sectorCable));
46}
std::map< int, std::vector< int > > m_connection2cable
map of modules to cables

◆ getCable()

int getCable ( int  connectionID) const

Get sector ID.

Parameters
connectionIDconnection ID
Returns
cable cable number ID

Definition at line 27 of file ARICHHvCrateCableMapping.cc.

28{
29 std::vector<int> sectorCable = m_connection2cable.find(connectionID)->second;
30 return sectorCable[1];
31}

◆ getConnectionID()

int getConnectionID ( const std::vector< int > &  sectorCable) const

Get sector ID.

Parameters
sectorCablevector of sector and cable numbers
Returns
connectionID connection ID

Definition at line 33 of file ARICHHvCrateCableMapping.cc.

34{
35 int connectionID = -1;
36 for (auto& i : m_connection2cable) {
37 if (i.second == sectorCable) connectionID = i.first;
38 }
39 return connectionID;
40}

◆ getSector()

int getSector ( int  connectionID) const

Get sector ID.

Parameters
connectionIDconnection ID
Returns
sector sector number ID

Definition at line 21 of file ARICHHvCrateCableMapping.cc.

22{
23 std::vector<int> sectorCable = m_connection2cable.find(connectionID)->second;
24 return sectorCable[0];
25}

◆ print()

void print ( ) const

Print mapping parameters.

Definition at line 48 of file ARICHHvCrateCableMapping.cc.

49{
50 for (auto const& x : m_connection2cable) {
51 int connectionID = x.first;
52 std::vector<int> cables = x.second;
53 B2INFO("Connection " << connectionID << ": sector " << cables[0] << ", cable " << cables[1]);
54 }
55}

Member Data Documentation

◆ m_connection2cable

std::map<int, std::vector<int> > m_connection2cable
private

map of modules to cables

Definition at line 66 of file ARICHHvCrateCableMapping.h.


The documentation for this class was generated from the following files: