ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
ITkStripRawDataProviderTool Class Reference

Athena Algorithm Tool to fill Collections of ITk Strips RDO Containers. More...

#include <ITkStripRawDataProviderTool.h>

Inheritance diagram for ITkStripRawDataProviderTool:
Collaboration diagram for ITkStripRawDataProviderTool:

Public Member Functions

virtual ~ITkStripRawDataProviderTool ()=default
 Destructor. More...
 
virtual StatusCode initialize () override
 Initialize. More...
 
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. More...
 

Private Attributes

ToolHandle< IITkStripsRodDecoderm_decoder {this, "Decoder", "ITkStripsRodDecoder", "Decoder"}
 Algorithm Tool to decode ROD byte stream into RDO. More...
 
std::atomic_int m_decodeErrCount {0}
 Number of decode errors encountered in decoding. More...
 

Detailed Description

Athena Algorithm Tool to fill Collections of ITk Strips RDO Containers.

The class inherits from AthAlgTool and IITkStripRawDataProviderTool.

Contains a convert method that fills the ITk Strips RDO Collection.

Definition at line 27 of file ITkStripRawDataProviderTool.h.

Constructor & Destructor Documentation

◆ ~ITkStripRawDataProviderTool()

virtual ITkStripRawDataProviderTool::~ITkStripRawDataProviderTool ( )
virtualdefault

Destructor.

Member Function Documentation

◆ convert()

StatusCode ITkStripRawDataProviderTool::convert ( std::vector< const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment * > &  vecROBFrags,
SCT_RDO_Container rdoIDCont,
IDCInDetBSErrContainer errs,
DataPool< SCT3_RawData > *  dataItemsPool,
const EventContext &  ctx 
) const
overridevirtual

Main decoding method.

Loops over ROB fragments, get ROB/ROD ID, then decode if not allready decoded.

Parameters
vecROBFragsVector containing ROB framgents.
rdoIDContRDO ID Container to be filled.
errsByte stream error container.
ctxEventContext of the event

Definition at line 22 of file ITkStripRawDataProviderTool.cxx.

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 }

◆ initialize()

StatusCode ITkStripRawDataProviderTool::initialize ( )
overridevirtual

Initialize.

Definition at line 13 of file ITkStripRawDataProviderTool.cxx.

14 {
15  ATH_CHECK(m_decoder.retrieve());
16 
17  return StatusCode::SUCCESS;
18 }

Member Data Documentation

◆ m_decodeErrCount

std::atomic_int ITkStripRawDataProviderTool::m_decodeErrCount {0}
mutableprivate

Number of decode errors encountered in decoding.

Turning off error message after 100 errors are counted

Definition at line 62 of file ITkStripRawDataProviderTool.h.

◆ m_decoder

ToolHandle<IITkStripsRodDecoder> ITkStripRawDataProviderTool::m_decoder {this, "Decoder", "ITkStripsRodDecoder", "Decoder"}
private

Algorithm Tool to decode ROD byte stream into RDO.

Definition at line 58 of file ITkStripRawDataProviderTool.h.


The documentation for this class was generated from the following files:
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
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