ATLAS Offline Software
SCT_TdaqEnabledTool.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 
3 /*
4  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
5 */
6 
13 #ifndef SCT_TdaqEnabledTool_h
14 #define SCT_TdaqEnabledTool_h
15 
18 
22 
23 #include "GaudiKernel/EventContext.h"
24 
25 class SCT_ID;
26 
32 class SCT_TdaqEnabledTool: public extends<AthAlgTool, ISCT_ConditionsTool> {
33 public:
34  //@name Tool methods
36  SCT_TdaqEnabledTool(const std::string& type, const std::string& name, const IInterface* parent);
37  virtual ~SCT_TdaqEnabledTool() = default;
38  virtual StatusCode initialize() override;
39  virtual StatusCode finalize() override;
41 
43  virtual bool canReportAbout(InDetConditions::Hierarchy h) const override;
44 
46  virtual bool isGood(const Identifier& elementId, InDetConditions::Hierarchy h=InDetConditions::DEFAULT) const override;
47  virtual bool isGood(const Identifier& elementId, const EventContext& ctx, InDetConditions::Hierarchy h=InDetConditions::DEFAULT) const override;
48 
50  virtual bool isGood(const IdentifierHash& hashId) const override;
51  virtual bool isGood(const IdentifierHash& hashId, const EventContext& ctx) const override;
52 
53  virtual void getDetectorElementStatus(const EventContext& ctx, InDet::SiDetectorElementStatus &element_status,
55 
56  private:
57  const SCT_ID* m_pHelper{nullptr};
58  bool m_useDatabase{true};
59 
60  SG::ReadCondHandleKey<SCT_TdaqEnabledCondData> m_condKey{this, "CondKey", "SCT_TdaqEnabledCondData", "Active SCT RODs"};
61 
62  const SCT_TdaqEnabledCondData* getCondData(const EventContext& ctx) const;
63 };
64 
65 #endif // SCT_TdaqEnabledTool_h
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
SCT_TdaqEnabledTool::~SCT_TdaqEnabledTool
virtual ~SCT_TdaqEnabledTool()=default
ISCT_ConditionsTool.h
SCT_TdaqEnabledCondData.h
header file for data object for SCT_TdaqEnabledCondAlg and SCT_TdaqEnabledTool.
SCT_TdaqEnabledTool::finalize
virtual StatusCode finalize() override
Definition: SCT_TdaqEnabledTool.cxx:40
SCT_TdaqEnabledTool
Definition: SCT_TdaqEnabledTool.h:32
SCT_TdaqEnabledTool::isGood
virtual bool isGood(const Identifier &elementId, InDetConditions::Hierarchy h=InDetConditions::DEFAULT) const override
Is the detector element good?
Definition: SCT_TdaqEnabledTool.cxx:58
InDetConditions::Hierarchy
Hierarchy
Definition: InDetHierarchy.h:14
SCT_TdaqEnabledTool::m_condKey
SG::ReadCondHandleKey< SCT_TdaqEnabledCondData > m_condKey
Definition: SCT_TdaqEnabledTool.h:60
SCT_TdaqEnabledTool::SCT_TdaqEnabledTool
SCT_TdaqEnabledTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: SCT_TdaqEnabledTool.cxx:20
SCT_TdaqEnabledTool::m_pHelper
const SCT_ID * m_pHelper
Definition: SCT_TdaqEnabledTool.h:57
SCT_TdaqEnabledTool::m_useDatabase
bool m_useDatabase
Definition: SCT_TdaqEnabledTool.h:58
SCT_TdaqEnabledTool::getDetectorElementStatus
virtual void getDetectorElementStatus(const EventContext &ctx, InDet::SiDetectorElementStatus &element_status, SG::WriteCondHandle< InDet::SiDetectorElementStatus > *whandle) const override
Definition: SCT_TdaqEnabledTool.cxx:79
InDet::SiDetectorElementStatus
Definition: SiDetectorElementStatus.h:62
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
SCT_TdaqEnabledCondData
Class for data object used in SCT_TdaqEnabledCondAlg and SCT_TdaqEnabledTool.
Definition: SCT_TdaqEnabledCondData.h:27
ReadCondHandleKey.h
SCT_TdaqEnabledTool::initialize
virtual StatusCode initialize() override
Definition: SCT_TdaqEnabledTool.cxx:27
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
SCT_TdaqEnabledTool::canReportAbout
virtual bool canReportAbout(InDetConditions::Hierarchy h) const override
Can the service report about the given component? (TdaqEnabledSvc can answer questions about a module...
Definition: SCT_TdaqEnabledTool.cxx:45
SG::ReadCondHandleKey< SCT_TdaqEnabledCondData >
h
SCT_ID
Definition: SCT_ID.h:68
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
InDetConditions::DEFAULT
@ DEFAULT
Definition: InDetHierarchy.h:14
SG::WriteCondHandle
Definition: WriteCondHandle.h:26
SCT_TdaqEnabledTool::getCondData
const SCT_TdaqEnabledCondData * getCondData(const EventContext &ctx) const
Definition: SCT_TdaqEnabledTool.cxx:112
Identifier
Definition: IdentifierFieldParser.cxx:14