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"
24 using AthCondAlgorithm::AthCondAlgorithm;
27 virtual StatusCode
execute(
const EventContext& ctx)
const override;
32 template <
class ContType>
35 std::unique_ptr<ContType>&&
container)
const;
58 "/MUONALIGN/MDT/BARREL",
59 "/MUONALIGN/MDT/ENDCAP/SIDEA",
60 "/MUONALIGN/MDT/ENDCAP/SIDEC",
61 "/MUONALIGN/TGC/SIDEA",
62 "/MUONALIGN/TGC/SIDEC",
64 "Folder names where the alignment paramters are stored"};
68 "Key of output muon alignment ALine condition data"};
70 "Key of output muon alignment BLine condition data"};
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"};
79 "The database folders are given in the new JSON format"};
82 "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.
Gaudi::Property< bool > m_newFormat2020
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 parseDataFromJSON(const nlohmann::json &lines, ALineContainer &writeALineCdo, BLineContainer &writeBLineCdo) const
Parse the JSON blob to fill the A & B Line containers.
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...
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
SG::ReadCondHandleKeyArray< CondAttrListCollection > m_alignKeys
Gaudi::Property< bool > m_loadBLines
virtual StatusCode initialize() override
virtual StatusCode execute(const EventContext &ctx) const override
Gaudi::Property< std::string > m_readFromJSON
Load the alignment parameters from a JSON file.
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
virtual ~AlignmentCondAlg()=default
SG::WriteCondHandleKey< BLineContainer > m_writeBLineKey
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
HandleKeyArray< ReadCondHandle< T >, CondHandleDefault::Key< ReadCondHandleKey< T > >, Gaudi::DataHandle::Reader > ReadCondHandleKeyArray