ATLAS Offline Software
Loading...
Searching...
No Matches
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.
virtual StatusCode initialize () override
 Initialize.
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.

Private Attributes

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

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 ATH_MSG_DEBUG("vecROBFrags size: " << vecROBFrags.size());
34 for (const ROBFragment* robFrag : vecROBFrags) {
35 // get the ID of this ROB/ROD
36 sc = m_decoder->fillCollection(*robFrag, rdoIDCont, errs, dataItemsPool, ctx);
37 if (sc == StatusCode::FAILURE) {
38 if (m_decodeErrCount <= 100) {
39 if (100 == m_decodeErrCount) {
40 ATH_MSG_ERROR("Too many Problem with ITk Strip Decoding messages, turning message off.");
41 }
42 else {
43 ATH_MSG_ERROR("Problem with ITk Strip ByteStream Decoding!");
44 }
46 }
47 }
48 }
49
50 if (sc == StatusCode::FAILURE) {
51 ATH_MSG_ERROR("There was a problem with ITk Strip ByteStream conversion");
52 return sc;
53 }
54
55 return sc;
56}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_DEBUG(x)
static Double_t sc
std::atomic_int m_decodeErrCount
Number of decode errors encountered in decoding.
ToolHandle< IITkStripsRodDecoder > m_decoder
Algorithm Tool to decode ROD byte stream into RDO.
::StatusCode StatusCode
StatusCode definition for legacy code.
eformat::ROBFragment< PointerType > ROBFragment
Definition RawEvent.h:27

◆ 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}
#define ATH_CHECK
Evaluate an expression and check for errors.

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.

62{0};

◆ 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.

58{this, "Decoder", "ITkStripsRodDecoder", "Decoder"};

The documentation for this class was generated from the following files: