Belle II Software development
ECLChannelMapper Class Referencefinal

This class provides access to ECL channel map that is either a) Loaded from the database (see ecl/dbobject/include/ECLChannelMap.h). More...

#include <ECLChannelMapper.h>

Public Member Functions

 ECLChannelMapper ()
 Default constructor.
 
 ~ECLChannelMapper ()
 Default destructor.
 
bool initFromFile ()
 Initialize channel mapper using data stored in default location.
 
bool initFromFile (const char *eclMapFile)
 Initialize channel mapper using data stored in the ASCII file.
 
bool initFromDB ()
 Initialize channel mapper from the conditions database.
 
ECLChannelMap getDBObject ()
 Convert internal data to ECLChannelMap database object.
 
int getCellId (int iCrate, int iShaper, int iChannel)
 Get CellId by given crate number, shaper position in the crate and DSP channel number in the shaper.
 
int getCrateID (int cellID)
 Get crate number by given CellId.
 
int getShaperPosition (int cellID)
 Get position of the shaper in the crate by given CellId.
 
int getShaperChannel (int cellID)
 Get number of DSP channel in the shaper by given number of CellId.
 
int getElectronicsID (int cellID)
 Return channel index in ECLChannelMap.
 
 ClassDef (ECLChannelMapper, 1)
 ClassDef.
 

Static Public Member Functions

static ECLChannelMappergetInstance (bool use_db=true)
 Return main instance of ECLChannelMapper.
 
static int getCrateID (int iCOPPERNode, int iFINESSE, bool pcie40=false)
 Get crate number by given COPPER node number and FINESSE number.
 
static int getCOPPERNode (int iCrate)
 Get number of COPPER node by given crate number.
 
static int getFINESSE (int iCrate)
 Get number of FINESSE (0/1) in COPPER by given crate number.
 
static int getSubSystem (int iCrate)
 Get ECL subsystem ID by given crate number: 0 – barrel, 1 – forward. 2 – backward endcap.
 
static int getNShapersInCrate (int iCrate)
 Get number of ShaperDSP modules in the given VME crate number.
 

Private Attributes

bool isInitialized
 initialization flag
 
int convertArrayBarrel [ECL_BARREL_CRATES *ECL_BARREL_SHAPERS_IN_CRATE *ECL_CHANNELS_IN_SHAPER] = {}
 convert (iCrate, iShaper, iChannel) to CellId for Barrel ECL
 
int convertArrayFWD [ECL_FWD_CRATES *ECL_FWD_SHAPERS_IN_CRATE *ECL_CHANNELS_IN_SHAPER] = {}
 convert (iCrate, iShaper, iChannel) to CellId for Forward endcap
 
int convertArrayBKW [ECL_BKW_CRATES *ECL_BKW_SHAPERS_IN_CRATE *ECL_CHANNELS_IN_SHAPER] = {}
 convert (iCrate, iShaper, iChannel) to CellId Backward endcap
 
int convertArrayInv [ECL_TOTAL_CHANNELS][3] = {}
 convert CellId to (iCrate, iShaper, iChannel)
 

Static Private Attributes

static ECLChannelMapperinstance = nullptr
 Main instance of ECLChannelMapper.
 

Detailed Description

This class provides access to ECL channel map that is either a) Loaded from the database (see ecl/dbobject/include/ECLChannelMap.h).

b) (** NOT SUPPORTED **) Loaded from the text file (standard location is FileSystem::findFile("ecl/data/ecl_channels_map.txt"))

Please note that (a) is recommended and (b) should be used only for very specific rare cases (such as prepation of new ECLChannelMap payloads)

Definition at line 29 of file ECLChannelMapper.h.

Constructor & Destructor Documentation

◆ ECLChannelMapper()

Default constructor.

Definition at line 25 of file ECLChannelMapper.cc.

◆ ~ECLChannelMapper()

~ECLChannelMapper ( )
inline

Default destructor.

Definition at line 49 of file ECLChannelMapper.h.

Member Function Documentation

◆ getCellId()

int getCellId ( int iCrate,
int iShaper,
int iChannel )

Get CellId by given crate number, shaper position in the crate and DSP channel number in the shaper.

Definition at line 290 of file ECLChannelMapper.cc.

◆ getCOPPERNode()

int getCOPPERNode ( int iCrate)
static

Get number of COPPER node by given crate number.

Definition at line 379 of file ECLChannelMapper.cc.

◆ getCrateID() [1/2]

int getCrateID ( int cellID)

Get crate number by given CellId.

Definition at line 328 of file ECLChannelMapper.cc.

◆ getCrateID() [2/2]

int getCrateID ( int iCOPPERNode,
int iFINESSE,
bool pcie40 = false )
static

Get crate number by given COPPER node number and FINESSE number.

Parameters
iCOPPERNodeNode ID (26 nodes in COPPER case, 3 nodes in PCIe40 case)
iFINESSEChannel number (0 or 1 in COPPER case, 0-17 in PCIe40 case)
pcie40Set to true if unpacking PCIe40 data

Definition at line 233 of file ECLChannelMapper.cc.

◆ getDBObject()

ECLChannelMap getDBObject ( )

Convert internal data to ECLChannelMap database object.

Definition at line 205 of file ECLChannelMapper.cc.

◆ getElectronicsID()

int getElectronicsID ( int cellID)

Return channel index in ECLChannelMap.

Definition at line 349 of file ECLChannelMapper.cc.

◆ getFINESSE()

int getFINESSE ( int iCrate)
static

Get number of FINESSE (0/1) in COPPER by given crate number.

Definition at line 391 of file ECLChannelMapper.cc.

◆ getInstance()

ECLChannelMapper * getInstance ( bool use_db = true)
static

Return main instance of ECLChannelMapper.

Parameters
use_dbIf true, run initFromDB() at the creation of main instance

Definition at line 49 of file ECLChannelMapper.cc.

◆ getNShapersInCrate()

static int getNShapersInCrate ( int iCrate)
inlinestatic

Get number of ShaperDSP modules in the given VME crate number.

Definition at line 90 of file ECLChannelMapper.h.

◆ getShaperChannel()

int getShaperChannel ( int cellID)

Get number of DSP channel in the shaper by given number of CellId.

Definition at line 342 of file ECLChannelMapper.cc.

◆ getShaperPosition()

int getShaperPosition ( int cellID)

Get position of the shaper in the crate by given CellId.

Definition at line 335 of file ECLChannelMapper.cc.

◆ getSubSystem()

int getSubSystem ( int iCrate)
static

Get ECL subsystem ID by given crate number: 0 – barrel, 1 – forward. 2 – backward endcap.

Definition at line 398 of file ECLChannelMapper.cc.

◆ initFromDB()

bool initFromDB ( )

Initialize channel mapper from the conditions database.

Definition at line 127 of file ECLChannelMapper.cc.

◆ initFromFile() [1/2]

bool initFromFile ( )

Initialize channel mapper using data stored in default location.

Definition at line 42 of file ECLChannelMapper.cc.

◆ initFromFile() [2/2]

bool initFromFile ( const char * eclMapFile)

Initialize channel mapper using data stored in the ASCII file.

Definition at line 59 of file ECLChannelMapper.cc.

Member Data Documentation

◆ convertArrayBarrel

int convertArrayBarrel[ECL_BARREL_CRATES *ECL_BARREL_SHAPERS_IN_CRATE *ECL_CHANNELS_IN_SHAPER] = {}
private

convert (iCrate, iShaper, iChannel) to CellId for Barrel ECL

Definition at line 35 of file ECLChannelMapper.h.

◆ convertArrayBKW

int convertArrayBKW[ECL_BKW_CRATES *ECL_BKW_SHAPERS_IN_CRATE *ECL_CHANNELS_IN_SHAPER] = {}
private

convert (iCrate, iShaper, iChannel) to CellId Backward endcap

Definition at line 39 of file ECLChannelMapper.h.

◆ convertArrayFWD

int convertArrayFWD[ECL_FWD_CRATES *ECL_FWD_SHAPERS_IN_CRATE *ECL_CHANNELS_IN_SHAPER] = {}
private

convert (iCrate, iShaper, iChannel) to CellId for Forward endcap

Definition at line 37 of file ECLChannelMapper.h.

◆ convertArrayInv

int convertArrayInv[ECL_TOTAL_CHANNELS][3] = {}
private

convert CellId to (iCrate, iShaper, iChannel)

Definition at line 41 of file ECLChannelMapper.h.

◆ instance

ECLChannelMapper * instance = nullptr
staticprivate

Main instance of ECLChannelMapper.

Definition at line 43 of file ECLChannelMapper.h.

◆ isInitialized

bool isInitialized
private

initialization flag

Definition at line 32 of file ECLChannelMapper.h.


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