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

DB object to store correspondence table of type (Crate id, ShaperDSP id, Channel id) <-> (ECL CellID) More...

#include <ECLChannelMap.h>

Inheritance diagram for ECLChannelMap:
Collaboration diagram for ECLChannelMap:

Public Member Functions

 ECLChannelMap ()
 Constructor.
 
const std::vector< int > & getMappingBAR () const
 Get vector of map entries for ECL barrel.
 
const std::vector< int > & getMappingFWD () const
 Get vector of map entries for ECL forward endcap.
 
const std::vector< int > & getMappingBWD () const
 Get vector of map entries for ECL backward endcap.
 
int get (int crate, int shaper, int channel) const
 Get value for specific (crate, shaper, channel)
 
void setMappingVectors (const std::vector< int > &mappingBAR, const std::vector< int > &mappingFWD, const std::vector< int > &mappingBWD)
 Set three vectors of map entries. More...
 

Private Member Functions

 ClassDef (ECLChannelMap, 1)
 ClassDef.
 

Private Attributes

std::vector< int > m_MappingBAR
 Map entries for ECL barrel.
 
std::vector< int > m_MappingFWD
 Map entries for ECL forward endcap.
 
std::vector< int > m_MappingBWD
 Map entries for ECL backward endcap.
 

Detailed Description

DB object to store correspondence table of type (Crate id, ShaperDSP id, Channel id) <-> (ECL CellID)

Definition at line 51 of file ECLChannelMap.h.

Member Function Documentation

◆ setMappingVectors()

void setMappingVectors ( const std::vector< int > &  mappingBAR,
const std::vector< int > &  mappingFWD,
const std::vector< int > &  mappingBWD 
)
inline

Set three vectors of map entries.

Parameters
mappingBARMap entries for barrel.
mappingFWDMap entries for forward endcap.
mappingBWDMap entries for backward endcap.

Definition at line 100 of file ECLChannelMap.h.

103  {
104  using namespace ECL;
105  //== Determine correct vector sizes from ECL-related constants
106  const unsigned int mappingBAR_size = ECL_BARREL_CRATES * ECL_BARREL_SHAPERS_IN_CRATE * ECL_CHANNELS_IN_SHAPER;
107  const unsigned int mappingFWD_size = ECL_FWD_CRATES * ECL_FWD_SHAPERS_IN_CRATE * ECL_CHANNELS_IN_SHAPER;
108  const unsigned int mappingBWD_size = ECL_BKW_CRATES * ECL_BKW_SHAPERS_IN_CRATE * ECL_CHANNELS_IN_SHAPER;
109  //== Compare given vector sizes with the correct ones
110  if (mappingBAR.size() != mappingBAR_size ||
111  mappingFWD.size() != mappingFWD_size ||
112  mappingBWD.size() != mappingBWD_size) {
113  B2FATAL("ECLChannelMap: wrong sizes for mapping vectors. Got ("
114  << mappingBAR.size() << ","
115  << mappingFWD.size() << ","
116  << mappingBWD.size() << "), "
117  << "Expected ("
118  << mappingBAR_size << ","
119  << mappingFWD_size << ","
120  << mappingBWD_size << ")");
121  }
122  //==
123  m_MappingBAR = mappingBAR;
124  m_MappingFWD = mappingFWD;
125  m_MappingBWD = mappingBWD;
126  };
std::vector< int > m_MappingBWD
Map entries for ECL backward endcap.
std::vector< int > m_MappingFWD
Map entries for ECL forward endcap.
std::vector< int > m_MappingBAR
Map entries for ECL barrel.

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