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

The Class for ARICH mapping of bias cables to modules. More...

#include <ARICHHvCablesMapping.h>

Inheritance diagram for ARICHHvCablesMapping:
Collaboration diagram for ARICHHvCablesMapping:

Public Member Functions

 ARICHHvCablesMapping ()
 Default constructor.
 
int getModuleID (int sectorID, int cableID, int innerID) const
 Get ID of module connected to cable in sector. More...
 
int getSectorID (int moduleID) const
 Get ID of sector of a cable to which module is connected. More...
 
int getCableID (int moduleID) const
 Get ID of cable to which module is connected. More...
 
int getInnerID (int moduleID) const
 Get inner cable ID to which module is connected. More...
 
void addMapping (int moduleID, int sectorID, int cableID, int innerID)
 Add mapping entry. More...
 
void print () const
 Pring mapping.
 

Private Member Functions

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

Private Attributes

std::vector< std::tuple< int, int, int > > m_cable2module
 map of cables to modules
 
std::map< int, std::vector< int > > m_module2cable
 map of modules to cables
 

Detailed Description

The Class for ARICH mapping of bias cables to modules.

This class provides ARICH mapping of HAPD modules to bias cables. It is assumed sectorID going from 1:6, cableID goes from 1:8 and innerID goes from 1:9.

Definition at line 28 of file ARICHHvCablesMapping.h.

Member Function Documentation

◆ addMapping()

void addMapping ( int  moduleID,
int  sectorID,
int  cableID,
int  innerID 
)

Add mapping entry.

Parameters
moduleIDmodule ID number
sectorIDsector ID
cableIDbias cable number
innerIDinner cable number

Definition at line 56 of file ARICHHvCablesMapping.cc.

57 {
58 
59  if (moduleID > 420 || moduleID < 1) { B2WARNING("ARICHHvCablesMapping::addMapping: Module number " << moduleID << " not valid!"); }
60  if (sectorID > 6 || sectorID < 1) { B2WARNING("ARICHHvCablesMapping::addMapping: Sector number " << sectorID << " not valid!"); }
61  if (cableID > 8 || cableID < 1) { B2WARNING("ARICHHvCablesMapping::addMapping: Cable number " << cableID << " not valid!"); }
62  if (innerID > 20 || innerID < 2) { B2WARNING("ARICHHvCablesMapping::addMapping: Inner cable number " << innerID << " not valid!"); }
63 
64  std::vector<int> cableMap{sectorID, cableID, innerID};
65  m_module2cable.insert(std::pair<int, std::vector<int>>(moduleID, cableMap));
66 
67 }
std::map< int, std::vector< int > > m_module2cable
map of modules to cables

◆ getCableID()

int getCableID ( int  moduleID) const

Get ID of cable to which module is connected.

Parameters
moduleIDmodule ID number
Returns
cableID cable ID number

Definition at line 42 of file ARICHHvCablesMapping.cc.

◆ getInnerID()

int getInnerID ( int  moduleID) const

Get inner cable ID to which module is connected.

Parameters
moduleIDmodule ID number
Returns
innerID inner ID number

Definition at line 49 of file ARICHHvCablesMapping.cc.

◆ getModuleID()

int getModuleID ( int  sectorID,
int  cableID,
int  innerID 
) const

Get ID of module connected to cable in sector.

Parameters
sectorIDsector ID
cableIDbias cable number
innerIDinner cable number
Returns
moduleID module ID number

Definition at line 21 of file ARICHHvCablesMapping.cc.

◆ getSectorID()

int getSectorID ( int  moduleID) const

Get ID of sector of a cable to which module is connected.

Parameters
moduleIDmodule ID number
Returns
sectorID sector ID number

Definition at line 35 of file ARICHHvCablesMapping.cc.


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