![]() |
Belle II Software development
|
Provides mapping between electronics module position within a TOP module and SCROD ID, COPPER and Finesse slot. More...
#include <FrontEndMapper.h>
Public Member Functions | |
| FrontEndMapper () | |
| constructor | |
| void | initialize (const GearDir &frontEndMapping) |
| Initialize from Gearbox (XML) | |
| void | initialize () |
| Initialize from database. | |
| bool | isValid () const |
| check if the mapping is available | |
| void | importPayload (const IntervalOfValidity &iov) const |
| import mappings to database | |
| const TOPFrontEndMap * | getMap (int moduleID, int bs) const |
| Return map from TOP module side. | |
| const TOPFrontEndMap * | getMap (unsigned short scrodID) const |
| Return map from SCROD side. | |
| const TOPFrontEndMap * | getMapFromCopper (unsigned copperID, int finesse) const |
| Return map from COPPER/Finesse side. | |
| int | getMapSize () const |
| Return size of the map. | |
| const std::unordered_set< unsigned int > & | getCopperIDs () const |
| Return a set of copper ID's. | |
| int | getModuleCNumber (int moduleID) const |
| Returns module construction number. | |
| void | print () const |
| Print mappings to terminal screen. | |
Private Types | |
| enum | { c_numModules = 16 , c_numColumns = 4 } |
| Number of TOP modules (number of physical ones can be less), number of electronic modules (SCROD's) per TOP module. More... | |
Private Member Functions | |
| void | clear () |
| Clear. | |
| void | update () |
| re-do conversion maps when DBArray has changed | |
Private Attributes | |
| std::vector< TOPFrontEndMap > | m_mapping |
| mappings from gearbox | |
| DBArray< TOPFrontEndMap > | m_mappingDB |
| mappings from database | |
| bool | m_valid = false |
| true, if mapping available | |
| bool | m_fromDB = false |
| true, if from database | |
| std::unordered_set< unsigned int > | m_copperIDs |
| COPPER ID's. | |
| const TOPFrontEndMap * | m_fromModule [c_numModules][c_numColumns] = {{0}} |
| conversion | |
| std::map< unsigned short, const TOPFrontEndMap * > | m_fromScrod |
| conversion | |
| std::map< unsigned int, const TOPFrontEndMap * > | m_fromCopper |
| conversion | |
Provides mapping between electronics module position within a TOP module and SCROD ID, COPPER and Finesse slot.
Definition at line 31 of file FrontEndMapper.h.
|
private |
Number of TOP modules (number of physical ones can be less), number of electronic modules (SCROD's) per TOP module.
Definition at line 151 of file FrontEndMapper.h.
| FrontEndMapper | ( | ) |
constructor
Definition at line 24 of file FrontEndMapper.cc.
|
private |
Clear.
Definition at line 170 of file FrontEndMapper.cc.
|
inline |
Return a set of copper ID's.
Definition at line 121 of file FrontEndMapper.h.
|
inline |
Return map from TOP module side.
| moduleID | TOP module ID |
| bs | boardstack number |
Definition at line 69 of file FrontEndMapper.h.
|
inline |
Return map from SCROD side.
| scrodID | SCROD ID |
Definition at line 82 of file FrontEndMapper.h.
|
inline |
Return map from COPPER/Finesse side.
| copperID | COPPER ID |
| finesse | Finesse slot number |
Definition at line 96 of file FrontEndMapper.h.
|
inline |
Return size of the map.
Definition at line 108 of file FrontEndMapper.h.
|
inline |
Returns module construction number.
| moduleID | module ID (slot number) |
Definition at line 131 of file FrontEndMapper.h.
| void importPayload | ( | const IntervalOfValidity & | iov | ) | const |
import mappings to database
| iov | Interval of validity. |
Definition at line 160 of file FrontEndMapper.cc.
| void initialize | ( | ) |
Initialize from database.
Definition at line 142 of file FrontEndMapper.cc.
| void initialize | ( | const GearDir & | frontEndMapping | ) |
Initialize from Gearbox (XML)
| frontEndMapping | XML data directory |
Definition at line 34 of file FrontEndMapper.cc.
|
inline |
check if the mapping is available
Definition at line 55 of file FrontEndMapper.h.
| void print | ( | ) | const |
Print mappings to terminal screen.
Definition at line 202 of file FrontEndMapper.cc.
|
private |
re-do conversion maps when DBArray has changed
Definition at line 186 of file FrontEndMapper.cc.
|
private |
COPPER ID's.
Definition at line 168 of file FrontEndMapper.h.
|
private |
conversion
Definition at line 171 of file FrontEndMapper.h.
|
private |
true, if from database
Definition at line 166 of file FrontEndMapper.h.
|
private |
|
private |
conversion
Definition at line 170 of file FrontEndMapper.h.
|
private |
mappings from gearbox
Definition at line 163 of file FrontEndMapper.h.
|
private |
mappings from database
Definition at line 164 of file FrontEndMapper.h.
|
private |
true, if mapping available
Definition at line 165 of file FrontEndMapper.h.