11#include <top/dbobjects/TOPFrontEndMap.h>
12#include <framework/gearbox/GearDir.h>
13#include <framework/database/DBArray.h>
14#include <framework/database/IntervalOfValidity.h>
17#include <unordered_set>
72 if (moduleID >= 0 and moduleID < c_numModules and bs >= 0 and bs < c_numColumns)
84 std::map<unsigned short, const TOPFrontEndMap*>::const_iterator it =
98 std::map<unsigned int, const TOPFrontEndMap*>::const_iterator it =
133 for (
int bs = 0; bs < c_numColumns; bs++) {
135 if (
map)
return map->getModuleCNumber();
151 enum {c_numModules = 16, c_numColumns = 4};
Class for accessing arrays of objects in the database.
GearDir is the basic class used for accessing the parameter store.
A class that describes the interval of experiments/runs for which an object in the database is valid.
Mapping of a boardstack number within a module to SCROD and COPPER/Finesse.
DBArray< TOPFrontEndMap > m_mappingDB
mappings from database
void initialize()
Initialize from database.
bool m_fromDB
true, if from database
const TOPFrontEndMap * m_fromModule[c_numModules][c_numColumns]
conversion
const TOPFrontEndMap * getMap(int moduleID, int bs) const
Return map from TOP module side.
FrontEndMapper()
constructor
bool isValid() const
check if the mapping is available
bool m_valid
true, if mapping available
int getMapSize() const
Return size of the map.
std::unordered_set< unsigned int > m_copperIDs
COPPER ID's.
const TOPFrontEndMap * getMapFromCopper(unsigned copperID, int finesse) const
Return map from COPPER/Finesse side.
std::map< unsigned int, const TOPFrontEndMap * > m_fromCopper
conversion
const std::unordered_set< unsigned int > & getCopperIDs() const
Return a set of copper ID's.
const TOPFrontEndMap * getMap(unsigned short scrodID) const
Return map from SCROD side.
std::map< unsigned short, const TOPFrontEndMap * > m_fromScrod
conversion
int getModuleCNumber(int moduleID) const
Returns module construction number.
void update()
re-do conversion maps when DBArray has changed
void importPayload(const IntervalOfValidity &iov) const
import mappings to database
void print() const
Print mappings to terminal screen.
std::vector< TOPFrontEndMap > m_mapping
mappings from gearbox
Abstract base class for different kinds of events.