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

The Class for ARICH mapping of modules to merger boards. More...

#include <ARICHMergerMapping.h>

Inheritance diagram for ARICHMergerMapping:
Collaboration diagram for ARICHMergerMapping:

Public Member Functions

 ARICHMergerMapping ()
 Default constructor.
 
unsigned getModuleID (unsigned mergerID, unsigned febSlot) const
 Get ID of module connected to merger at FEB slot. More...
 
unsigned getMergerID (unsigned moduleID) const
 Get ID of merger to which module is connected. More...
 
unsigned getFEBSlot (unsigned moduleID) const
 Get FEB slot to which module is connected. More...
 
unsigned getMergerIDfromSN (unsigned mergerSN) const
 Get ID of merger from serial number. More...
 
unsigned getMergerSN (unsigned mergerID) const
 Get serial number of marger from its ID. More...
 
void addMapping (unsigned moduleID, unsigned mergerID, unsigned febSlot, unsigned mergerSN)
 Add mapping entry. More...
 
void print () const
 Pring mapping.
 

Private Member Functions

 ClassDef (ARICHMergerMapping, 2)
 ClassDef, must be the last term before the closing {}.
 

Private Attributes

std::vector< uint16_t > m_merger2module
 map of mergers to modules
 
std::vector< uint16_t > m_module2merger
 map of modules to mergers
 
std::vector< bool > m_isMapped
 vector of mapped modules
 
std::map< unsigned, unsigned > m_mergerID
 map mergers ID to SN
 

Detailed Description

The Class for ARICH mapping of modules to merger boards.

This class provides ARICH mapping of HAPD modules to merger boards, and their FEB slots It is assumed merger ID going from 1:73, febSlot goes from 1:6 change to std::map if merger IDs are "non-trivial"

Definition at line 29 of file ARICHMergerMapping.h.

Member Function Documentation

◆ addMapping()

void addMapping ( unsigned  moduleID,
unsigned  mergerID,
unsigned  febSlot,
unsigned  mergerSN 
)

Add mapping entry.

Parameters
moduleIDmodule ID number
mergerIDmerger ID number
mergerSNmerger serial number
febSlotFEB slot

Definition at line 59 of file ARICHMergerMapping.cc.

60 {
61 
62 // if (!(mergerID > 0 && mergerID < N_MERGERS + 1 && febSlot > 0 && febSlot < N_FEB2MERGER + 1 && moduleID < N_MERGERS * N_FEB2MERGER)) { B2ERROR("ARICHMergerMapping::addMapping: invalid mergerID/febSlot/moduleID!"); return;}
63 
64  m_module2merger[moduleID - 1] = (uint16_t)((mergerID - 1) * N_FEB2MERGER + (febSlot - 1));
65  m_merger2module[(mergerID - 1) * N_FEB2MERGER + (febSlot - 1)] = (uint16_t)moduleID;
66  m_isMapped[moduleID - 1] = 1;
67 
68  m_mergerID.insert(std::pair<unsigned, unsigned>(mergerID, mergerSN));
69 }
std::vector< uint16_t > m_module2merger
map of modules to mergers
std::vector< bool > m_isMapped
vector of mapped modules
std::vector< uint16_t > m_merger2module
map of mergers to modules
std::map< unsigned, unsigned > m_mergerID
map mergers ID to SN

◆ getFEBSlot()

unsigned getFEBSlot ( unsigned  moduleID) const

Get FEB slot to which module is connected.

Parameters
moduleIDmodule ID number
Returns
merger FEB slot

Definition at line 38 of file ARICHMergerMapping.cc.

◆ getMergerID()

unsigned getMergerID ( unsigned  moduleID) const

Get ID of merger to which module is connected.

Parameters
moduleIDmodule ID number
Returns
merger ID number

Definition at line 31 of file ARICHMergerMapping.cc.

◆ getMergerIDfromSN()

unsigned getMergerIDfromSN ( unsigned  mergerSN) const

Get ID of merger from serial number.

Parameters
mergerSNmerger serial number
Returns
mergerID merger ID number

Definition at line 51 of file ARICHMergerMapping.cc.

◆ getMergerSN()

unsigned getMergerSN ( unsigned  mergerID) const

Get serial number of marger from its ID.

Parameters
mergerIDmerger ID number
Returns
mergerSN merger serial number

Definition at line 45 of file ARICHMergerMapping.cc.

◆ getModuleID()

unsigned getModuleID ( unsigned  mergerID,
unsigned  febSlot 
) const

Get ID of module connected to merger at FEB slot.

Parameters
mergerIDmerger ID number
febSlotFEB slot
Returns
module ID number

Definition at line 24 of file ARICHMergerMapping.cc.


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