ATLAS Offline Software
Loading...
Searching...
No Matches
MdtAsBuiltCondAlg.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef MUONCONDALG_MDTASBUILTCONDALG_H
6#define MUONCONDALG_MDTASBUILTCONDALG_H
7
10#include "CoralBase/Blob.h"
16#include "nlohmann/json.hpp"
17
19 public:
20 MdtAsBuiltCondAlg(const std::string& name, ISvcLocator* pSvcLocator);
21 virtual ~MdtAsBuiltCondAlg() = default;
22 virtual StatusCode initialize() override;
23 virtual StatusCode execute(const EventContext& ctx) const override;
24
25 private:
26 StatusCode parseDataFromJSON(const nlohmann::json& lines,
27 MdtAsBuiltContainer& asBuilt) const;
28
29 StatusCode legacyFormatToJSON(const std::string& bloblines,
30 nlohmann::json& lines) const;
31
32 StatusCode setFromAscii(const std::string& asciiData,
33 nlohmann::json& newChannel) const;
34
35 SG::ReadCondHandleKey<CondAttrListCollection> m_readKey{this, "ReadKey", "/MUONALIGN/MDT/ASBUILTPARAMS",
36 "Key of MDT/ASBUILTPARAMS input condition data"};
37
38 SG::WriteCondHandleKey<MdtAsBuiltContainer> m_writeKey{this, "WriteKey", "MdtAsBuiltContainer",
39 "Key of output muon alignment MDT/AsBuilt condition data"};
40
41 ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc{this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
42
43 // new folder format 2020
44 Gaudi::Property<bool> m_newFormat2020{this, "NewFormat2020", false,
45 "The database folders are given in the new JSON format"};
46
47 Gaudi::Property<std::string> m_readFromJSON{this,"readFromJSON", "",
48 "Reads the A & B lines parameters from a JSON file instead from COOL"};
49
50
51
52};
53
54#endif
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< MdtAsBuiltPar, std::less<> > MdtAsBuiltContainer
Base class for conditions algorithms.
SG::WriteCondHandleKey< MdtAsBuiltContainer > m_writeKey
StatusCode legacyFormatToJSON(const std::string &bloblines, nlohmann::json &lines) const
virtual ~MdtAsBuiltCondAlg()=default
StatusCode setFromAscii(const std::string &asciiData, nlohmann::json &newChannel) const
Gaudi::Property< std::string > m_readFromJSON
Load the alignment parameters from a JSON file.
MdtAsBuiltCondAlg(const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode initialize() override
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
SG::ReadCondHandleKey< CondAttrListCollection > m_readKey
Gaudi::Property< bool > m_newFormat2020
StatusCode parseDataFromJSON(const nlohmann::json &lines, MdtAsBuiltContainer &asBuilt) const
virtual StatusCode execute(const EventContext &ctx) const override