12#include <ecl/dbobjects/ECLChannelMap.h>
35 int convertArrayBarrel[ECL_BARREL_CRATES * ECL_BARREL_SHAPERS_IN_CRATE * ECL_CHANNELS_IN_SHAPER];
37 int convertArrayFWD[ECL_FWD_CRATES * ECL_FWD_SHAPERS_IN_CRATE * ECL_CHANNELS_IN_SHAPER];
39 int convertArrayBKW[ECL_BKW_CRATES * ECL_BKW_SHAPERS_IN_CRATE * ECL_CHANNELS_IN_SHAPER];
70 int getCrateID(
int iCOPPERNode,
int iFINESSE,
bool pcie40 =
false);
72 int getCellId(
int iCrate,
int iShaper,
int iChannel);
92 if (iCrate <= ECL_BARREL_CRATES)
return ECL_BARREL_SHAPERS_IN_CRATE;
93 if (ECL_BARREL_CRATES < iCrate && iCrate <= ECL_BARREL_CRATES + ECL_FWD_CRATES)
return ECL_FWD_SHAPERS_IN_CRATE;
94 if (ECL_BARREL_CRATES + ECL_FWD_CRATES < iCrate && iCrate <= ECL_CRATES)
return ECL_BKW_SHAPERS_IN_CRATE;
DB object to store correspondence table of type (Crate id, ShaperDSP id, Channel id) <-> (ECL CellID)
This class provides access to ECL channel map that is either a) Loaded from the database (see ecl/dbo...
int getSubSystem(int iCrate)
Get ECL subsystem ID by given crate number: 0 – barrel, 1 – forward. 2 – backward endcap.
static ECLChannelMapper * instance
Main instance of ECLChannelMapper.
ClassDef(ECLChannelMapper, 1)
ClassDef.
bool initFromDB()
Initialize channel mapper from the conditions database.
bool isInitialized
initialization flag
ECLChannelMap getDBObject()
Convert internal data to ECLChannelMap database object.
bool initFromFile()
Initialize channel mapper using data stored in default location.
int getElectronicsID(int cellID)
Return channel index in ECLChannelMap.
~ECLChannelMapper()
Default destructor.
int convertArrayFWD[ECL_FWD_CRATES *ECL_FWD_SHAPERS_IN_CRATE *ECL_CHANNELS_IN_SHAPER]
convert (iCrate, iShaper, iChannel) to CellId for Forward endcap
int getFINESSE(int iCrate)
Get number of FINESSE (0/1) in COPPER by given crate number.
ECLChannelMapper()
Default constructor.
int getNShapersInCrate(int iCrate)
Get number of ShaperDSP modules in the given VME crate number.
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 convertArrayBKW[ECL_BKW_CRATES *ECL_BKW_SHAPERS_IN_CRATE *ECL_CHANNELS_IN_SHAPER]
convert (iCrate, iShaper, iChannel) to CellId Backward endcap
int getShaperChannel(int cellID)
Get number of DSP channel in the shaper by given number of CellId.
int getShaperPosition(int cellID)
Get position of the shaper in the crate by given CellId.
int getCOPPERNode(int iCrate)
Get number of COPPER node by given crate number.
static ECLChannelMapper * getInstance(bool use_db=true)
Return main instance of ECLChannelMapper.
int convertArrayInv[ECL_TOTAL_CHANNELS][3]
convert CellId to (iCrate, iShaper, iChannel)
int convertArrayBarrel[ECL_BARREL_CRATES *ECL_BARREL_SHAPERS_IN_CRATE *ECL_CHANNELS_IN_SHAPER]
convert (iCrate, iShaper, iChannel) to CellId for Barrel ECL
int getCrateID(int iCOPPERNode, int iFINESSE, bool pcie40=false)
Get crate number by given COPPER node number and FINESSE number.
Abstract base class for different kinds of events.