ATLAS Offline Software
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  virtual bool isReEntrant() const override { return false;}
25 
26  private:
28  MdtAsBuiltContainer& asBuilt) const;
29 
30  StatusCode legacyFormatToJSON(const std::string& bloblines,
31  nlohmann::json& lines) const;
32 
33  StatusCode setFromAscii(const std::string& asciiData,
34  nlohmann::json& newChannel) const;
35 
36  SG::ReadCondHandleKey<CondAttrListCollection> m_readKey{this, "ReadKey", "/MUONALIGN/MDT/ASBUILTPARAMS",
37  "Key of MDT/ASBUILTPARAMS input condition data"};
38 
39  SG::WriteCondHandleKey<MdtAsBuiltContainer> m_writeKey{this, "WriteKey", "MdtAsBuiltContainer",
40  "Key of output muon alignment MDT/AsBuilt condition data"};
41 
42  ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc{this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
43 
44  // new folder format 2020
45  Gaudi::Property<bool> m_newFormat2020{this, "NewFormat2020", false,
46  "The database folders are given in the new JSON format"};
48  Gaudi::Property<std::string> m_readFromJSON{this,"readFromJSON", "",
49  "Reads the A & B lines parameters from a JSON file instead from COOL"};
50 
51 
52 
53 };
54 
55 #endif
MdtAsBuiltCondAlg::m_writeKey
SG::WriteCondHandleKey< MdtAsBuiltContainer > m_writeKey
Definition: MdtAsBuiltCondAlg.h:39
MdtAsBuiltCondAlg::isReEntrant
virtual bool isReEntrant() const override
Definition: MdtAsBuiltCondAlg.h:24
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
MdtAsBuiltCondAlg::m_newFormat2020
Gaudi::Property< bool > m_newFormat2020
Definition: MdtAsBuiltCondAlg.h:45
MdtAsBuiltCondAlg::~MdtAsBuiltCondAlg
virtual ~MdtAsBuiltCondAlg()=default
MdtAsBuiltCondAlg::MdtAsBuiltCondAlg
MdtAsBuiltCondAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: MdtAsBuiltCondAlg.cxx:13
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
MdtAsBuiltCondAlg::initialize
virtual StatusCode initialize() override
Definition: MdtAsBuiltCondAlg.cxx:16
CorrContainer.h
CaloCondBlobAlgs_fillNoiseFromASCII.lines
lines
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:104
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
MdtAsBuiltCondAlg::m_readFromJSON
Gaudi::Property< std::string > m_readFromJSON
Load the alignment parameters from a JSON file.
Definition: MdtAsBuiltCondAlg.h:48
MdtAsBuiltCondAlg::setFromAscii
StatusCode setFromAscii(const std::string &asciiData, nlohmann::json &newChannel) const
Definition: MdtAsBuiltCondAlg.cxx:161
CondHandleKeyArray.h
MdtAsBuiltContainer
std::set< MdtAsBuiltPar, std::less<> > MdtAsBuiltContainer
Definition: CorrContainer.h:24
ReadCondHandleKey.h
AthReentrantAlgorithm.h
MdtAsBuiltCondAlg::m_readKey
SG::ReadCondHandleKey< CondAttrListCollection > m_readKey
Definition: MdtAsBuiltCondAlg.h:36
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
MdtAsBuiltCondAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition: MdtAsBuiltCondAlg.cxx:28
SG::ReadCondHandleKey< CondAttrListCollection >
blobaccess.h
MdtAsBuiltCondAlg
Definition: MdtAsBuiltCondAlg.h:18
SG::WriteCondHandleKey< MdtAsBuiltContainer >
MdtAsBuiltCondAlg::legacyFormatToJSON
StatusCode legacyFormatToJSON(const std::string &bloblines, nlohmann::json &lines) const
Definition: MdtAsBuiltCondAlg.cxx:127
MdtAsBuiltCondAlg::parseDataFromJSON
StatusCode parseDataFromJSON(const nlohmann::json &lines, MdtAsBuiltContainer &asBuilt) const
Definition: MdtAsBuiltCondAlg.cxx:76
MdtAsBuiltCondAlg::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MdtAsBuiltCondAlg.h:42
IMuonIdHelperSvc.h
ServiceHandle< Muon::IMuonIdHelperSvc >