ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetEventCnv
ITkStripsByteStreamCnv
src
ITkStripRawDataProviderTool.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
ITkStripRawDataProviderTool.h
"
6
7
#include "
ITkStripsByteStreamCnv/IITkStripsRodDecoder.h
"
8
#include "
StoreGate/ReadHandle.h
"
9
10
using
OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment
;
11
12
// Initialize
13
StatusCode
ITkStripRawDataProviderTool::initialize
()
14
{
15
ATH_CHECK
(
m_decoder
.retrieve());
16
17
return
StatusCode::SUCCESS;
18
}
19
20
21
// Convert method
22
StatusCode
ITkStripRawDataProviderTool::convert
(std::vector<const ROBFragment*>& vecROBFrags,
23
SCT_RDO_Container
& rdoIDCont,
24
IDCInDetBSErrContainer
& errs,
25
DataPool<SCT3_RawData>
* dataItemsPool,
26
const
EventContext& ctx)
const
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
}
45
m_decodeErrCount
++;
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
}
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
IITkStripsRodDecoder.h
ITkStripRawDataProviderTool.h
sc
static Double_t sc
Definition
LArPhysWaveHECTool.cxx:37
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
ITkStripRawDataProviderTool::m_decodeErrCount
std::atomic_int m_decodeErrCount
Number of decode errors encountered in decoding.
Definition
ITkStripRawDataProviderTool.h:62
ITkStripRawDataProviderTool::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
ITkStripRawDataProviderTool.cxx:22
ITkStripRawDataProviderTool::initialize
virtual StatusCode initialize() override
Initialize.
Definition
ITkStripRawDataProviderTool.cxx:13
ITkStripRawDataProviderTool::m_decoder
ToolHandle< IITkStripsRodDecoder > m_decoder
Algorithm Tool to decode ROD byte stream into RDO.
Definition
ITkStripRawDataProviderTool.h:58
OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment
eformat::ROBFragment< PointerType > ROBFragment
Definition
RawEvent.h:27
Generated on
for ATLAS Offline Software by
1.17.0