Belle II Software development
ARICHBiasCrateCableMapping Class Reference

This class provides ARICH bias voltages at gain 40. More...

#include <ARICHBiasCrateCableMapping.h>

Inheritance diagram for ARICHBiasCrateCableMapping:

Public Member Functions

 ARICHBiasCrateCableMapping ()
 Default constructor.
 
int getSector (int connectionID) const
 Get sector ID.
 
int getCable (int connectionID) const
 Get cable ID.
 
int getConnectionID (const std::vector< int > &sectorCable) const
 Get connection 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 (ARICHBiasCrateCableMapping, 1)
 ClassDef, must be the last term before the closing {}.
 

Private Attributes

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

Detailed Description

This class provides ARICH bias voltages at gain 40.

Definition at line 24 of file ARICHBiasCrateCableMapping.h.

Constructor & Destructor Documentation

◆ ARICHBiasCrateCableMapping()

Default constructor.

Definition at line 17 of file ARICHBiasCrateCableMapping.cc.

18{
19}

Member Function Documentation

◆ addMapping()

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

Add new entry to the mapping table.

Parameters
[in]connectionIDConnection ID.
[in]sectorCableSector and cable number.

Definition at line 45 of file ARICHBiasCrateCableMapping.cc.

46{
47 m_connection2cable.insert(std::pair<int, std::vector<int>>(connectionID, sectorCable));
48}
std::map< int, std::vector< int > > m_connection2cable
map of crates to cables

◆ getCable()

int getCable ( int  connectionID) const

Get cable ID.

Parameters
[in]connectionIDConnection ID.
Returns
cable Cable number ID.

Definition at line 28 of file ARICHBiasCrateCableMapping.cc.

29{
30 if (connectionID < 1) { B2WARNING("ARICHBiasCrateCableMapping::getCable: connectionID " << connectionID << " not valid!"); return 0;}
31 std::vector<int> sectorCable = m_connection2cable.find(connectionID)->second;
32 return sectorCable[1];
33}

◆ getConnectionID()

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

Get connection ID.

Parameters
[in]sectorCableVector of sector and cable numbers.
Returns
Connection ID.

Definition at line 35 of file ARICHBiasCrateCableMapping.cc.

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

◆ getSector()

int getSector ( int  connectionID) const

Get sector ID.

Parameters
[in]connectionIDConnection ID.
Returns
Sector number ID.

Definition at line 21 of file ARICHBiasCrateCableMapping.cc.

22{
23 if (connectionID < 1) { B2WARNING("ARICHBiasCrateCableMapping::getSector: connectionID " << connectionID << " not valid!"); return 0;}
24 std::vector<int> sectorCable = m_connection2cable.find(connectionID)->second;
25 return sectorCable[0];
26}

◆ print()

void print ( ) const

Print mapping parameters.

Definition at line 50 of file ARICHBiasCrateCableMapping.cc.

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

Member Data Documentation

◆ m_connection2cable

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

map of crates to cables

Definition at line 68 of file ARICHBiasCrateCableMapping.h.


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