ATLAS Offline Software
Loading...
Searching...
No Matches
SCTRawDataProviderTool.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
6
9
11
12// Constructor
13SCTRawDataProviderTool::SCTRawDataProviderTool(const std::string& type, const std::string& name,
14 const IInterface* parent) :
15 base_class(type, name, parent)
16{
17}
18
19// Initialize
21{
22 ATH_CHECK(m_decoder.retrieve());
23
24 return StatusCode::SUCCESS;
25}
26
27
28// Convert method
29StatusCode SCTRawDataProviderTool::convert(std::vector<const ROBFragment*>& vecROBFrags,
30 SCT_RDO_Container& rdoIDCont,
32 DataPool<SCT3_RawData>* dataItemsPool,
33 const EventContext& ctx) const
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_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_DEBUG(x)
InDetRawDataContainer< InDetRawDataCollection< SCT_RDORawData > > SCT_RDO_Container
Handle class for reading from StoreGate.
a typed memory pool that saves time spent allocation small object.
Definition DataPool.h:63
IDC like storage for BS errors, TODO, customise implementation further so that we store int rather th...
std::atomic_int m_decodeErrCount
Number of decode errors encountered in decoding.
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.
virtual StatusCode initialize() override
Initialize.
SCTRawDataProviderTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor.
ToolHandle< ISCT_RodDecoder > m_decoder
Algorithm Tool to decode ROD byte stream into RDO.
eformat::ROBFragment< PointerType > ROBFragment
Definition RawEvent.h:27