ATLAS Offline Software
MMCablingTestAlg.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 #include "MMCablingTestAlg.h"
8 
9 #include <fstream>
10 
11 
12 
14  ATH_CHECK(m_idHelperSvc.retrieve());
17  return StatusCode::SUCCESS;
18 }
19 
21  const EventContext& ctx = Gaudi::Hive::currentContext();
22  std::unique_ptr<std::fstream> f_dump = !m_dumpFile.value().empty() ?
23  std::make_unique<std::fstream>(m_dumpFile, std::fstream::out) : nullptr;
24  ATH_MSG_INFO("Start validation of the MM cabling. Dump complete mapping into "<<m_dumpFile);
25 
26  const MuonGM::MuonDetectorManager* detectorMgr{nullptr};
27  ATH_CHECK(SG::get(detectorMgr, m_DetectorManagerKey, ctx));
28 
29  const Nsw_CablingMap* cabling{nullptr};
31 
32  Identifier chId1 = m_idHelperSvc->mmIdHelper().channelID("MML", 1, 1, 1, 1, 1);
33  cabling->correctChannel(chId1, msgStream());
34 
35  Identifier chId2 = m_idHelperSvc->mmIdHelper().channelID("MMS", -2, 3, 1, 3, 1280);
36  cabling->correctChannel(chId2, msgStream());
37 
38  return StatusCode::SUCCESS;
39 }
40 
MdtMezzanineCard.h
MdtReadoutElement.h
Nsw_CablingMap
Definition: Nsw_CablingMap.h:18
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
ReadCellNoiseFromCool.cabling
cabling
Definition: ReadCellNoiseFromCool.py:154
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:70
MMCablingTestAlg::m_DetectorManagerKey
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_DetectorManagerKey
Definition: MMCablingTestAlg.h:34
MMCablingTestAlg.h
ReadCondHandle.h
MMCablingTestAlg::m_dumpFile
Gaudi::Property< std::string > m_dumpFile
Definition: MMCablingTestAlg.h:39
MMCablingTestAlg::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MMCablingTestAlg.h:32
MMCablingTestAlg::m_cablingKey
SG::ReadCondHandleKey< Nsw_CablingMap > m_cablingKey
Definition: MMCablingTestAlg.h:37
SG::get
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
Definition: ReadCondHandle.h:287
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
MMCablingTestAlg::initialize
virtual StatusCode initialize() override
Definition: MMCablingTestAlg.cxx:13
MuonGM::MuonDetectorManager
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h:51
MMCablingTestAlg::execute
virtual StatusCode execute() override
Definition: MMCablingTestAlg.cxx:20
Identifier
Definition: IdentifierFieldParser.cxx:14