 |
Belle II Software
release-05-02-19
|
10 #ifndef ECLCHANNELMAPPER_H
11 #define ECLCHANNELMAPPER_H
12 #include <ecl/dbobjects/ECLChannelMap.h>
28 class ECLChannelMapper {
34 int convertArrayBarrel[ECL_BARREL_CRATES * ECL_BARREL_SHAPERS_IN_CRATE * ECL_CHANNELS_IN_SHAPER];
36 int convertArrayFWD[ECL_FWD_CRATES * ECL_FWD_SHAPERS_IN_CRATE * ECL_CHANNELS_IN_SHAPER];
38 int convertArrayBKW[ECL_BKW_CRATES * ECL_BKW_SHAPERS_IN_CRATE * ECL_CHANNELS_IN_SHAPER];
59 int getCellId(
int iCrate,
int iShaper,
int iChannel);
77 if (iCrate <= ECL_BARREL_CRATES)
return ECL_BARREL_SHAPERS_IN_CRATE;
78 if (ECL_BARREL_CRATES < iCrate && iCrate <= ECL_BARREL_CRATES + ECL_FWD_CRATES)
return ECL_FWD_SHAPERS_IN_CRATE;
79 if (ECL_BARREL_CRATES + ECL_FWD_CRATES < iCrate && iCrate <= ECL_CRATES)
return ECL_BKW_SHAPERS_IN_CRATE;
~ECLChannelMapper()
Default destructor.
int getCrateID(int iCOPPERNode, int iFINESSE)
get crate number by given COPPER node number and FINESSE number
int getShaperPosition(int cellID)
get position of the shaper in the crate by given CellId
int getSubSystem(int iCrate)
get ECL subsystem ID by given crate number: 0 – barrel, 1 – forward. 2 – backward endcap
int getShaperChannel(int cellID)
get number of DSP channel in the shaper by given number of CellId
DB object to store correspondence table of type (Crate id, ShaperDSP id, Channel id) <-> (ECL CellID)
bool initFromFile()
Initialize channel mapper using data stored in default location.
int convertArrayInv[ECL_TOTAL_CHANNELS][3]
convert CellId to (iCrate, iShaper, iChannel)
int getFINESSE(int iCrate)
get number of FINESSE (0/1) in COPPER by given crate number
Abstract base class for different kinds of events.
bool isInitialized
initialization flag
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 convertArrayBarrel[ECL_BARREL_CRATES *ECL_BARREL_SHAPERS_IN_CRATE *ECL_CHANNELS_IN_SHAPER]
convert (iCrate, iShaper, iChannel) to CellId for Barrel ECL
int convertArrayBKW[ECL_BKW_CRATES *ECL_BKW_SHAPERS_IN_CRATE *ECL_CHANNELS_IN_SHAPER]
convert (iCrate, iShaper, iChannel) to CellId Backward endcap
bool initFromDB()
Initialize channel mapper from the conditions database.
int getCOPPERNode(int iCrate)
get number of COPPER node by given crate number
int getNShapersInCrate(int iCrate)
get number of ShaperDSP modules in the given VME crate number
ECLChannelMap getDBObject()
Convert internal data to ECLChannelMap database object.
ECLChannelMapper()
Default constructor.
int convertArrayFWD[ECL_FWD_CRATES *ECL_FWD_SHAPERS_IN_CRATE *ECL_CHANNELS_IN_SHAPER]
convert (iCrate, iShaper, iChannel) to CellId for Forward endcap