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

KLM database importer. More...

#include <KLMElectronicsMapImporter.h>

Collaboration diagram for KLMElectronicsMapImporter:

Public Member Functions

 KLMElectronicsMapImporter ()
 Constructor.
 
 ~KLMElectronicsMapImporter ()
 Destructor.
 
void setIOV (int experimentLow, int runLow, int experimentHigh, int runHigh)
 Set interval of validity.
 
void clearElectronicsMap ()
 Clear electronics map (to be able to import its multiple versions).
 
void loadBKLMElectronicsMap (int version)
 Load BKLM electronics map. More...
 
void loadEKLMElectronicsMap (int version, bool mc)
 Load EKLM electronics map. More...
 
void setLane (int subdetector, int section, int sector, int layer, int lane)
 Set non-default lane for all channels in a module. More...
 
void setLane (int subdetector, int section, int sector, int layer, int plane, int lane)
 Set non-default lane for all channels in a plane. More...
 
void importElectronicsMap ()
 Import electronics map.
 

Private Member Functions

int getEKLMStripFirmwareBySoftware (int stripSoftware) const
 Get EKLM firmware strip number by software strip number. More...
 
void setChannelsEKLMSegment (int section, int sector, int layer, int plane, int segment, int firmwareSegment)
 Set channels for EKLM segment. More...
 
void addEKLMLane (int section, int sector, int layer, int copper, int slot, int lane)
 Add EKLM electronics map lane. More...
 

Private Attributes

const KLMElementNumbersm_ElementNumbers
 Element numbers.
 
std::map< KLMChannelNumber, KLMElectronicsChannelm_ChannelMap
 Data for creation of the electronics map.
 
int m_ExperimentLow = 0
 Low experiment.
 
int m_RunLow = 0
 Low run.
 
int m_ExperimentHigh = -1
 High experiment.
 
int m_RunHigh = -1
 High run.
 

Detailed Description

KLM database importer.

Definition at line 27 of file KLMElectronicsMapImporter.h.

Member Function Documentation

◆ addEKLMLane()

void addEKLMLane ( int  section,
int  sector,
int  layer,
int  copper,
int  slot,
int  lane 
)
private

Add EKLM electronics map lane.

Parameters
[in]sectionSection.
[in]sectorSector.
[in]layerLayer.
[in]copperCopper.
[in]slotSlot.
[in]laneLane.

Definition at line 187 of file KLMElectronicsMapImporter.cc.

189 {
190  for (int plane = 1; plane <= EKLMElementNumbers::getMaximalPlaneNumber(); ++plane) {
191  for (int strip = 1; strip <= EKLMElementNumbers::getMaximalStripNumber(); ++strip) {
192  int axis = plane - 1;
193  int channel = getEKLMStripFirmwareBySoftware(strip);
195  section, sector, layer, plane, strip);
196  m_ChannelMap.insert(
197  std::pair<KLMChannelNumber, KLMElectronicsChannel>(
198  detectorChannel,
199  KLMElectronicsChannel(EKLM_ID + copper, slot, lane, axis, channel)));
200  }
201  }
202 }
static constexpr int getMaximalStripNumber()
Get maximal strip number.
static constexpr int getMaximalPlaneNumber()
Get maximal plane number.
BKLM electronics channel.
const KLMElementNumbers * m_ElementNumbers
Element numbers.
std::map< KLMChannelNumber, KLMElectronicsChannel > m_ChannelMap
Data for creation of the electronics map.
int getEKLMStripFirmwareBySoftware(int stripSoftware) const
Get EKLM firmware strip number by software strip number.
KLMChannelNumber channelNumberEKLM(int section, int sector, int layer, int plane, int strip) const
Get channel number for EKLM.
uint16_t KLMChannelNumber
Channel number.

◆ getEKLMStripFirmwareBySoftware()

int getEKLMStripFirmwareBySoftware ( int  stripSoftware) const
private

Get EKLM firmware strip number by software strip number.

Parameters
[in]stripSoftwareSoftware strip number.

Definition at line 175 of file KLMElectronicsMapImporter.cc.

◆ loadBKLMElectronicsMap()

void loadBKLMElectronicsMap ( int  version)

Load BKLM electronics map.

Parameters
[in]versionmap version: 1) Before experiment 10. 2) Experiment 10 and later (mapping in chimney sector has changed)

Definition at line 47 of file KLMElectronicsMapImporter.cc.

◆ loadEKLMElectronicsMap()

void loadEKLMElectronicsMap ( int  version,
bool  mc 
)

Load EKLM electronics map.

Parameters
[in]versionMap version: 1) Phase 2, experiment 3. Connection of cables was wrong for backward sectors 2 and 3. 2) Phase 3, starting from experiment 4.
[in]mcMC or data (MC does not have occasional cable switches that exist in the data).

Definition at line 222 of file KLMElectronicsMapImporter.cc.

◆ setChannelsEKLMSegment()

void setChannelsEKLMSegment ( int  section,
int  sector,
int  layer,
int  plane,
int  segment,
int  firmwareSegment 
)
private

Set channels for EKLM segment.

Parameters
[in]sectionSection.
[in]sectorSector.
[in]layerLayer.
[in]planePlane.
[in]segmentSegment.
[in]firmwareSegmentSegment number in firmware.

Definition at line 204 of file KLMElectronicsMapImporter.cc.

◆ setLane() [1/2]

void setLane ( int  subdetector,
int  section,
int  sector,
int  layer,
int  lane 
)

Set non-default lane for all channels in a module.

Parameters
[in]subdetectorSubdetector.
[in]sectionSection.
[in]sectorSector.
[in]layerLayer.
[in]laneLane.

Definition at line 391 of file KLMElectronicsMapImporter.cc.

◆ setLane() [2/2]

void setLane ( int  subdetector,
int  section,
int  sector,
int  layer,
int  plane,
int  lane 
)

Set non-default lane for all channels in a plane.

Parameters
[in]subdetectorSubdetector.
[in]sectionSection.
[in]sectorSector.
[in]layerLayer.
[in]planePlane.
[in]laneLane.

Definition at line 410 of file KLMElectronicsMapImporter.cc.


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