9#include <framework/logging/Logger.h>
11#include <arich/dbobjects/ARICHHvChannelsMapping.h>
24 vector<int> channel{ -2, -2, -2};
26 if (((i.second)[0] == connectionID) && ((i.second)[1] == pinID)) channel = i.first;
61 if (crate > 6 || crate < 3) { B2WARNING(
"ARICHHvChannelsMapping::addMapping: Crate ID number " << crate <<
" not valid!"); }
62 if (slot > 12 || slot < 0 || slot % 2 != 0) { B2WARNING(
"ARICHHvChannelsMapping::addMapping: Slot ID number " << slot <<
" not valid!"); }
64 std::vector<int> pinProp{connectionID, pinID};
65 std::vector<int> channelMap{crate, slot, channelID};
66 m_channel2type.insert(std::pair<std::vector<int>, std::vector<int>>(channelMap, pinProp));
std::vector< int > getChannelValues(int connectionID, int pinID) const
Get bias power supply channel ID from inner cable type and ID.
std::map< std::vector< int >, std::vector< int > > m_channel2type
power suply channel ID link to inner cable
int getPinID(std::vector< int > channel) const
Get inner cable pin ID from hv power supply channel ID.
int getConnectionID(std::vector< int > channel) const
Get connection ID from hv power supply channel ID.
int getSlot(int connectionID, int pinID) const
Get connection ID from hv power supply channel ID.
ARICHHvChannelsMapping()
Default constructor.
int getCrate(int connectionID, int pinID) const
Get connection ID from hv power supply channel ID.
int getChannel(int connectionID, int pinID) const
Get connection ID from hv power supply channel ID.
void addMapping(int crate, int slot, int channelID, int connectionID, int pinID)
Add new entry to the mapping table.
Abstract base class for different kinds of events.