ATLAS Offline Software
Loading...
Searching...
No Matches
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
12
14
15SCT_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
30StatusCode 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}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_INFO(x)
#define ATH_MSG_ALWAYS(x)
Class to test SCT_FlaggedConditionTool (header)
An algorithm that can be simultaneously executed in multiple threads.
IDC like storage for BS errors, TODO, customise implementation further so that we store int rather th...
std::vector< std::pair< size_t, T > > getAll() const
Make a vector of hashes and values, convenient for iteration and other uses.
virtual StatusCode execute(const EventContext &ctx) const override
SCT_FlaggedConditionTestAlg(const std::string &name, ISvcLocator *pSvcLocator)
ToolHandle< ISCT_FlaggedConditionTool > m_flaggedTool
virtual StatusCode initialize() override
virtual StatusCode finalize() override