ATLAS Offline Software
ITkStripRawDataProviderTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
8 #include "StoreGate/ReadHandle.h"
9 
11 
12 // Initialize
14 {
15  ATH_CHECK(m_decoder.retrieve());
16 
17  return StatusCode::SUCCESS;
18 }
19 
20 
21 // Convert method
22 StatusCode ITkStripRawDataProviderTool::convert(std::vector<const ROBFragment*>& vecROBFrags,
23  SCT_RDO_Container& rdoIDCont,
25  DataPool<SCT3_RawData>* dataItemsPool,
26  const EventContext& ctx) const
27 {
28 
29  ATH_MSG_DEBUG("ITkStripRawDataProviderTool::convert()");
30  if (vecROBFrags.empty()) return StatusCode::SUCCESS;
31  // loop over the ROB fragments
32  StatusCode sc{StatusCode::SUCCESS};
33  for (const ROBFragment* robFrag : vecROBFrags) {
34  // get the ID of this ROB/ROD
35  sc = m_decoder->fillCollection(*robFrag, rdoIDCont, errs, dataItemsPool, ctx);
36  if (sc == StatusCode::FAILURE) {
37  if (m_decodeErrCount <= 100) {
38  if (100 == m_decodeErrCount) {
39  ATH_MSG_ERROR("Too many Problem with ITk Strip Decoding messages, turning message off.");
40  }
41  else {
42  ATH_MSG_ERROR("Problem with ITk Strip ByteStream Decoding!");
43  }
45  }
46  }
47  }
48 
49  if (sc == StatusCode::FAILURE) {
50  ATH_MSG_ERROR("There was a problem with ITk Strip ByteStream conversion");
51  return sc;
52  }
53 
54  return sc;
55 }
IDCInDetBSErrContainer
IDC like storage for BS errors, TODO, customise implementation further so that we store int rather th...
Definition: IDCInDetBSErrContainer.h:19
InDetRawDataContainer
Definition: InDetRawDataContainer.h:27
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
ITkStripRawDataProviderTool::m_decoder
ToolHandle< IITkStripsRodDecoder > m_decoder
Algorithm Tool to decode ROD byte stream into RDO.
Definition: ITkStripRawDataProviderTool.h:58
eformat::ROBFragment
Definition: L1CaloBsDecoderUtil.h:12
IITkStripsRodDecoder.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
ITkStripRawDataProviderTool::m_decodeErrCount
std::atomic_int m_decodeErrCount
Number of decode errors encountered in decoding.
Definition: ITkStripRawDataProviderTool.h:62
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
ITkStripRawDataProviderTool::initialize
virtual StatusCode initialize() override
Initialize.
Definition: ITkStripRawDataProviderTool.cxx:13
ITkStripRawDataProviderTool.h
ITkStripRawDataProviderTool::convert
virtual StatusCode convert(std::vector< const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment * > &vecROBFrags, SCT_RDO_Container &rdoIDCont, IDCInDetBSErrContainer &errs, DataPool< SCT3_RawData > *dataItemsPool, const EventContext &ctx) const override
Main decoding method.
Definition: ITkStripRawDataProviderTool.cxx:22
OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment
eformat::ROBFragment< PointerType > ROBFragment
Definition: RawEvent.h:27
DataPool
a typed memory pool that saves time spent allocation small object. This is typically used by containe...
Definition: DataPool.h:63
ReadHandle.h
Handle class for reading from StoreGate.