ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonConditions
MuonCondGeneral
MuonCondAlg
src
AlignmentCondAlg.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef MUONCONDALG_MUONALIGNMENTCONDALG_H
6
#define MUONCONDALG_MUONALIGNMENTCONDALG_H
7
8
#include "
AthenaBaseComps/AthCondAlgorithm.h
"
9
#include "
AthenaPoolUtilities/CondAttrListCollection.h
"
10
#include "CoralBase/Blob.h"
11
#include "
StoreGate/CondHandleKeyArray.h
"
12
#include "
StoreGate/ReadCondHandleKey.h
"
13
// typedefs for A/BLineMapContainer
14
#include "
CoralUtilities/blobaccess.h
"
15
#include "GaudiKernel/ServiceHandle.h"
16
#include "
MuonAlignmentData/CorrContainer.h
"
17
#include "
MuonIdHelpers/IMuonIdHelperSvc.h
"
18
#include "nlohmann/json.hpp"
19
21
namespace
Muon
{
22
class
AlignmentCondAlg
:
public
AthCondAlgorithm
{
23
public
:
24
using
AthCondAlgorithm::AthCondAlgorithm;
25
virtual
~AlignmentCondAlg
() =
default
;
26
virtual
StatusCode
initialize
()
override
;
27
virtual
StatusCode
execute
(
const
EventContext& ctx)
const override
;
28
29
private
:
31
32
template
<
class
ContType>
33
StatusCode
writeContainer
(
const
EventContext& ctx,
34
const
SG::WriteCondHandleKey<ContType>
& writeKey,
35
std::unique_ptr<ContType>&& container)
const
;
36
41
StatusCode
loadDataFromLegacy
(
const
std::string& data, nlohmann::json&
json
,
bool
loadBLines)
const
;
45
StatusCode
parseDataFromJSON
(
const
nlohmann::json& lines,
46
ALineContainer
& writeALineCdo,
47
BLineContainer
& writeBLineCdo)
const
;
51
StatusCode
loadCoolFolder
(
const
EventContext& ctx,
52
const
SG::ReadCondHandleKey<CondAttrListCollection>
& key,
53
ALineContainer
& writeALineCdo,
54
BLineContainer
& writeBLineCdo)
const
;
55
56
// Read Handles
57
SG::ReadCondHandleKeyArray<CondAttrListCollection>
m_alignKeys
{
this
,
"ParlineFolders"
, {
58
"/MUONALIGN/MDT/BARREL"
,
59
"/MUONALIGN/MDT/ENDCAP/SIDEA"
,
60
"/MUONALIGN/MDT/ENDCAP/SIDEC"
,
61
"/MUONALIGN/TGC/SIDEA"
,
62
"/MUONALIGN/TGC/SIDEC"
,
63
},
64
"Folder names where the alignment paramters are stored"
};
65
66
// Write Handles
67
SG::WriteCondHandleKey<ALineContainer>
m_writeALineKey
{
this
,
"WriteALineKey"
,
"ALineContainer"
,
68
"Key of output muon alignment ALine condition data"
};
69
SG::WriteCondHandleKey<BLineContainer>
m_writeBLineKey
{
this
,
"WriteBLineKey"
,
"BLineContainer"
,
70
"Key of output muon alignment BLine condition data"
};
71
72
ServiceHandle<Muon::IMuonIdHelperSvc>
m_idHelperSvc
{
this
,
"MuonIdHelperSvc"
,
"Muon::MuonIdHelperSvc/MuonIdHelperSvc"
};
73
74
75
Gaudi::Property<bool>
m_loadALines
{
this
,
"LoadALines"
,
true
,
"Setup whether Alines shall be written"
};
76
Gaudi::Property<bool>
m_loadBLines
{
this
,
"LoadBLines"
,
true
,
"Setup whether BLines shall be written"
};
77
// new folder format 2020
78
Gaudi::Property<bool>
m_newFormat2020
{
this
,
"NewFormat2020"
,
false
,
79
"The database folders are given in the new JSON format"
};
80
81
Gaudi::Property<std::string>
m_readFromJSON
{
this
,
"readFromJSON"
,
""
,
82
"Reads the A & B lines parameters from a JSON file instead from COOL"
};
83
};
84
}
85
#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...
CondHandleKeyArray.h
CorrContainer.h
ALineContainer
std::set< ALinePar, std::less<> > ALineContainer
Definition
CorrContainer.h:16
BLineContainer
std::set< BLinePar, std::less<> > BLineContainer
Definition
CorrContainer.h:20
json
nlohmann::json json
Definition
HistogramDef.cxx:9
IMuonIdHelperSvc.h
ReadCondHandleKey.h
blobaccess.h
AthCondAlgorithm
Base class for conditions algorithms.
Definition
AthCondAlgorithm.h:22
Muon::AlignmentCondAlg
Definition
AlignmentCondAlg.h:22
Muon::AlignmentCondAlg::m_newFormat2020
Gaudi::Property< bool > m_newFormat2020
Definition
AlignmentCondAlg.h:78
Muon::AlignmentCondAlg::loadCoolFolder
StatusCode loadCoolFolder(const EventContext &ctx, const SG::ReadCondHandleKey< CondAttrListCollection > &key, ALineContainer &writeALineCdo, BLineContainer &writeBLineCdo) const
Retrieves the alignment parameters from a COOL folder.
Definition
AlignmentCondAlg.cxx:108
Muon::AlignmentCondAlg::m_loadALines
Gaudi::Property< bool > m_loadALines
Definition
AlignmentCondAlg.h:75
Muon::AlignmentCondAlg::parseDataFromJSON
StatusCode parseDataFromJSON(const nlohmann::json &lines, ALineContainer &writeALineCdo, BLineContainer &writeBLineCdo) const
Parse the JSON blob to fill the A & B Line containers.
Definition
AlignmentCondAlg.cxx:149
Muon::AlignmentCondAlg::loadDataFromLegacy
StatusCode loadDataFromLegacy(const std::string &data, nlohmann::json &json, bool loadBLines) const
Load the Alignment data from the legacy format where the channels are parsed line wise The data is th...
Definition
AlignmentCondAlg.cxx:246
Muon::AlignmentCondAlg::writeContainer
StatusCode writeContainer(const EventContext &ctx, const SG::WriteCondHandleKey< ContType > &writeKey, std::unique_ptr< ContType > &&container) const
Attaches the dependencies of the Alignment keys onto the A & Bline container.
Definition
AlignmentCondAlg.cxx:86
Muon::AlignmentCondAlg::m_writeALineKey
SG::WriteCondHandleKey< ALineContainer > m_writeALineKey
Definition
AlignmentCondAlg.h:67
Muon::AlignmentCondAlg::m_alignKeys
SG::ReadCondHandleKeyArray< CondAttrListCollection > m_alignKeys
Definition
AlignmentCondAlg.h:57
Muon::AlignmentCondAlg::m_loadBLines
Gaudi::Property< bool > m_loadBLines
Definition
AlignmentCondAlg.h:76
Muon::AlignmentCondAlg::initialize
virtual StatusCode initialize() override
Definition
AlignmentCondAlg.cxx:22
Muon::AlignmentCondAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition
AlignmentCondAlg.cxx:38
Muon::AlignmentCondAlg::m_readFromJSON
Gaudi::Property< std::string > m_readFromJSON
Load the alignment parameters from a JSON file.
Definition
AlignmentCondAlg.h:81
Muon::AlignmentCondAlg::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition
AlignmentCondAlg.h:72
Muon::AlignmentCondAlg::~AlignmentCondAlg
virtual ~AlignmentCondAlg()=default
Muon::AlignmentCondAlg::m_writeBLineKey
SG::WriteCondHandleKey< BLineContainer > m_writeBLineKey
Definition
AlignmentCondAlg.h:69
SG::ReadCondHandleKey
Definition
ReadCondHandleKey.h:21
SG::WriteCondHandleKey
Definition
WriteCondHandleKey.h:22
ServiceHandle
Definition
ClusterMakerTool.h:36
Muon
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Definition
TrackSystemController.h:46
SG::ReadCondHandleKeyArray
HandleKeyArray< ReadCondHandle< T >, CondHandleDefault::Key< ReadCondHandleKey< T > >, Gaudi::DataHandle::Reader > ReadCondHandleKeyArray
Definition
CondHandleKeyArray.h:30
Generated on
for ATLAS Offline Software by
1.17.0