Belle II Software  release-06-00-14
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 44 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 93 of file ECLChannelMap.h.

96  {
97  using namespace ECL;
98  //== Determine correct vector sizes from ECL-related constants
99  const unsigned int mappingBAR_size = ECL_BARREL_CRATES * ECL_BARREL_SHAPERS_IN_CRATE * ECL_CHANNELS_IN_SHAPER;
100  const unsigned int mappingFWD_size = ECL_FWD_CRATES * ECL_FWD_SHAPERS_IN_CRATE * ECL_CHANNELS_IN_SHAPER;
101  const unsigned int mappingBWD_size = ECL_BKW_CRATES * ECL_BKW_SHAPERS_IN_CRATE * ECL_CHANNELS_IN_SHAPER;
102  //== Compare given vector sizes with the correct ones
103  if (mappingBAR.size() != mappingBAR_size ||
104  mappingFWD.size() != mappingFWD_size ||
105  mappingBWD.size() != mappingBWD_size) {
106  B2FATAL("ECLChannelMap: wrong sizes for mapping vectors. Got ("
107  << mappingBAR.size() << ","
108  << mappingFWD.size() << ","
109  << mappingBWD.size() << "), "
110  << "Expected ("
111  << mappingBAR_size << ","
112  << mappingFWD_size << ","
113  << mappingBWD_size << ")");
114  }
115  //==
116  m_MappingBAR = mappingBAR;
117  m_MappingFWD = mappingFWD;
118  m_MappingBWD = mappingBWD;
119  };
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: