ATLAS Offline Software
SCT_ByteStreamErrorsTestAlg.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_ByteStreamErrorsTestAlg::SCT_ByteStreamErrorsTestAlg(const std::string& name, ISvcLocator* pSvcLocator) :
16  AthReentrantAlgorithm(name, pSvcLocator) {
17 }
18 
19 //Initialize
21  ATH_MSG_INFO("Calling initialize");
22 
23  // Retrieve bytestream error tool
24  ATH_CHECK(m_bsErrTool.retrieve());
25 
26  return StatusCode::SUCCESS;
27 }
28 
29 //Execute
30 StatusCode SCT_ByteStreamErrorsTestAlg::execute(const EventContext& ctx) const {
31  ATH_MSG_INFO("Calling execute");
32 
33  ATH_MSG_ALWAYS("------------------------------------------------------------");
34  for (unsigned int iErr{0}; iErr<SCT_ByteStreamErrors::NUM_ERROR_TYPES; iErr++) {
35  ATH_MSG_ALWAYS("BS Error index: " << iErr << " type " << SCT_ByteStreamErrors::ErrorTypeDescription[iErr].c_str());
36  const std::set<IdentifierHash> errorSet = m_bsErrTool->getErrorSet(iErr, ctx);
37  for (const IdentifierHash& hash: errorSet) {
38  ATH_MSG_ALWAYS(" Wafer hash : " << hash);
39  }
40  ATH_MSG_ALWAYS("------------------------------------------------------------");
41  }
42 
43  return StatusCode::SUCCESS;
44 }
45 
46 //Finalize
48  ATH_MSG_INFO("Calling finalize");
49  return StatusCode::SUCCESS;
50 }
SCT_ByteStreamErrorsTestAlg::SCT_ByteStreamErrorsTestAlg
SCT_ByteStreamErrorsTestAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: SCT_ByteStreamErrorsTestAlg.cxx:15
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
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_ByteStreamErrorsTestAlg::initialize
virtual StatusCode initialize() override
Definition: SCT_ByteStreamErrorsTestAlg.cxx:20
SCT_ByteStreamErrorsTestAlg::finalize
virtual StatusCode finalize() override
Definition: SCT_ByteStreamErrorsTestAlg.cxx:47
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
CaloCondBlobAlgs_fillNoiseFromASCII.hash
dictionary hash
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:109
SCT_FlaggedCondEnum::NUM_ERROR_TYPES
@ NUM_ERROR_TYPES
Definition: SCT_FlaggedCondEnum.h:28
SCT_ByteStreamErrorsTestAlg::m_bsErrTool
ToolHandle< ISCT_ByteStreamErrorsTool > m_bsErrTool
Definition: SCT_ByteStreamErrorsTestAlg.h:38
SCT_ByteStreamErrorsTestAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition: SCT_ByteStreamErrorsTestAlg.cxx:30
SCT_ByteStreamErrorsTestAlg.h
Class to test SCT_ByteStreamErrorsTool (header)
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25