ATLAS Offline Software
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 
19 public:
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 
27 private:
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
MdtCondJsonDumpAlg::initialize
virtual StatusCode initialize() override
Definition: MdtCondJsonDumpAlg.cxx:15
MdtCondJsonDumpAlg::~MdtCondJsonDumpAlg
virtual ~MdtCondJsonDumpAlg()=default
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
MdtCondJsonDumpAlg::m_dcsJSON
Gaudi::Property< std::string > m_dcsJSON
Definition: MdtCondJsonDumpAlg.h:47
dq_defect_copy_defect_database.channels
def channels
Definition: dq_defect_copy_defect_database.py:56
AthAlgorithm.h
MdtCondJsonDumpAlg::dumpIdentifier
void dumpIdentifier(const Identifier &id, std::ostream &ostr, bool dumpMultiLayer, bool dumpLayer, bool dumpTube, bool trailingComma) const
Dumps the Identifier into a json format.
Definition: MdtCondJsonDumpAlg.cxx:84
MdtCondJsonDumpAlg
Definition: MdtCondJsonDumpAlg.h:18
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
MdtCondJsonDumpAlg::dumpDeadChannels
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.
Definition: MdtCondJsonDumpAlg.cxx:113
AthAlgorithm
Definition: AthAlgorithm.h:47
ReadCondHandleKey.h
MdtCondJsonDumpAlg::m_readKey
SG::ReadCondHandleKey< MdtCondDbData > m_readKey
Definition: MdtCondJsonDumpAlg.h:44
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
MdtCondJsonDumpAlg::execute
virtual StatusCode execute() override
Definition: MdtCondJsonDumpAlg.cxx:20
SG::ReadCondHandleKey< MdtCondDbData >
MdtCondJsonDumpAlg::m_deadChannelJSON
Gaudi::Property< std::string > m_deadChannelJSON
Definition: MdtCondJsonDumpAlg.h:46
MdtCondJsonDumpAlg::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MdtCondJsonDumpAlg.h:42
MdtCondDbData.h
MdtCondJsonDumpAlg::MdtCondJsonDumpAlg
MdtCondJsonDumpAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: MdtCondJsonDumpAlg.cxx:12
MdtCondJsonDumpAlg::cardinality
virtual unsigned int cardinality() const override final
Definition: MdtCondJsonDumpAlg.h:24
IMuonIdHelperSvc.h
ServiceHandle< Muon::IMuonIdHelperSvc >
Identifier
Definition: IdentifierFieldParser.cxx:14