ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonCablings
MuonMDT_Cabling
src
MuonMDT_CablingAlg.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3
*/
4
8
9
#ifndef MUONMDT_CABLING_MUONMDT_CABLINGALG_H
10
#define MUONMDT_CABLING_MUONMDT_CABLINGALG_H
11
12
#include "
AthenaBaseComps/AthCondAlgorithm.h
"
13
#include "
AthenaKernel/IIOVDbSvc.h
"
14
#include "
AthenaPoolUtilities/CondAttrListCollection.h
"
15
#include "
MuonCablingData/MuonMDT_CablingMap.h
"
16
#include "
MuonIdHelpers/IMuonIdHelperSvc.h
"
17
#include "
StoreGate/ReadCondHandleKey.h
"
18
#include "
StoreGate/WriteCondHandleKey.h
"
19
#include "nlohmann/json.hpp"
20
21
22
class
MuonMDT_CablingAlg
:
public
AthCondAlgorithm
{
23
public
:
24
MuonMDT_CablingAlg
(
const
std::string& name, ISvcLocator* pSvcLocator);
25
virtual
~MuonMDT_CablingAlg
() =
default
;
26
virtual
StatusCode
initialize
()
override
;
27
virtual
StatusCode
execute
(
const
EventContext& ctx)
const override
;
28
29
30
using
CablingData
=
MuonMDT_CablingMap::CablingData
;
31
32
private
:
33
ServiceHandle<Muon::IMuonIdHelperSvc>
m_idHelperSvc
{
this
,
"MuonIdHelperSvc"
,
"Muon::MuonIdHelperSvc/MuonIdHelperSvc"
};
34
SG::ReadCondHandleKey<CondAttrListCollection>
m_readKeyMez
{
this
,
"MezzanineFolders"
,
"/MDT/CABLING/MEZZANINE_SCHEMA"
};
35
SG::ReadCondHandleKey<CondAttrListCollection>
m_readKeyMap
{
this
,
"MapFolders"
,
"/MDT/CABLING/MAP_SCHEMA"
};
36
SG::WriteCondHandleKey<MuonMDT_CablingMap>
m_writeKey
{
this
,
"WriteKey"
,
"MuonMDT_CablingMap"
,
"Key of output MDT cabling map"
};
37
38
Gaudi::Property<bool>
m_isRun3
{
this
,
"isRun3"
,
false
,
"Auxillary property to load the BIS78 cabling by hand"
};
39
StatusCode
dbPayloadToJson
(
SG::ReadCondHandle<CondAttrListCollection>
& readHandle, nlohmann::json&
json
)
const
;
41
bool
extractStationInfo
(
const
coral::AttributeList& atr,
CablingData
& map_data)
const
;
43
bool
extractLayerInfo
(std::vector<std::string>&,
CablingData
& map_data)
const
;
44
46
StatusCode
loadMezzanineSchema
(
const
EventContext& ctx,
SG::WriteCondHandle<MuonMDT_CablingMap>
& writeHandle,
47
MuonMDT_CablingMap
& cabling_map)
const
;
48
49
StatusCode
loadMezzanineFromJSON
(nlohmann::json&& payload,
MuonMDT_CablingMap
& cabling_map)
const
;
50
52
53
StatusCode
loadCablingSchema
(
const
EventContext& ctx,
SG::WriteCondHandle<MuonMDT_CablingMap>
& writeHandle,
54
MuonMDT_CablingMap
& cabling_map)
const
;
55
56
StatusCode
loadCablingSchemaFromJSON
(nlohmann::json&& payload,
MuonMDT_CablingMap
& cabling_map)
const
;
57
58
Gaudi::Property<std::string>
m_mezzJSON
{
this
,
"MezzanineJSON"
,
""
,
59
"External JSON file to read the mezzanine mapping from"
};
60
61
Gaudi::Property<std::string>
m_chambJSON
{
this
,
"CablingJSON"
,
""
,
62
"External JSON file to read the MDT cabling from"
};
63
64
Gaudi::Property<bool>
m_useJSONFormat
{
this
,
"UseJSONFormat"
,
false
,
65
"Read out the cabling database JSON based"
};
66
67
};
68
69
#endif
AthCondAlgorithm.h
Base class for conditions algorithms.
CondAttrListCollection.h
This file defines the class for a collection of AttributeLists where each one is associated with a ch...
json
nlohmann::json json
Definition
HistogramDef.cxx:9
IIOVDbSvc.h
Abstract interface to IOVDbSvc to access IOVRange and tag information.
IMuonIdHelperSvc.h
MuonMDT_CablingMap.h
ReadCondHandleKey.h
WriteCondHandleKey.h
AthCondAlgorithm
Base class for conditions algorithms.
Definition
AthCondAlgorithm.h:22
MuonMDT_CablingAlg::m_useJSONFormat
Gaudi::Property< bool > m_useJSONFormat
Definition
MuonMDT_CablingAlg.h:64
MuonMDT_CablingAlg::loadCablingSchema
StatusCode loadCablingSchema(const EventContext &ctx, SG::WriteCondHandle< MuonMDT_CablingMap > &writeHandle, MuonMDT_CablingMap &cabling_map) const
Load the cabling schema of the tubes.
Definition
MuonMDT_CablingAlg.cxx:82
MuonMDT_CablingAlg::dbPayloadToJson
StatusCode dbPayloadToJson(SG::ReadCondHandle< CondAttrListCollection > &readHandle, nlohmann::json &json) const
Definition
MuonMDT_CablingAlg.cxx:62
MuonMDT_CablingAlg::~MuonMDT_CablingAlg
virtual ~MuonMDT_CablingAlg()=default
MuonMDT_CablingAlg::loadCablingSchemaFromJSON
StatusCode loadCablingSchemaFromJSON(nlohmann::json &&payload, MuonMDT_CablingMap &cabling_map) const
Definition
MuonMDT_CablingAlg.cxx:357
MuonMDT_CablingAlg::m_writeKey
SG::WriteCondHandleKey< MuonMDT_CablingMap > m_writeKey
Definition
MuonMDT_CablingAlg.h:36
MuonMDT_CablingAlg::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition
MuonMDT_CablingAlg.h:33
MuonMDT_CablingAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition
MuonMDT_CablingAlg.cxx:39
MuonMDT_CablingAlg::loadMezzanineSchema
StatusCode loadMezzanineSchema(const EventContext &ctx, SG::WriteCondHandle< MuonMDT_CablingMap > &writeHandle, MuonMDT_CablingMap &cabling_map) const
Load the mezzanine schema into the cabling.
Definition
MuonMDT_CablingAlg.cxx:293
MuonMDT_CablingAlg::m_isRun3
Gaudi::Property< bool > m_isRun3
Definition
MuonMDT_CablingAlg.h:38
MuonMDT_CablingAlg::extractStationInfo
bool extractStationInfo(const coral::AttributeList &atr, CablingData &map_data) const
Retrieves the general MDT station info from the coral attribute.
Definition
MuonMDT_CablingAlg.cxx:208
MuonMDT_CablingAlg::MuonMDT_CablingAlg
MuonMDT_CablingAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition
MuonMDT_CablingAlg.cxx:25
MuonMDT_CablingAlg::m_readKeyMap
SG::ReadCondHandleKey< CondAttrListCollection > m_readKeyMap
Definition
MuonMDT_CablingAlg.h:35
MuonMDT_CablingAlg::m_chambJSON
Gaudi::Property< std::string > m_chambJSON
Definition
MuonMDT_CablingAlg.h:61
MuonMDT_CablingAlg::loadMezzanineFromJSON
StatusCode loadMezzanineFromJSON(nlohmann::json &&payload, MuonMDT_CablingMap &cabling_map) const
Definition
MuonMDT_CablingAlg.cxx:345
MuonMDT_CablingAlg::extractLayerInfo
bool extractLayerInfo(std::vector< std::string > &, CablingData &map_data) const
Retrieves the channel info from the coral attribute.
Definition
MuonMDT_CablingAlg.cxx:260
MuonMDT_CablingAlg::m_readKeyMez
SG::ReadCondHandleKey< CondAttrListCollection > m_readKeyMez
Definition
MuonMDT_CablingAlg.h:34
MuonMDT_CablingAlg::CablingData
MuonMDT_CablingMap::CablingData CablingData
Definition
MuonMDT_CablingAlg.h:30
MuonMDT_CablingAlg::m_mezzJSON
Gaudi::Property< std::string > m_mezzJSON
Definition
MuonMDT_CablingAlg.h:58
MuonMDT_CablingAlg::initialize
virtual StatusCode initialize() override
Definition
MuonMDT_CablingAlg.cxx:28
MuonMDT_CablingMap
Definition
MuonMDT_CablingMap.h:28
MuonMDT_CablingMap::CablingData
MdtCablingData CablingData
Definition
MuonMDT_CablingMap.h:79
SG::ReadCondHandleKey
Definition
ReadCondHandleKey.h:21
SG::ReadCondHandle
Definition
ReadCondHandle.h:40
SG::WriteCondHandleKey
Definition
WriteCondHandleKey.h:22
SG::WriteCondHandle
Definition
WriteCondHandle.h:26
ServiceHandle
Definition
ClusterMakerTool.h:36
Generated on
for ATLAS Offline Software by
1.17.0