ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonConditions
MuonCondGeneral
MuonCondTest
src
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
"
5
#include "
StoreGate/ReadCondHandle.h
"
6
#include "
MuonReadoutGeometry/MdtReadoutElement.h
"
7
#include "
MuonCablingData/MdtMezzanineCard.h
"
8
9
#include <fstream>
10
11
12
13
StatusCode
MMCablingTestAlg::initialize
(){
14
ATH_CHECK
(
m_idHelperSvc
.retrieve());
15
ATH_CHECK
(
m_DetectorManagerKey
.initialize());
16
ATH_CHECK
(
m_cablingKey
.initialize());
17
return
StatusCode::SUCCESS;
18
}
19
20
StatusCode
MMCablingTestAlg::execute
(
const
EventContext& ctx){
21
std::unique_ptr<std::fstream> f_dump = !
m_dumpFile
.value().empty() ?
22
std::make_unique<std::fstream>(
m_dumpFile
, std::fstream::out) :
nullptr
;
23
ATH_MSG_INFO
(
"Start validation of the MM cabling. Dump complete mapping into "
<<
m_dumpFile
);
24
25
const
MuonGM::MuonDetectorManager
* detectorMgr{
nullptr
};
26
ATH_CHECK
(
SG::get
(detectorMgr,
m_DetectorManagerKey
, ctx));
27
28
const
Nsw_CablingMap
* cabling{
nullptr
};
29
ATH_CHECK
(
SG::get
(cabling,
m_cablingKey
, ctx));
30
31
Identifier
chId1 =
m_idHelperSvc
->mmIdHelper().channelID(
"MML"
, 1, 1, 1, 1, 1);
32
cabling->correctChannel(chId1, msgStream());
33
34
Identifier
chId2 =
m_idHelperSvc
->mmIdHelper().channelID(
"MMS"
, -2, 3, 1, 3, 1280);
35
cabling->correctChannel(chId2, msgStream());
36
37
return
StatusCode::SUCCESS;
38
}
39
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition
AthMsgStreamMacros.h:31
MMCablingTestAlg.h
MdtMezzanineCard.h
MdtReadoutElement.h
ReadCondHandle.h
MMCablingTestAlg::execute
virtual StatusCode execute(const EventContext &ctx) override
Execute method.
Definition
MMCablingTestAlg.cxx:20
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
MMCablingTestAlg::initialize
virtual StatusCode initialize() override
Definition
MMCablingTestAlg.cxx:13
MMCablingTestAlg::m_DetectorManagerKey
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_DetectorManagerKey
Definition
MMCablingTestAlg.h:34
MMCablingTestAlg::m_dumpFile
Gaudi::Property< std::string > m_dumpFile
Definition
MMCablingTestAlg.h:39
MuonGM::MuonDetectorManager
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
Definition
MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h:51
Nsw_CablingMap
Definition
Nsw_CablingMap.h:18
Identifier
Definition
IdentifierFieldParser.cxx:14
SG::get
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
Definition
ReadCondHandle.h:282
Generated on
for ATLAS Offline Software by
1.17.0