ATLAS Offline Software
Loading...
Searching...
No Matches
MdtCondJsonDumpAlg.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/*
6 * Algorithm to dump the dead chambers & DCS voltages into a JSON file
7*/
8
9#ifndef MUONCONDDUMP_MDTCONDJSONDUMPALG_H
10#define MUONCONDDUMP_MDTCONDJSONDUMPALG_H
11
12
17
19public:
20 MdtCondJsonDumpAlg(const std::string& name, ISvcLocator* pSvcLocator);
21 virtual ~MdtCondJsonDumpAlg() = default;
22 virtual StatusCode initialize() override;
23 virtual StatusCode execute() override;
24 virtual unsigned int cardinality() const override final{return 1;}
25
26
27private:
29 void dumpDeadChannels(const std::set<Identifier>& channels,
30 std::ostream& ostr,
31 bool dumpMultiLayer = false,
32 bool dumpLayer = false,
33 bool dumpTube = false) const;
35 void dumpIdentifier(const Identifier& id,
36 std::ostream& ostr,
37 bool dumpMultiLayer,
38 bool dumpLayer,
39 bool dumpTube,
40 bool trailingComma) const;
41
42 ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc{this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
43
44 SG::ReadCondHandleKey<MdtCondDbData> m_readKey{this, "ReadKey", "MdtCondDbData", "Key of MdtCondDbData"};
45
46 Gaudi::Property<std::string> m_deadChannelJSON{this, "DeadChannelJSON", "DeadChannels.json", "Json file to dump all dead channels"};
47 Gaudi::Property<std::string> m_dcsJSON{this, "DcsVoltJSON", "DcsVoltage.json", "Dump all DCS values into a JSON"};
48
49};
50
51#endif
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Gaudi::Property< std::string > m_dcsJSON
void dumpDeadChannels(const std::set< Identifier > &channels, std::ostream &ostr, bool dumpMultiLayer=false, bool dumpLayer=false, bool dumpTube=false) const
Dumps all channels into a JSON format.
virtual StatusCode execute() override
void dumpIdentifier(const Identifier &id, std::ostream &ostr, bool dumpMultiLayer, bool dumpLayer, bool dumpTube, bool trailingComma) const
Dumps the Identifier into a json format.
virtual ~MdtCondJsonDumpAlg()=default
SG::ReadCondHandleKey< MdtCondDbData > m_readKey
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
virtual unsigned int cardinality() const override final
Gaudi::Property< std::string > m_deadChannelJSON
MdtCondJsonDumpAlg(const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode initialize() override