ATLAS Offline Software
SCT_FlaggedConditionTestAlg.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
14 
15 SCT_FlaggedConditionTestAlg::SCT_FlaggedConditionTestAlg(const std::string& name, ISvcLocator* pSvcLocator) :
16  AthReentrantAlgorithm(name, pSvcLocator) {
17 }
18 
19 //Initialize
21  ATH_MSG_INFO("Calling initialize");
22 
23  // Retrieve flagged condition tool
24  ATH_CHECK(m_flaggedTool.retrieve());
25 
26  return StatusCode::SUCCESS;
27 }
28 
29 //Execute
30 StatusCode SCT_FlaggedConditionTestAlg::execute(const EventContext& ctx) const {
31  ATH_MSG_INFO("Calling execute");
32 
33  ATH_MSG_ALWAYS("------------------------------------------------------------");
34  ATH_MSG_ALWAYS(" numBadIds " << m_flaggedTool->numBadIds(ctx));
35  const IDCInDetBSErrContainer* badIds{m_flaggedTool->getBadIds(ctx)};
36  for (const std::pair<const size_t, const IDCInDetBSErrContainer::ErrorCode> badId : badIds->getAll()) {
37  ATH_MSG_ALWAYS(" Wafer hash " << badId.first << " reason " << m_flaggedTool->details(badId.first));
38  }
39 
40  return StatusCode::SUCCESS;
41 }
42 
43 //Finalize
45  ATH_MSG_INFO("Calling finalize");
46  return StatusCode::SUCCESS;
47 }
SCT_FlaggedConditionTestAlg::initialize
virtual StatusCode initialize() override
Definition: SCT_FlaggedConditionTestAlg.cxx:20
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
IDCInDetBSErrContainer
IDC like storage for BS errors, TODO, customise implementation further so that we store int rather th...
Definition: IDCInDetBSErrContainer.h:19
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
SCT_FlaggedConditionTestAlg::SCT_FlaggedConditionTestAlg
SCT_FlaggedConditionTestAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: SCT_FlaggedConditionTestAlg.cxx:15
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_ALWAYS
#define ATH_MSG_ALWAYS(x)
Definition: AthMsgStreamMacros.h:35
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
SCT_FlaggedConditionTestAlg::m_flaggedTool
ToolHandle< ISCT_FlaggedConditionTool > m_flaggedTool
Definition: SCT_FlaggedConditionTestAlg.h:38
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
SCT_FlaggedConditionTestAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition: SCT_FlaggedConditionTestAlg.cxx:30
SCT_FlaggedConditionTestAlg.h
Class to test SCT_FlaggedConditionTool (header)
SCT_FlaggedConditionTestAlg::finalize
virtual StatusCode finalize() override
Definition: SCT_FlaggedConditionTestAlg.cxx:44