ATLAS Offline Software
MdtCondDbData.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 MUONCONDDATA_MDTCONDDBDATA_H
6 #define MUONCONDDATA_MDTCONDDBDATA_H
7 
8 //STL includes
9 #include <set>
10 
11 //Athena includes
12 #include "AthenaKernel/CondCont.h"
13 #include "AthenaKernel/BaseInfo.h"
14 #include "MuonCondData/Defs.h"
15 
16 //forward declarations
17 class Identifier;
18 class MdtIdHelper;
19 
20 
22 
23  friend class MdtCondDbAlg;
24 
25 public:
26 
27  MdtCondDbData(const MdtIdHelper& id_helper);
28 
29 
30  virtual ~MdtCondDbData() = default;
32  void setDeadTube (const Identifier& ident);
34  void setDeadLayer (const Identifier& ident);
36  void setDeadMultilayer(const Identifier& ident);
38  void setDeadChamber (const Identifier& ident);
39 
41  const std::set<Identifier>& getDeadTubesId () const;
42  const std::set<Identifier>& getDeadLayersId () const;
43  const std::set<Identifier>& getDeadMultilayersId() const;
44  const std::set<Identifier>& getDeadChambersId () const;
45 
48  bool isGood (const Identifier & Id) const;
51  bool isGoodTube (const Identifier & Id) const;
54  bool isGoodLayer (const Identifier & Id) const;
55  bool isGoodMultilayer(const Identifier & Id) const;
57  bool isGoodChamber (const Identifier & Id) const;
58 
61 
68  void setHvState(const Identifier& multiLayerID,
69  const DcsFsmState state,
70  const float standByVolt,
71  const float readyVolt);
72 
73  bool hasDCS() const;
74  const DcsConstants& getHvState(const Identifier& multiLayerID) const;
75 
76  const std::vector<DcsConstants>& getAllHvStates() const;
77 private:
78  std::set<Identifier> m_cachedDeadTubes{};
79  std::set<Identifier> m_cachedDeadLayers{};
80  std::set<Identifier> m_cachedDeadMultilayers{};
81  std::set<Identifier> m_cachedDeadChambers{};
82 
83  std::vector<DcsConstants> m_dcsStates{};
85 
86 };
87 
88 CLASS_DEF( MdtCondDbData, 58088442, 1)
89 CLASS_DEF( CondCont<MdtCondDbData>, 62077248, 0)
90 
91 #endif
MdtCondDbData::m_id_helper
const MdtIdHelper & m_id_helper
Definition: MdtCondDbData.h:84
MdtCondDbData::isGood
bool isGood(const Identifier &Id) const
Returns if the identifier (tube/multiLayer/chamber) is masked in the conditions database.
Definition: MdtCondDbData.cxx:25
CondCont.h
Hold mappings of ranges to condition objects.
MdtCondDbData::getDeadMultilayersId
const std::set< Identifier > & getDeadMultilayersId() const
Definition: MdtCondDbData.cxx:22
MdtCondDbData::hasDCS
bool hasDCS() const
Definition: MdtCondDbData.cxx:69
MdtCondDbData::getAllHvStates
const std::vector< DcsConstants > & getAllHvStates() const
Definition: MdtCondDbData.cxx:58
MdtCondDbData::m_cachedDeadLayers
std::set< Identifier > m_cachedDeadLayers
Definition: MdtCondDbData.h:79
MdtCondDbData
Definition: MdtCondDbData.h:21
MdtCondDbData::setDeadLayer
void setDeadLayer(const Identifier &ident)
All tubes in a drift layer are dead.
Definition: MdtCondDbData.cxx:15
MdtCondDbData::setDeadChamber
void setDeadChamber(const Identifier &ident)
All tubes in a chamber are dead.
Definition: MdtCondDbData.cxx:17
MdtCondDbData::getDeadLayersId
const std::set< Identifier > & getDeadLayersId() const
Definition: MdtCondDbData.cxx:21
MuonCond::DcsFsmState
DcsFsmState
Definition: MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondData/MuonCondData/Defs.h:15
MdtCondDbData::getDeadChambersId
const std::set< Identifier > & getDeadChambersId() const
Definition: MdtCondDbData.cxx:23
DcsConstants
MdtCondDbData::DcsConstants DcsConstants
Definition: MdtCondDbData.cxx:9
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:43
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
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:30
MdtCondDbData::m_cachedDeadTubes
std::set< Identifier > m_cachedDeadTubes
Definition: MdtCondDbData.h:78
MdtCondDbData::getHvState
const DcsConstants & getHvState(const Identifier &multiLayerID) const
Definition: MdtCondDbData.cxx:59
MdtCondDbData::setDeadTube
void setDeadTube(const Identifier &ident)
The indiviudal tube is dead.
Definition: MdtCondDbData.cxx:14
MdtCondDbData::isGoodTube
bool isGoodTube(const Identifier &Id) const
Returns whether the particular tube has been markes as bad in the database.
Definition: MdtCondDbData.cxx:29
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:16
MdtCondDbData::isGoodChamber
bool isGoodChamber(const Identifier &Id) const
Returns true if the complete chamber has not dead channels.
Definition: MdtCondDbData.cxx:39
CondCont
Hold mapping of ranges to condition objects.
Definition: CondCont.h:811
MdtCondDbData::m_dcsStates
std::vector< DcsConstants > m_dcsStates
Definition: MdtCondDbData.h:83
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:64
MdtCondDbData::MdtCondDbData
MdtCondDbData(const MdtIdHelper &id_helper)
Definition: MdtCondDbData.cxx:11
MdtCondDbData::getDeadTubesId
const std::set< Identifier > & getDeadTubesId() const
Definition: MdtCondDbData.cxx:20
MdtCondDbData::m_cachedDeadMultilayers
std::set< Identifier > m_cachedDeadMultilayers
Definition: MdtCondDbData.h:80
MdtCondDbData::isGoodMultilayer
bool isGoodMultilayer(const Identifier &Id) const
Definition: MdtCondDbData.cxx:36
MdtCondDbData::m_cachedDeadChambers
std::set< Identifier > m_cachedDeadChambers
Definition: MdtCondDbData.h:81
MdtCondDbData::~MdtCondDbData
virtual ~MdtCondDbData()=default