ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetEventCnv
SCT_RawDataByteStreamCnv
src
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
5
#include "
SCTRawDataProviderTool.h
"
6
7
#include "
SCT_RawDataByteStreamCnv/ISCT_RodDecoder.h
"
8
#include "
StoreGate/ReadHandle.h
"
9
10
using
OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment
;
11
12
// Constructor
13
SCTRawDataProviderTool::SCTRawDataProviderTool
(
const
std::string&
type
,
const
std::string& name,
14
const
IInterface* parent) :
15
base_class(
type
, name, parent)
16
{
17
}
18
19
// Initialize
20
StatusCode
SCTRawDataProviderTool::initialize
()
21
{
22
ATH_CHECK
(
m_decoder
.retrieve());
23
24
return
StatusCode::SUCCESS;
25
}
26
27
28
// Convert method
29
StatusCode
SCTRawDataProviderTool::convert
(std::vector<const ROBFragment*>& vecROBFrags,
30
SCT_RDO_Container
& rdoIDCont,
31
IDCInDetBSErrContainer
& errs,
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
}
52
m_decodeErrCount
++;
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
}
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition
AthMsgStreamMacros.h:33
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
ISCT_RodDecoder.h
sc
static Double_t sc
Definition
LArPhysWaveHECTool.cxx:37
SCTRawDataProviderTool.h
SCT_RDO_Container
InDetRawDataContainer< InDetRawDataCollection< SCT_RDORawData > > SCT_RDO_Container
Definition
SCT_RDO_Container.h:23
ReadHandle.h
Handle class for reading from StoreGate.
DataPool
a typed memory pool that saves time spent allocation small object.
Definition
DataPool.h:63
IDCInDetBSErrContainer
IDC like storage for BS errors, TODO, customise implementation further so that we store int rather th...
Definition
IDCInDetBSErrContainer.h:19
SCTRawDataProviderTool::m_decodeErrCount
std::atomic_int m_decodeErrCount
Number of decode errors encountered in decoding.
Definition
SCTRawDataProviderTool.h:65
SCTRawDataProviderTool::convert
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.
Definition
SCTRawDataProviderTool.cxx:29
SCTRawDataProviderTool::initialize
virtual StatusCode initialize() override
Initialize.
Definition
SCTRawDataProviderTool.cxx:20
SCTRawDataProviderTool::SCTRawDataProviderTool
SCTRawDataProviderTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor.
Definition
SCTRawDataProviderTool.cxx:13
SCTRawDataProviderTool::m_decoder
ToolHandle< ISCT_RodDecoder > m_decoder
Algorithm Tool to decode ROD byte stream into RDO.
Definition
SCTRawDataProviderTool.h:61
OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment
eformat::ROBFragment< PointerType > ROBFragment
Definition
RawEvent.h:27
type
Generated on
for ATLAS Offline Software by
1.17.0