ATLAS Offline Software
SCT_RODVetoTool.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_RODVetoTool_h
14 #define SCT_RODVetoTool_h
15 
16 //Athena includes
19 
20 #include "Identifier/Identifier.h"
24 
25 //STL includes
26 #include <string>
27 
28 //forward declarations
29 class IdentifierHash;
30 class SCT_ID;
31 class SCT_RODVetoTool_test;
32 
37 class SCT_RODVetoTool: public extends<AthAlgTool, ISCT_ConditionsTool> {
39  friend class SCT_RODVetoTool_test;
40 
41 public:
42  //@name Tool methods
44  SCT_RODVetoTool(const std::string& type, const std::string& name, const IInterface* parent);
45  virtual ~SCT_RODVetoTool() = default;
46  virtual StatusCode initialize() override;
47  virtual StatusCode finalize() override;
49 
51  virtual bool canReportAbout(InDetConditions::Hierarchy h) const override;
52 
54  virtual bool isGood(const Identifier& elementId, InDetConditions::Hierarchy h=InDetConditions::DEFAULT) const override;
55  virtual bool isGood(const Identifier& elementId, const EventContext& ctx, InDetConditions::Hierarchy h=InDetConditions::DEFAULT) const override;
56 
58  virtual bool isGood(const IdentifierHash& hashId) const override;
59  virtual bool isGood(const IdentifierHash& hashId, const EventContext& ctx) const override;
60  virtual void getDetectorElementStatus(const EventContext& ctx, InDet::SiDetectorElementStatus &element_status,
62 
63 private:
64 
65  const IdentifierSet* getCondData(const EventContext& ctx) const;
66 
67  // The vector of bad rods should be kept in a threadsafe way so it can
68  // be called and read safely.
69  SG::ReadCondHandleKey<IdentifierSet> m_badModuleIds{this, "BadModuleIds", "BadSCTModuleIds_RODVeto", "Read key for bad module identifiers"};
70 
71  const SCT_ID* m_pHelper{nullptr};
72 };
73 
74 #endif // SCT_RODVetoTool_h
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
IdentifierSet
std::set< Identifier > IdentifierSet
IdentifierSet is std::set of Identifier and used in SCT_RODVetoCondAlg and SCT_RODVetoTool....
Definition: IdentifierSet.h:18
ISCT_ConditionsTool.h
SCT_RODVetoTool::SCT_RODVetoTool
SCT_RODVetoTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: SCT_RODVetoTool.cxx:29
SCT_RODVetoTool::initialize
virtual StatusCode initialize() override
Definition: SCT_RODVetoTool.cxx:36
SCT_RODVetoTool::getCondData
const IdentifierSet * getCondData(const EventContext &ctx) const
Definition: SCT_RODVetoTool.cxx:124
SCT_RODVetoTool::m_pHelper
const SCT_ID * m_pHelper
Definition: SCT_RODVetoTool.h:71
InDetConditions::Hierarchy
Hierarchy
Definition: InDetHierarchy.h:14
SCT_RODVetoTool::canReportAbout
virtual bool canReportAbout(InDetConditions::Hierarchy h) const override
Can the service report about the given component? (chip, module...)
Definition: SCT_RODVetoTool.cxx:50
SCT_RODVetoTool::SCT_RODVetoTool_test
friend class SCT_RODVetoTool_test
Allow the test class access to all methods.
Definition: SCT_RODVetoTool.h:39
InDet::SiDetectorElementStatus
Definition: SiDetectorElementStatus.h:62
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
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
InDetHierarchy.h
SCT_RODVetoTool::m_badModuleIds
SG::ReadCondHandleKey< IdentifierSet > m_badModuleIds
Definition: SCT_RODVetoTool.h:69
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
SCT_RODVetoTool::~SCT_RODVetoTool
virtual ~SCT_RODVetoTool()=default
SG::ReadCondHandleKey< IdentifierSet >
h
SCT_ID
Definition: SCT_ID.h:68
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
SCT_RODVetoTool::finalize
virtual StatusCode finalize() override
Definition: SCT_RODVetoTool.cxx:45
IdentifierHash
Definition: IdentifierHash.h:38
InDetConditions::DEFAULT
@ DEFAULT
Definition: InDetHierarchy.h:14
SCT_RODVetoTool::getDetectorElementStatus
virtual void getDetectorElementStatus(const EventContext &ctx, InDet::SiDetectorElementStatus &element_status, SG::WriteCondHandle< InDet::SiDetectorElementStatus > *whandle) const override
Definition: SCT_RODVetoTool.cxx:92
SG::WriteCondHandle
Definition: WriteCondHandle.h:26
SCT_RODVetoTool
Definition: SCT_RODVetoTool.h:37
SCT_RODVetoTool::isGood
virtual bool isGood(const Identifier &elementId, InDetConditions::Hierarchy h=InDetConditions::DEFAULT) const override
Is the detector element good?
Definition: SCT_RODVetoTool.cxx:71
IdentifierSet.h