Belle II Software  release-08-01-10
ARICHBiasChannelsMapping Class Reference

The Class for ARICH mapping of bias power supply channels to modules. More...

#include <ARICHBiasChannelsMapping.h>

Inheritance diagram for ARICHBiasChannelsMapping:
Collaboration diagram for ARICHBiasChannelsMapping:

Public Member Functions

 ARICHBiasChannelsMapping ()
 Default constructor.
 
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. More...
 
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. More...
 
int getPinID (std::vector< int > channelID) const
 Get inner cable pin ID from bias power supply channel ID. More...
 
std::string getType (std::vector< int > channel) const
 Get bias/guard type from channel. More...
 
int getInnerID (std::vector< int > channel) const
 Get inner cable pin ID from bias power supply channel ID. More...
 
int getConnectionID (std::vector< int > channel) const
 Get inner cable pin ID from bias power supply channel ID. More...
 
std::tuple< int, int, std::string > getInnerConnection (std::vector< int > channel) const
 Get inner cable ID and type, connected to bias channel. More...
 
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. More...
 
void print () const
 Print properties.
 

Private Member Functions

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

Private Attributes

std::map< std::vector< int >, std::tuple< int, int, int, std::string > > m_channel2type
 power suply channel ID link to inner cable
 

Detailed Description

The Class for ARICH mapping of bias power supply channels to modules.

This class provides ARICH mapping of HAPD modules to bias power supply channels.

Definition at line 26 of file ARICHBiasChannelsMapping.h.

Member Function Documentation

◆ 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.

Parameters
cratecrate ID number
slotslot ID number
channelIDpower supply channel ID number
pinIDpin ID of inner cable
connectionIDconnection number
innerIDID of inner cable
typetype of inner cable

Definition at line 75 of file ARICHBiasChannelsMapping.cc.

77 {
78 
79  if (channelID > 47 || channelID < 0) { B2WARNING("ARICHBiasChannelsMapping::addMapping: Channel ID number " << channelID << " not valid!"); }
80  if (pinID > 46 || pinID < -2 || pinID == 0) { B2WARNING("ARICHBiasChannelsMapping::addMapping: Pin ID number " << pinID << " not valid!"); }
81  if (innerID > 9 || innerID < -2 || innerID == 0) { B2WARNING("ARICHBiasChannelsMapping::addMapping: Inner ID " << innerID << " not valid!"); }
82 
83  auto pinProp = std::make_tuple(pinID, connectionID, innerID, type);
84  std::vector<int> channelMap{crate, slot, channelID};
85  m_channel2type.insert(std::pair<std::vector<int>, std::tuple<int, int, int, std::string>>(channelMap, pinProp));
86 
87 }
std::map< std::vector< int >, std::tuple< int, int, int, std::string > > m_channel2type
power suply channel ID link to inner cable

◆ 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.

Parameters
cratecrate ID number
slotslot ID number
channelIDpower supply channel ID number
innerIDID of inner cable
typetype of inner cable
Returns
channelID power supply channel ID number

Definition at line 51 of file ARICHBiasChannelsMapping.cc.

◆ 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.

Parameters
innerIDID of inner cable
typetype of inner cable
connectionIDconnection number
Returns
channel power supply channel numbers; crate, slot, channelID

Definition at line 62 of file ARICHBiasChannelsMapping.cc.

◆ getConnectionID()

int getConnectionID ( std::vector< int >  channel) const

Get inner cable pin ID from bias power supply channel ID.

Parameters
channelpower supply channel numbers; crate, slot, channelID
Returns
connectionID connection number

Definition at line 26 of file ARICHBiasChannelsMapping.cc.

◆ getInnerConnection()

std::tuple< int, int, std::string > getInnerConnection ( std::vector< int >  channel) const

Get inner cable ID and type, connected to bias channel.

Parameters
channelvector of crate, slot and power supply channel ID number
Returns
innerID inner cable ID and type

Definition at line 43 of file ARICHBiasChannelsMapping.cc.

◆ getInnerID()

int getInnerID ( std::vector< int >  channel) const

Get inner cable pin ID from bias power supply channel ID.

Parameters
channelpower supply channel numbers; crate, slot, channelID
Returns
innerID ID of inner cable

Definition at line 31 of file ARICHBiasChannelsMapping.cc.

◆ getPinID()

int getPinID ( std::vector< int >  channelID) const

Get inner cable pin ID from bias power supply channel ID.

Parameters
channelIDpower supply channel ID number
Returns
pinID pin ID of inner cable

Definition at line 21 of file ARICHBiasChannelsMapping.cc.

◆ getType()

std::string getType ( std::vector< int >  channel) const

Get bias/guard type from channel.

Parameters
channelpower supply channel numbers; crate, slot, channelID
typetype of inner cable

Definition at line 36 of file ARICHBiasChannelsMapping.cc.


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