9#include <framework/logging/Logger.h>
11#include <arich/dbobjects/ARICHBiasCrateCableMapping.h>
23 if (connectionID < 1) { B2WARNING(
"ARICHBiasCrateCableMapping::getSector: connectionID " << connectionID <<
" not valid!");
return 0;}
25 return sectorCable[0];
30 if (connectionID < 1) { B2WARNING(
"ARICHBiasCrateCableMapping::getCable: connectionID " << connectionID <<
" not valid!");
return 0;}
32 return sectorCable[1];
37 int connectionID = -2;
39 if (i.second == sectorCable) connectionID = i.first;
47 m_connection2cable.insert(std::pair<
int, std::vector<int>>(connectionID, sectorCable));
53 int connectionID = x.first;
54 std::vector<int> cables = x.second;
55 B2INFO(
"Connection " << connectionID <<
": sector " << cables[0] <<
", cable " << cables[1]);
void addMapping(int connectionID, std::vector< int > sectorCable)
Add new entry to the mapping table.
int getCable(int connectionID) const
Get cable ID.
std::map< int, std::vector< int > > m_connection2cable
map of crates to cables
int getSector(int connectionID) const
Get sector ID.
void print() const
Print mapping parameters.
int getConnectionID(const std::vector< int > §orCable) const
Get connection ID.
ARICHBiasCrateCableMapping()
Default constructor.
Abstract base class for different kinds of events.