Belle II Software  release-05-02-19
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< uint16_t, 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 37 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 189 of file KLMElectronicsMapImporter.cc.

191 {
192  for (int plane = 1; plane <= EKLMElementNumbers::getMaximalPlaneNumber(); ++plane) {
193  for (int strip = 1; strip <= EKLMElementNumbers::getMaximalStripNumber(); ++strip) {
194  int axis = plane - 1;
195  int channel = getEKLMStripFirmwareBySoftware(strip);
196  uint16_t detectorChannel = m_ElementNumbers->channelNumberEKLM(
197  section, sector, layer, plane, strip);
198  m_ChannelMap.insert(
199  std::pair<uint16_t, KLMElectronicsChannel>(
200  detectorChannel,
201  KLMElectronicsChannel(EKLM_ID + copper, slot, lane, axis, channel)));
202  }
203  }
204 }

◆ getEKLMStripFirmwareBySoftware()

int getEKLMStripFirmwareBySoftware ( int  stripSoftware) const
private

Get EKLM firmware strip number by software strip number.

Parameters
[in]stripSoftwareSoftware strip number.

Definition at line 177 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 49 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 224 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 206 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 393 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 412 of file KLMElectronicsMapImporter.cc.


The documentation for this class was generated from the following files:
Belle2::KLMElectronicsMapImporter::getEKLMStripFirmwareBySoftware
int getEKLMStripFirmwareBySoftware(int stripSoftware) const
Get EKLM firmware strip number by software strip number.
Definition: KLMElectronicsMapImporter.cc:177
Belle2::KLMElectronicsMapImporter::m_ElementNumbers
const KLMElementNumbers * m_ElementNumbers
Element numbers.
Definition: KLMElectronicsMapImporter.h:148
Belle2::KLMElectronicsMapImporter::m_ChannelMap
std::map< uint16_t, KLMElectronicsChannel > m_ChannelMap
Data for creation of the electronics map.
Definition: KLMElectronicsMapImporter.h:151
Belle2::EKLMElementNumbers::getMaximalStripNumber
static constexpr int getMaximalStripNumber()
Get maximal strip number.
Definition: EKLMElementNumbers.h:329
Belle2::EKLMElementNumbers::getMaximalPlaneNumber
static constexpr int getMaximalPlaneNumber()
Get maximal plane number.
Definition: EKLMElementNumbers.h:313
Belle2::KLMElementNumbers::channelNumberEKLM
uint16_t channelNumberEKLM(int section, int sector, int layer, int plane, int strip) const
Get channel number for EKLM.
Definition: KLMElementNumbers.cc:64
Belle2::KLMElectronicsChannel
BKLM electronics channel.
Definition: KLMElectronicsChannel.h:33