 |
Belle II Software
release-05-01-25
|
13 #include <top/dbobjects/TOPChannelMap.h>
14 #include <framework/gearbox/GearDir.h>
15 #include <framework/database/DBArray.h>
16 #include <framework/database/IntervalOfValidity.h>
109 unsigned pix = pixel - 1;
156 unsigned& boardstack,
159 unsigned& chan)
const;
A class that describes the interval of experiments/runs for which an object in the database is valid.
const TOPChannelMap * m_channels[c_numRows][c_numColumns]
conversion array
Provides mapping between electronic channels and pixels.
int getPixelID(unsigned channel) const
Converts hardware channel number to pixel ID (1-based)
EType
Enum for electornic types.
@ c_numColumns
number of pixel columns per carrier board
ChannelMapper & operator=(const ChannelMapper &)
Assignment operator.
std::string m_typeName
electronic type name
Class for accessing arrays of objects in the database.
bool isValid() const
Checks if mapping is available.
@ c_numBoardstacks
number of boardstacks per TOP module
@ c_numPixelColumns
per module
@ c_numRows
number of pixel rows per carrier board
void splitChannelNumber(unsigned channel, unsigned &boardstack, unsigned &carrier, unsigned &asic, unsigned &chan) const
Splits hardware channel number into boardstack, carrier, asic and asic channel.
bool m_fromDB
true, if from database
void initialize()
Initialize from database.
bool isPixelIDValid(int pixel) const
Checks validity of pixel ID.
@ c_numAsics
number of ASIC's per carrier board
void test() const
test that the conversion and inverse of it gives identity, if not B2ERROR
unsigned getChannel(int pixel) const
Converts pixel to hardware channel number (0-based)
bool isChannelValid(unsigned channel) const
Checks validity of hardware channel number.
@ c_numPixelRows
per module
std::string getName() const
Return electornic name.
Abstract base class for different kinds of events.
GearDir is the basic class used for accessing the parameter store.
Map of pixels and channels within the carrier board.
bool m_valid
true if mapping available
@ c_numCarrierBoards
number of carrier boards per boardstack
DBArray< TOPChannelMap > * m_mappingDB
mappings from database
@ c_invalidPixelID
value of invalid pixel ID
EType m_type
electornic type
@ c_numChannels
number of channels per ASIC
~ChannelMapper()
destructor
const TOPChannelMap * m_pixels[c_numAsics][c_numChannels]
conversion array
EType getType() const
Return electornic type (see enum)
std::vector< TOPChannelMap > m_mapping
mappings from gearbox
void print() const
Print mappings to terminal screen.
@ c_invalidChannel
value of invalid channel number
int getPmtID(int pixel) const
Returns PMT ID (1-based)
void update()
re-do conversion arrays when DBArray has changed
ChannelMapper()
constructor