ATLAS Offline Software
SCT_MajorityConditionsTestAlg.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3 */
4 
15 
16 //Athena includes
17 #include "Identifier/Identifier.h"
18 
19 SCT_MajorityConditionsTestAlg::SCT_MajorityConditionsTestAlg(const std::string& name, ISvcLocator* pSvcLocator) :
20  AthReentrantAlgorithm(name, pSvcLocator)
21 {
22 }
23 
24 //Initialize
26  ATH_MSG_INFO("Calling initialize");
27 
28  // Retrieve link masking service
29  ATH_CHECK(m_majorityTool.retrieve());
30 
31  return StatusCode::SUCCESS;
32 }
33 
34 //Execute
35 StatusCode SCT_MajorityConditionsTestAlg::execute(const EventContext& ctx) const {
36  ATH_MSG_INFO("Calling execute");
37 
38  ATH_MSG_INFO("Detector is " << (m_majorityTool->isGood(ctx) ? "GOOD" : "BAD"));
39  ATH_MSG_INFO("ECC is " << (m_majorityTool->isGood(-2, ctx) ? "GOOD" : "BAD"));
40  ATH_MSG_INFO("Barrel is " << (m_majorityTool->isGood(0, ctx) ? "GOOD" : "BAD"));
41  ATH_MSG_INFO("ECA is " << (m_majorityTool->isGood(2, ctx) ? "GOOD" : "BAD"));
42 
43  return StatusCode::SUCCESS;
44 }
45 
46 
47 //Finalize
49  ATH_MSG_INFO("Calling finalize");
50  return StatusCode::SUCCESS;
51 }
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
SCT_MajorityConditionsTestAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition: SCT_MajorityConditionsTestAlg.cxx:35
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
SCT_MajorityConditionsTestAlg::m_majorityTool
ToolHandle< ISCT_DetectorLevelConditionsTool > m_majorityTool
Definition: SCT_MajorityConditionsTestAlg.h:42
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
SCT_MajorityConditionsTestAlg::SCT_MajorityConditionsTestAlg
SCT_MajorityConditionsTestAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: SCT_MajorityConditionsTestAlg.cxx:19
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
SCT_MajorityConditionsTestAlg::initialize
virtual StatusCode initialize() override
Definition: SCT_MajorityConditionsTestAlg.cxx:25
SCT_MajorityConditionsTestAlg::finalize
virtual StatusCode finalize() override
Definition: SCT_MajorityConditionsTestAlg.cxx:48
SCT_MajorityConditionsTestAlg.h