ATLAS Offline Software
MdtCondDbData.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef MUONCONDDATA_MDTCONDDBDATA_H
6 #define MUONCONDDATA_MDTCONDDBDATA_H
7 
8 
9 
10 //Athena includes
11 #include "AthenaKernel/CondCont.h"
12 #include "AthenaKernel/BaseInfo.h"
13 #include "MuonCondData/Defs.h"
14 
15 //STL includes
16 #include <set>
17 #include <vector>
18 
19 //forward declarations
20 class Identifier;
21 class MdtIdHelper;
22 
23 
25 
26  friend class MdtCondDbAlg;
27 
28 public:
29 
30  MdtCondDbData(const MdtIdHelper& id_helper);
31 
32 
33  virtual ~MdtCondDbData() = default;
35  void setDeadTube (const Identifier& ident);
37  void setDeadLayer (const Identifier& ident);
39  void setDeadMultilayer(const Identifier& ident);
41  void setDeadChamber (const Identifier& ident);
42 
44  const std::set<Identifier>& getDeadTubesId () const;
45  const std::set<Identifier>& getDeadLayersId () const;
46  const std::set<Identifier>& getDeadMultilayersId() const;
47  const std::set<Identifier>& getDeadChambersId () const;
48 
51  bool isGood (const Identifier & Id) const;
54  bool isGoodTube (const Identifier & Id) const;
57  bool isGoodLayer (const Identifier & Id) const;
58  bool isGoodMultilayer(const Identifier & Id) const;
60  bool isGoodChamber (const Identifier & Id) const;
61 
64 
71  void setHvState(const Identifier& multiLayerID,
72  const DcsFsmState state,
73  const float standByVolt,
74  const float readyVolt);
75 
76  bool hasDCS() const;
77  const DcsConstants& getHvState(const Identifier& multiLayerID) const;
78 
79  const std::vector<DcsConstants>& getAllHvStates() const;
80 private:
81  std::set<Identifier> m_cachedDeadTubes{};
82  std::set<Identifier> m_cachedDeadLayers{};
83  std::set<Identifier> m_cachedDeadMultilayers{};
84  std::set<Identifier> m_cachedDeadChambers{};
85 
86  std::vector<DcsConstants> m_dcsStates{};
88 
89 };
90 
91 CLASS_DEF( MdtCondDbData, 58088442, 1)
92 CLASS_DEF( CondCont<MdtCondDbData>, 62077248, 0)
93 
94 #endif
MdtCondDbData::m_id_helper
const MdtIdHelper & m_id_helper
Definition: MdtCondDbData.h:87
MdtCondDbData::isGood
bool isGood(const Identifier &Id) const
Returns if the identifier (tube/multiLayer/chamber) is masked in the conditions database.
Definition: MdtCondDbData.cxx:27
CondCont.h
Hold mappings of ranges to condition objects.
MdtCondDbData::getDeadMultilayersId
const std::set< Identifier > & getDeadMultilayersId() const
Definition: MdtCondDbData.cxx:24
MdtCondDbData::hasDCS
bool hasDCS() const
Definition: MdtCondDbData.cxx:71
MdtCondDbData::getAllHvStates
const std::vector< DcsConstants > & getAllHvStates() const
Definition: MdtCondDbData.cxx:60
MdtCondDbData::m_cachedDeadLayers
std::set< Identifier > m_cachedDeadLayers
Definition: MdtCondDbData.h:82
MdtCondDbData
Definition: MdtCondDbData.h:24
MdtCondDbData::setDeadLayer
void setDeadLayer(const Identifier &ident)
All tubes in a drift layer are dead.
Definition: MdtCondDbData.cxx:17
MdtCondDbData::setDeadChamber
void setDeadChamber(const Identifier &ident)
All tubes in a chamber are dead.
Definition: MdtCondDbData.cxx:19
MdtCondDbData::getDeadLayersId
const std::set< Identifier > & getDeadLayersId() const
Definition: MdtCondDbData.cxx:23
MuonCond::DcsFsmState
DcsFsmState
Definition: MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondData/MuonCondData/Defs.h:15
MdtCondDbData::getDeadChambersId
const std::set< Identifier > & getDeadChambersId() const
Definition: MdtCondDbData.cxx:25
DcsConstants
MdtCondDbData::DcsConstants DcsConstants
Definition: MdtCondDbData.cxx:11
BaseInfo.h
Provide an interface for finding inheritance information at run time.
MdtCondDbData::setHvState
void setHvState(const Identifier &multiLayerID, const DcsFsmState state, const float standByVolt, const float readyVolt)
Adds a DCS state to the conditions object multiLayerID -> Identifier of a tube in the multilayer stat...
Definition: MdtCondDbData.cxx:45
MdtCondDbAlg
Definition: MdtCondDbAlg.h:19
MuonCond::DcsConstants
Helper struct to cache all dcs constants in a common place of the memory.
Definition: MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondData/MuonCondData/Defs.h:31
MdtIdHelper
Definition: MdtIdHelper.h:61
MdtCondDbData::isGoodLayer
bool isGoodLayer(const Identifier &Id) const
Returns whether the corresponding tube layer is marked as bad in the database
Definition: MdtCondDbData.cxx:32
MdtCondDbData::m_cachedDeadTubes
std::set< Identifier > m_cachedDeadTubes
Definition: MdtCondDbData.h:81
MdtCondDbData::getHvState
const DcsConstants & getHvState(const Identifier &multiLayerID) const
Definition: MdtCondDbData.cxx:61
MdtCondDbData::setDeadTube
void setDeadTube(const Identifier &ident)
The indiviudal tube is dead.
Definition: MdtCondDbData.cxx:16
MdtCondDbData::isGoodTube
bool isGoodTube(const Identifier &Id) const
Returns whether the particular tube has been markes as bad in the database.
Definition: MdtCondDbData.cxx:31
Defs.h
TRT::Hit::ident
@ ident
Definition: HitInfo.h:77
MdtCondDbData::setDeadMultilayer
void setDeadMultilayer(const Identifier &ident)
All tubes in a multi layer are dead.
Definition: MdtCondDbData.cxx:18
MdtCondDbData::isGoodChamber
bool isGoodChamber(const Identifier &Id) const
Returns true if the complete chamber has not dead channels.
Definition: MdtCondDbData.cxx:41
CondCont
Hold mapping of ranges to condition objects.
Definition: CondCont.h:811
MdtCondDbData::m_dcsStates
std::vector< DcsConstants > m_dcsStates
Definition: MdtCondDbData.h:86
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:67
MdtCondDbData::MdtCondDbData
MdtCondDbData(const MdtIdHelper &id_helper)
Definition: MdtCondDbData.cxx:13
MdtCondDbData::getDeadTubesId
const std::set< Identifier > & getDeadTubesId() const
Definition: MdtCondDbData.cxx:22
MdtCondDbData::m_cachedDeadMultilayers
std::set< Identifier > m_cachedDeadMultilayers
Definition: MdtCondDbData.h:83
MdtCondDbData::isGoodMultilayer
bool isGoodMultilayer(const Identifier &Id) const
Definition: MdtCondDbData.cxx:38
MdtCondDbData::m_cachedDeadChambers
std::set< Identifier > m_cachedDeadChambers
Definition: MdtCondDbData.h:84
MdtCondDbData::~MdtCondDbData
virtual ~MdtCondDbData()=default
Identifier
Definition: IdentifierFieldParser.cxx:14