 |
Belle II Software
release-05-02-19
|
13 #include <top/dbobjects/TOPFrontEndMap.h>
14 #include <framework/gearbox/GearDir.h>
15 #include <framework/database/DBArray.h>
16 #include <framework/database/IntervalOfValidity.h>
19 #include <unordered_set>
33 class FrontEndMapper {
79 if (moduleID >= 0 and moduleID < c_numModules and bs >= 0 and bs < c_numColumns)
91 std::map<unsigned short, const TOPFrontEndMap*>::const_iterator it =
103 const TOPFrontEndMap*
getMapFromCopper(
unsigned copperID,
int finesse)
const
105 std::map<unsigned int, const TOPFrontEndMap*>::const_iterator it =
128 const std::unordered_set<unsigned int>&
getCopperIDs()
const
140 for (
int bs = 0; bs < c_numColumns; bs++) {
141 const auto* map =
getMap(moduleID, bs);
142 if (map)
return map->getModuleCNumber();
158 enum {c_numModules = 16, c_numColumns = 4};
189 std::map<unsigned short, const TOPFrontEndMap*>
m_fromScrod;
Mapping of a boardstack number within a module to SCROD and COPPER/Finesse.
A class that describes the interval of experiments/runs for which an object in the database is valid.
bool m_fromDB
true, if from database
void initialize()
Initialize from database.
std::unordered_set< unsigned int > m_copperIDs
COPPER ID's.
int getMapSize() const
Return size of the map.
const TOPFrontEndMap * getMapFromCopper(unsigned copperID, int finesse) const
Return map from COPPER/Finesse side.
Provides mapping between electronics module position within a TOP module and SCROD ID,...
const TOPFrontEndMap * m_fromModule[c_numModules][c_numColumns]
conversion
Class for accessing arrays of objects in the database.
void update()
re-do conversion maps when DBArray has changed
void print() const
Print mappings to terminal screen.
std::vector< TOPFrontEndMap > m_mapping
mappings from gearbox
const TOPFrontEndMap * getMap(int moduleID, int bs) const
Return map from TOP module side.
~FrontEndMapper()
destructor
const std::unordered_set< unsigned int > & getCopperIDs() const
Return a set of copper ID's.
std::map< unsigned short, const TOPFrontEndMap * > m_fromScrod
conversion
bool isValid() const
check if the mapping is available
Abstract base class for different kinds of events.
std::map< unsigned int, const TOPFrontEndMap * > m_fromCopper
conversion
GearDir is the basic class used for accessing the parameter store.
DBArray< TOPFrontEndMap > * m_mappingDB
mappings from database
FrontEndMapper & operator=(const FrontEndMapper &)
assignment operator
bool m_valid
true, if mapping available
FrontEndMapper()
constructor
int getModuleCNumber(int moduleID) const
Returns module construction number.