5#ifndef MUONCONDALG_MUONALIGNMENTCONDALG_H
6#define MUONCONDALG_MUONALIGNMENTCONDALG_H
10#include "CoralBase/Blob.h"
15#include "GaudiKernel/ServiceHandle.h"
18#include "nlohmann/json.hpp"
26 virtual StatusCode
execute(
const EventContext& ctx)
const override;
31 template <
class ContType>
34 std::unique_ptr<ContType>&&
container)
const;
57 "/MUONALIGN/MDT/BARREL",
58 "/MUONALIGN/MDT/ENDCAP/SIDEA",
59 "/MUONALIGN/MDT/ENDCAP/SIDEC",
60 "/MUONALIGN/TGC/SIDEA",
61 "/MUONALIGN/TGC/SIDEC",
63 "Folder names where the alignment paramters are stored"};
67 "Key of output muon alignment ALine condition data"};
69 "Key of output muon alignment BLine condition data"};
74 Gaudi::Property<bool>
m_loadALines{
this,
"LoadALines",
true,
"Setup whether Alines shall be written"};
75 Gaudi::Property<bool>
m_loadBLines{
this,
"LoadBLines",
true,
"Setup whether BLines shall be written"};
78 "The database folders are given in the new JSON format"};
81 "Reads the A & B lines parameters from a JSON file instead from COOL"};
Base class for conditions algorithms.
This file defines the class for a collection of AttributeLists where each one is associated with a ch...
std::set< ALinePar, std::less<> > ALineContainer
std::set< BLinePar, std::less<> > BLineContainer
char data[hepevt_bytes_allocation_ATLAS]
Base class for conditions algorithms.
virtual StatusCode execute(const EventContext &ctx) const override
SG::WriteCondHandleKey< BLineContainer > m_writeBLineKey
virtual StatusCode initialize() override
StatusCode loadCoolFolder(const EventContext &ctx, const SG::ReadCondHandleKey< CondAttrListCollection > &key, ALineContainer &writeALineCdo, BLineContainer &writeBLineCdo) const
Retrieves the alignment parameters from a COOL folder.
Gaudi::Property< bool > m_loadALines
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...
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Gaudi::Property< std::string > m_readFromJSON
Load the alignment parameters from a JSON file.
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.
SG::WriteCondHandleKey< ALineContainer > m_writeALineKey
Gaudi::Property< bool > m_newFormat2020
SG::ReadCondHandleKeyArray< CondAttrListCollection > m_alignKeys
virtual ~MuonAlignmentCondAlg()=default
MuonAlignmentCondAlg(const std::string &name, ISvcLocator *pSvcLocator)
StatusCode parseDataFromJSON(const nlohmann::json &lines, ALineContainer &writeALineCdo, BLineContainer &writeBLineCdo) const
Parse the JSON blob to fill the A & B Line containers.
Gaudi::Property< bool > m_loadBLines
HandleKeyArray< ReadCondHandle< T >, CondHandleDefault::Key< ReadCondHandleKey< T > >, Gaudi::DataHandle::Reader > ReadCondHandleKeyArray