ATLAS Offline Software
SCT_MajorityConditionsTool.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 
3 /*
4  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
5 */
6 
13 #ifndef SCT_MajorityConditionsTool_h
14 #define SCT_MajorityConditionsTool_h
15 
16 // Athena includes
19 
23 
24 // Gaudi includes
25 #include "GaudiKernel/ContextSpecificPtr.h"
26 #include "GaudiKernel/EventContext.h"
27 
28 // STL includes
29 #include <string>
30 
38 class SCT_MajorityConditionsTool: public extends<AthAlgTool, ISCT_DetectorLevelConditionsTool> {
39 
40  public:
41  //@name Tool methods
43  SCT_MajorityConditionsTool(const std::string &type, const std::string &name, const IInterface *parent);
44  virtual ~SCT_MajorityConditionsTool() = default;
45  virtual StatusCode initialize() override;
46  virtual StatusCode finalize() override;
48 
50  virtual bool isGood() const override;
51  virtual bool isGood(const EventContext& ctx) const override;
52 
54  virtual bool isGood(int bec) const override;
55  virtual bool isGood(int bec, const EventContext& ctx) const override;
56 
57  private:
58  BooleanProperty m_overall{this, "UseOverall", false, "Use overall value or ECA/B/ECC"};
59  FloatProperty m_majorityFraction{this, "MajorityFraction", 0.9, "Required fraction in majority state"};
60 
61  SG::ReadCondHandleKey<SCT_MajorityCondData> m_condKey{this, "CondKey", "SCT_MajorityCondData", "Majority of SCT status"};
62  const SCT_MajorityCondData* getCondData(const EventContext& ctx) const;
63 };
64 
65 #endif // SCT_MajorityConditionsTool_h
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
SCT_MajorityConditionsTool::m_majorityFraction
FloatProperty m_majorityFraction
Definition: SCT_MajorityConditionsTool.h:59
ParticleGun_SamplingFraction.bec
int bec
Definition: ParticleGun_SamplingFraction.py:89
SCT_MajorityConditionsTool
Definition: SCT_MajorityConditionsTool.h:38
SCT_MajorityCondData
Class for data object used in SCT_MajorityCondAlg and SCT_MajorityConditionsTool.
Definition: SCT_MajorityCondData.h:23
SCT_MajorityConditionsTool::isGood
virtual bool isGood() const override
Is the detector good?
Definition: SCT_MajorityConditionsTool.cxx:53
ISCT_DetectorLevelConditionsTool.h
SCT_MajorityCondData.h
header file for data object for SCT_MajorityCondAlg and SCT_MajorityConditionsTool.
SCT_MajorityConditionsTool::m_overall
BooleanProperty m_overall
Definition: SCT_MajorityConditionsTool.h:58
SCT_MajorityConditionsTool::~SCT_MajorityConditionsTool
virtual ~SCT_MajorityConditionsTool()=default
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_MajorityConditionsTool::initialize
virtual StatusCode initialize() override
Definition: SCT_MajorityConditionsTool.cxx:22
SCT_MajorityConditionsTool::getCondData
const SCT_MajorityCondData * getCondData(const EventContext &ctx) const
Definition: SCT_MajorityConditionsTool.cxx:85
ReadCondHandleKey.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
SG::ReadCondHandleKey< SCT_MajorityCondData >
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
SCT_MajorityConditionsTool::m_condKey
SG::ReadCondHandleKey< SCT_MajorityCondData > m_condKey
Definition: SCT_MajorityConditionsTool.h:61
SCT_MajorityConditionsTool::finalize
virtual StatusCode finalize() override
Definition: SCT_MajorityConditionsTool.cxx:32
SCT_MajorityConditionsTool::SCT_MajorityConditionsTool
SCT_MajorityConditionsTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: SCT_MajorityConditionsTool.cxx:16