Commit 57bbaec6 authored by Frank Winklmeier's avatar Frank Winklmeier
Browse files

TrigT1ResultByteStream: migrate RecMuCTPI tool to L1Menu

Migrate `RecMuCTPIByteStreamTool` to use new L1Menu.

Relates to ATR-21862.
parent bd920bf1
......@@ -17,7 +17,7 @@ atlas_add_component( TrigT1ResultByteStream
src/*.cxx
src/components/*.cxx
INCLUDE_DIRS ${TDAQ-COMMON_INCLUDE_DIRS}
LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} AthenaBaseComps AthenaKernel ByteStreamCnvSvcBaseLib ByteStreamData GaudiKernel L1TopoRDO StoreGateLib TrigConfInterfaces TrigConfL1Data TrigT1Interfaces TrigT1Result TrigT1ResultByteStreamLib xAODTrigger )
LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} AthenaBaseComps AthenaKernel ByteStreamCnvSvcBaseLib ByteStreamData GaudiKernel L1TopoRDO StoreGateLib TrigConfData TrigT1Interfaces TrigT1Result TrigT1ResultByteStreamLib xAODTrigger )
# Install files from the package:
atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
......@@ -7,11 +7,7 @@
// Trigger include(s):
#include "TrigT1Interfaces/RecMuonRoI.h"
#include "TrigT1Result/MuCTPI_RIO.h"
#include "TrigConfL1Data/TriggerThreshold.h"
#include "TrigConfL1Data/L1DataDef.h"
#include "TrigConfL1Data/CTPConfig.h"
#include "TrigConfL1Data/Menu.h"
#include "TrigConfL1Data/TriggerItem.h"
#include "TrigConfData/L1Menu.h"
// Local include(s):
#include "RecMuCTPIByteStreamTool.h"
......@@ -62,13 +58,6 @@ StatusCode RecMuCTPIByteStreamTool::initialize() {
ATH_MSG_DEBUG("Connected to TGC RecMuonRoISvc");
}
sc = m_configSvc.retrieve();
if ( sc.isFailure() ) {
ATH_MSG_ERROR("Couldn't connect to Lvl1ConfigSvc.");
} else {
ATH_MSG_DEBUG("Connected to Lvl1ConfigSvc");
}
return StatusCode::SUCCESS;
}
......@@ -82,18 +71,10 @@ StatusCode RecMuCTPIByteStreamTool::convert( const ROBF* rob, MuCTPI_RIO*& resul
ATH_MSG_DEBUG("executing convert() from ROBFragment to RIO");
//
// config retrieval via Lvl1ConfigSvc
//
std::vector<TrigConf::TriggerThreshold*> muonConfig;
if ( m_configSvc.isSet() ) {
std::vector<TrigConf::TriggerThreshold*> thresholds = m_configSvc->ctpConfig()->menu().thresholdVector();
for (std::vector<TrigConf::TriggerThreshold*>::const_iterator it = thresholds.begin();
it != thresholds.end(); ++it) {
if ( (*it)->type() == TrigConf::L1DataDef::muonType() ) muonConfig.push_back(*it);
}
}
// L1Menu
const TrigConf::L1Menu * l1menu = nullptr;
ATH_CHECK( detStore()->retrieve(l1menu) );
// Source ID of MIROD
const uint32_t miRodId = m_srcIdMap.getRodID();
......@@ -196,7 +177,7 @@ StatusCode RecMuCTPIByteStreamTool::convert( const ROBF* rob, MuCTPI_RIO*& resul
// reconstruct
LVL1::RecMuonRoI thisRoI( roiWord, m_rpcRoITool.isSet() ? m_rpcRoITool.operator->() : 0,
m_tgcRoITool.isSet() ? m_tgcRoITool.operator->() : 0, &muonConfig );
m_tgcRoITool.isSet() ? m_tgcRoITool.operator->() : 0, l1menu );
uint16_t pTVal = thisRoI.getThresholdValue();
uint16_t pTNumber = thisRoI.getThresholdNumber();
......
......@@ -13,7 +13,6 @@
// Trigger include(s):
#include "TrigT1Interfaces/ITrigT1MuonRecRoiTool.h"
#include "TrigConfInterfaces/ILVL1ConfigSvc.h"
// Local include(s):
#include "MuCTPISrcIdMap.h"
......@@ -63,9 +62,6 @@ private:
ToolHandle<LVL1::ITrigT1MuonRecRoiTool> m_tgcRoITool {
this, "TGCRecRoiSvc", "LVL1::TrigT1TGCRecRoiTool/TrigT1TGCRecRoiTool", "TGC RoI reconstruction tool"
};
ServiceHandle<TrigConf::ILVL1ConfigSvc> m_configSvc {
this, "LVL1ConfigSvc", "TrigConf::LVL1ConfigSvc/LVL1ConfigSvc", "LVL1 Config Service"
};
}; // class RecMuCTPIByteStreamTool
......
......@@ -84,7 +84,6 @@ if rec.doTrigger():
if not hasattr(ToolSvc,'RecMuCTPIByteStreamTool'):
from TrigT1ResultByteStream.TrigT1ResultByteStreamConf import RecMuCTPIByteStreamTool
ToolSvc += RecMuCTPIByteStreamTool("RecMuCTPIByteStreamTool")
ToolSvc.RecMuCTPIByteStreamTool.LVL1ConfigSvc="TrigConf::TrigConfigSvc/TrigConfigSvc"
import TrigT1CaloTools.TrigT1CaloToolsConf as calotools # noqa: F401
for toolName in ['L1JetCMXTools', 'L1EnergyCMXTools', 'L1TriggerTowerTool', 'L1CPMTools',
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment