ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
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. More...
 
virtual ~SCTRawDataProviderTool ()=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< ISCT_RodDecoderm_decoder {this, "Decoder", "SCT_RodDecoder", "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 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 }

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

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.

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


The documentation for this class was generated from the following files:
SCTRawDataProviderTool::m_decodeErrCount
std::atomic_int m_decodeErrCount
Number of decode errors encountered in decoding.
Definition: SCTRawDataProviderTool.h:65
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
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
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
SCTRawDataProviderTool::m_decoder
ToolHandle< ISCT_RodDecoder > m_decoder
Algorithm Tool to decode ROD byte stream into RDO.
Definition: SCTRawDataProviderTool.h:61