31 if (boardNum >= tray.
cards.size() || !tray.
cards[boardNum]) {
46 <<
", slot: "<<
static_cast<int>(slot));
51 const int nTubLayers =
m_idHelperSvc->mdtIdHelper().tubeLayerMax(detElId);
53 if (nTubLayers != board->numTubeLayers()) {
54 ATH_MSG_FATAL(
"The new hedgehog board "<<(*board)<<
" does not match in terms of tube layers"
56 return StatusCode::FAILURE;
58 }
else if (tray.
nTubesPerLay != board->numTubesPerLayer()){
60 <<
"Number of tubes per layer does not match. "<<
static_cast<int>(tray.
nTubesPerLay)<<
" vs. "
61 <<
static_cast<int>(board->numTubesPerLayer()));
62 return StatusCode::FAILURE;
66 if (board.use_count() < 3) {
67 for (uint8_t lay = 1 ; lay<= board->numTubeLayers(); ++lay) {
68 for (uint8_t tube = 1; tube<=board->numTubesPerLayer(); ++tube) {
72 const TubeLayer out = board->twinPair(in);
73 const TubeLayer twinTwin = board->twinPair(out);
75 ATH_MSG_FATAL(
"Back & forth mapping of "<<std::endl<<(*board)<<std::endl
76 <<
" failed. Started with "<<in<<
" via "<<out<<
" & ended in "<<twinTwin);
77 return StatusCode::FAILURE;
82 if (tray.
cards.size() <= slot) {
83 tray.
cards.resize(slot +1);
85 tray.
cards[slot] = board;
86 return StatusCode::SUCCESS;
95 const uint8_t tube = idHelper.
tube(channelId);
97 if (boardNum < tray.
cards.size() && tray.
cards[boardNum] && tray.
cards[boardNum]->hasHVDelayTime()) {
99 return tray.
cards[boardNum]->hvDelayTime();
105 ATH_MSG_DEBUG(
"Set the default HV delay to "<<hvDelay<<
" ns.");
#define ATH_MSG_VERBOSE(x)
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
This is a "hash" representation of an Identifier.
int multilayer(const Identifier &id) const
Access to components of the ID.
int tube(const Identifier &id) const
int tubeLayer(const Identifier &id) const
Identifier channelID(int stationName, int stationEta, int stationPhi, int multilayer, int tubeLayer, int tube) const
Interface for Helper service that creates muon Identifiers and can be used to print Identifiers.
const IMuonIdHelperSvc * m_idHelperSvc
double hvDelayTime(const Identifier &channelId) const
Returns the HV time delay for a given twin tube pair.
bool isTwinTubeLayer(const Identifier &channelId) const
Returns whether the multilayer is equipped with twin-tubes or not.
Identifier twinId(const Identifier &channelId) const
Returns the Identifier of the mapped twin tube.
StatusCode addHedgeHogBoard(const Identifier &detElId, const HedgehogBoardPtr &board, const uint16_t slot)
Add a new hedgehog board with twin tube mapping.
HedgehogBoard::HedgehogBoardPtr HedgehogBoardPtr
void setDefaultHVDelay(const double hvDelay)
Sets the default HV delay.
TwinTubeMap(const IMuonIdHelperSvc *idHelperSvc)
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
HedgehogBoard::TubeLayer TubeLayer
Helper struct to return a tube & tube layer pair.
uint8_t tube
Tube number [1- 24/numTubeLayers()].
uint8_t layer
Layer number [1- numTubeLayers()].
std::vector< HedgehogBoardPtr > cards