ATLAS Offline Software
SCT_ConditionsSummaryTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
9 #ifndef SCT_ConditionsSummaryTool_h
10 #define SCT_ConditionsSummaryTool_h
11 
13 
20 
21 //Gaudi Includes
22 #include "GaudiKernel/ToolHandle.h"
23 
24 //STL includes
25 #include <string>
26 #include <vector>
27 
28 //forward declarations
30 
31 class SCT_ID;
32 
33 
38 class SCT_ConditionsSummaryTool: public extends<AthAlgTool, IDetectorElementStatusTool, IInDetConditionsTool> {
39 
40 public:
41  SCT_ConditionsSummaryTool(const std::string& type, const std::string& name, const IInterface* parent);
42  virtual ~SCT_ConditionsSummaryTool() = default;
43  //@name Gaudi STool Implementation
45  virtual StatusCode initialize() override;
46 
47 
48  //@name reimplemented from IInDetConditionsTool
50  virtual bool isActive(const Identifier& elementId, const InDetConditions::Hierarchy h, const EventContext& ctx) const override;
51  virtual bool isActive(const IdentifierHash& elementHash, const EventContext& ctx) const override;
52  virtual bool isActive(const IdentifierHash& elementHash, const Identifier& elementId, const EventContext& ctx) const override;
53  virtual double activeFraction(const IdentifierHash& elementHash, const Identifier& idStart, const Identifier& idEnd, const EventContext& ctx) const override;
54 
55  virtual bool isGood(const Identifier& elementId, const InDetConditions::Hierarchy h, const EventContext& ctx) const override;
56  virtual bool isGood(const IdentifierHash& elementHash, const EventContext& ctx) const override;
57  virtual bool isGood(const IdentifierHash& elementHash, const Identifier& elementId, const EventContext& ctx, const IDCCacheEntry* cacheEntry=nullptr) const override;
58  virtual double goodFraction(const IdentifierHash& elementHash, const Identifier& idStart, const Identifier& idEnd, const EventContext& ctx) const override;
59  virtual std::unique_ptr<InDet::SiDetectorElementStatus>
60  getDetectorElementStatus(const EventContext& ctx,
62 
63  virtual bool hasBSError(const IdentifierHash& elementHash, const EventContext& ctx, const IDCCacheEntry* cacheEntry=nullptr) const override;
64  virtual bool hasBSError(const IdentifierHash& elementHash, Identifier elementId, const EventContext& ctx, const IDCCacheEntry* cacheEntry=nullptr) const override;
65  virtual uint64_t getBSErrorWord(const IdentifierHash& moduleHash, const EventContext& ctx, const IDCCacheEntry* cacheEntry=nullptr) const override;
66 
67  virtual uint64_t getBSErrorWord(const IdentifierHash& moduleHash, const int index, const EventContext& ctx, const IDCCacheEntry* cacheEntry=nullptr) const override;
68  virtual IDCCacheEntry* getCacheEntryOut(const EventContext& ctx) const override;
70 private:
71  std::unique_ptr<InDet::SiDetectorElementStatus>
72  createDetectorElementStatus(const EventContext& ctx,
74 
75  ToolHandleArray<ISCT_ConditionsTool> m_toolHandles
76  {this, "ConditionsTools", {},""};
78  {this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
80  {this, "SCTDetElStatusEventDataBaseKey", "", "Optional event data key of an input SiDetectorElementStatus on which the newly created object will be based."};
82  {this, "SCTDetElStatusCondDataBaseKey", "" , "Optional conditions data key of an input SiDetectorElementStatus on which the newly created object will be based."};
83  const SCT_ID* m_id_sct{nullptr};
84 
85 
86  bool m_noReports{true};
87 };
88 
89 #endif // SCT_ConditionsSummaryTool_h
SCT_ConditionsSummaryTool::getDetectorElementStatus
virtual std::unique_ptr< InDet::SiDetectorElementStatus > getDetectorElementStatus(const EventContext &ctx, SG::WriteCondHandle< InDet::SiDetectorElementStatus > *whandle) const override
Definition: SCT_ConditionsSummaryTool.cxx:126
SCT_ConditionsSummaryTool::m_SCTDetEleCollKey
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_SCTDetEleCollKey
Definition: SCT_ConditionsSummaryTool.h:78
IInDetConditionsTool.h
SCT_ConditionsSummaryTool::m_SCTDetElStatusCondKey
SG::ReadCondHandleKey< InDet::SiDetectorElementStatus > m_SCTDetElStatusCondKey
Definition: SCT_ConditionsSummaryTool.h:82
SCT_ConditionsSummaryTool::isGood
virtual bool isGood(const Identifier &elementId, const InDetConditions::Hierarchy h, const EventContext &ctx) const override
Definition: SCT_ConditionsSummaryTool.cxx:65
SCT_ConditionsSummaryTool::~SCT_ConditionsSummaryTool
virtual ~SCT_ConditionsSummaryTool()=default
SCT_ConditionsSummaryTool::m_id_sct
const SCT_ID * m_id_sct
Handle to SCT ID helper.
Definition: SCT_ConditionsSummaryTool.h:83
SiDetectorElementStatus.h
index
Definition: index.py:1
SCT_ConditionsSummaryTool::goodFraction
virtual double goodFraction(const IdentifierHash &elementHash, const Identifier &idStart, const Identifier &idEnd, const EventContext &ctx) const override
Definition: SCT_ConditionsSummaryTool.cxx:168
SCT_ConditionsSummaryTool::isGood
virtual bool isGood(const IdentifierHash &elementHash, const Identifier &elementId, const EventContext &ctx, const IDCCacheEntry *cacheEntry=nullptr) const override
InDetConditions::Hierarchy
Hierarchy
Definition: InDetHierarchy.h:14
SCT_ConditionsSummaryTool::getBSErrorWord
virtual uint64_t getBSErrorWord(const IdentifierHash &moduleHash, const EventContext &ctx, const IDCCacheEntry *cacheEntry=nullptr) const override
SG::ReadHandleKey< InDet::SiDetectorElementStatus >
SCT_ConditionsSummaryTool::getBSErrorWord
virtual uint64_t getBSErrorWord(const IdentifierHash &moduleHash, const int index, const EventContext &ctx, const IDCCacheEntry *cacheEntry=nullptr) const override
SCT_ConditionsSummaryTool::createDetectorElementStatus
std::unique_ptr< InDet::SiDetectorElementStatus > createDetectorElementStatus(const EventContext &ctx, SG::WriteCondHandle< InDet::SiDetectorElementStatus > *whandle) const
Definition: SCT_ConditionsSummaryTool.cxx:98
SCT_ConditionsSummaryTool::isActive
virtual bool isActive(const Identifier &elementId, const InDetConditions::Hierarchy h, const EventContext &ctx) const override
Definition: SCT_ConditionsSummaryTool.cxx:50
SCT_ConditionsSummaryTool::activeFraction
virtual double activeFraction(const IdentifierHash &elementHash, const Identifier &idStart, const Identifier &idEnd, const EventContext &ctx) const override
Definition: SCT_ConditionsSummaryTool.cxx:45
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_ConditionsSummaryTool::SCT_ConditionsSummaryTool
SCT_ConditionsSummaryTool(const std::string &type, const std::string &name, const IInterface *parent)
Tool constructor.
Definition: SCT_ConditionsSummaryTool.cxx:19
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
InDetHierarchy.h
SCT_ConditionsSummaryTool::hasBSError
virtual bool hasBSError(const IdentifierHash &elementHash, Identifier elementId, const EventContext &ctx, const IDCCacheEntry *cacheEntry=nullptr) const override
SCT_ConditionsSummaryTool::hasBSError
virtual bool hasBSError(const IdentifierHash &elementHash, const EventContext &ctx, const IDCCacheEntry *cacheEntry=nullptr) const override
SCT_ConditionsSummaryTool::getCacheEntryOut
virtual IDCCacheEntry * getCacheEntryOut(const EventContext &ctx) const override
Definition: SCT_ConditionsSummaryTool.cxx:162
ReadCondHandleKey.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
IDetectorElementStatusTool.h
SiDetectorElementCollection.h
SCT_ConditionsSummaryTool::m_SCTDetElStatusEventKey
SG::ReadHandleKey< InDet::SiDetectorElementStatus > m_SCTDetElStatusEventKey
Definition: SCT_ConditionsSummaryTool.h:80
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection >
h
SCT_ConditionsSummaryTool
Definition: SCT_ConditionsSummaryTool.h:38
SCT_ID
Definition: SCT_ID.h:68
SCT_ConditionsSummaryTool::m_noReports
bool m_noReports
Definition: SCT_ConditionsSummaryTool.h:86
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
SCT_ConditionsSummaryTool::initialize
virtual StatusCode initialize() override
Tool init.
Definition: SCT_ConditionsSummaryTool.cxx:26
SG::WriteCondHandle
Definition: WriteCondHandle.h:26
SCT_ConditionsSummaryTool::m_toolHandles
ToolHandleArray< ISCT_ConditionsTool > m_toolHandles
Definition: SCT_ConditionsSummaryTool.h:76
ISCT_ConditionsTool
Definition: ISCT_ConditionsTool.h:34
Identifier
Definition: IdentifierFieldParser.cxx:14