ATLAS Offline Software
Loading...
Searching...
No Matches
SCTRawDataProviderTool Class Reference

Athena Algorithm Tool to fill Collections of SCT RDO Containers. More...

#include <SCTRawDataProviderTool.h>

Inheritance diagram for SCTRawDataProviderTool:
Collaboration diagram for SCTRawDataProviderTool:

Public Member Functions

 SCTRawDataProviderTool (const std::string &type, const std::string &name, const IInterface *parent)
 Constructor.
virtual ~SCTRawDataProviderTool ()=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< ISCT_RodDecoderm_decoder {this, "Decoder", "SCT_RodDecoder", "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 SCT RDO Containers.

The class inherits from AthAlgTool and ISCTRawDataProviderTool.

Contains a convert method that fills the SCT RDO Collection.

Definition at line 29 of file SCTRawDataProviderTool.h.

Constructor & Destructor Documentation

◆ SCTRawDataProviderTool()

SCTRawDataProviderTool::SCTRawDataProviderTool ( const std::string & type,
const std::string & name,
const IInterface * parent )

Constructor.

Definition at line 13 of file SCTRawDataProviderTool.cxx.

14 :
15 base_class(type, name, parent)
16{
17}

◆ ~SCTRawDataProviderTool()

virtual SCTRawDataProviderTool::~SCTRawDataProviderTool ( )
virtualdefault

Destructor.

Member Function Documentation

◆ convert()

StatusCode SCTRawDataProviderTool::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 29 of file SCTRawDataProviderTool.cxx.

34{
35 if (vecROBFrags.empty()) return StatusCode::SUCCESS;
36 ATH_MSG_DEBUG("SCTRawDataProviderTool::convert()");
37
38
39 // loop over the ROB fragments
40 StatusCode sc{StatusCode::SUCCESS};
41 for (const ROBFragment* robFrag : vecROBFrags) {
42 // get the ID of this ROB/ROD
43 sc = m_decoder->fillCollection(*robFrag, rdoIDCont, errs, dataItemsPool, ctx);
44 if (sc == StatusCode::FAILURE) {
45 if (m_decodeErrCount <= 100) {
46 if (100 == m_decodeErrCount) {
47 ATH_MSG_ERROR("Too many Problem with SCT Decoding messages, turning message off.");
48 }
49 else {
50 ATH_MSG_ERROR("Problem with SCT ByteStream Decoding!");
51 }
53 }
54 }
55 }
56
57 if (sc == StatusCode::FAILURE) {
58 ATH_MSG_ERROR("There was a problem with SCT ByteStream conversion");
59 return sc;
60 }
61
62 return sc;
63}
#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< ISCT_RodDecoder > 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 SCTRawDataProviderTool::initialize ( )
overridevirtual

Initialize.

Definition at line 20 of file SCTRawDataProviderTool.cxx.

21{
22 ATH_CHECK(m_decoder.retrieve());
23
24 return StatusCode::SUCCESS;
25}
#define ATH_CHECK
Evaluate an expression and check for errors.

Member Data Documentation

◆ m_decodeErrCount

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

Number of decode errors encountered in decoding.

Turning off error message after 100 errors are counted

Definition at line 65 of file SCTRawDataProviderTool.h.

65{0};

◆ m_decoder

ToolHandle<ISCT_RodDecoder> SCTRawDataProviderTool::m_decoder {this, "Decoder", "SCT_RodDecoder", "Decoder"}
private

Algorithm Tool to decode ROD byte stream into RDO.

Definition at line 61 of file SCTRawDataProviderTool.h.

61{this, "Decoder", "SCT_RodDecoder", "Decoder"};

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