ATLAS Offline Software
Loading...
Searching...
No Matches
CscILinesCondAlg.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4#ifndef MUONCONDALG_ILINESCONDALG_H
5#define MUONCONDALG_ILINESCONDALG_H
6
9#include "CoralBase/Blob.h"
15#include "nlohmann/json.hpp"
16
18
19 public:
20 CscILinesCondAlg(const std::string& name, ISvcLocator* pSvcLocator);
21 virtual ~CscILinesCondAlg() = default;
22 virtual StatusCode initialize() override;
23 virtual StatusCode execute(const EventContext& ctx) const override;
24
25 private:
26 SG::ReadCondHandleKey<CondAttrListCollection> m_readKey{this, "ReadKey", "/MUONALIGN/CSC/ILINES",
27 "Key of input CSC/ILINES condition data"};
28
29 SG::WriteCondHandleKey<ALineContainer> m_writeKey{this, "WriteKey", "CscInternalAlignmentContainer",
30 "Key of output muon alignment CSC/ILine condition data"};
31
32 ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc{this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
33 // new folder format 2020
34 Gaudi::Property<bool> m_newFormat2020 {this, "NewFormat2020", false,
35 "The database folders are given in the new JSON format"};
36
37 Gaudi::Property<std::string> m_readFromJSON{this,"readFromJSON", "",
38 "Reads the A & B lines parameters from a JSON file instead from COOL"};
39
40
45 StatusCode loadDataFromLegacy(const std::string& data, nlohmann::json& json) const;
49 StatusCode parseDataFromJSON(const nlohmann::json& lines,
50 ALineContainer& writeCdo) const;
51};
52#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< ALinePar, std::less<> > ALineContainer
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
nlohmann::json json
Base class for conditions algorithms.
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
StatusCode loadDataFromLegacy(const std::string &data, nlohmann::json &json) const
Load the Alignment data from the legacy format where the channels are parsed line wise The data is th...
SG::WriteCondHandleKey< ALineContainer > m_writeKey
SG::ReadCondHandleKey< CondAttrListCollection > m_readKey
virtual StatusCode initialize() override
Gaudi::Property< std::string > m_readFromJSON
Load the alignment parameters from a JSON file.
virtual StatusCode execute(const EventContext &ctx) const override
StatusCode parseDataFromJSON(const nlohmann::json &lines, ALineContainer &writeCdo) const
Parse the JSON blob to fill the I Line container.
CscILinesCondAlg(const std::string &name, ISvcLocator *pSvcLocator)
virtual ~CscILinesCondAlg()=default
Gaudi::Property< bool > m_newFormat2020