ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
ForwardDetectors
ALFA
ALFA_EventCnv
ALFA_RawDataByteStreamCnv
src
ALFA_RawDataProviderTool_charge.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
ALFA_RawDataByteStreamCnv/ALFA_RawDataProviderTool_charge.h
"
6
7
using
OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment
;
8
10
// contructor
12
13
ALFA_RawDataProviderTool_charge::ALFA_RawDataProviderTool_charge
14
(
const
std::string&
type
,
const
std::string& name,
const
IInterface* parent)
15
:
AthAlgTool
(
type
,name,parent)
16
{
17
}
18
20
// destructor
22
ALFA_RawDataProviderTool_charge::~ALFA_RawDataProviderTool_charge
(){}
23
25
// initialize() -
27
StatusCode
ALFA_RawDataProviderTool_charge::initialize
() {
28
29
// Retrieve decoder
30
ATH_CHECK
(
m_decoder_charge
.retrieve());
31
32
return
StatusCode::SUCCESS;
33
}
34
35
36
38
// convert() -
40
41
StatusCode
ALFA_RawDataProviderTool_charge::convert_charge
( std::vector<const ROBFragment*>& vecRobs,
ALFA_RawDataContainer_charge
* rdoCont)
42
43
{
44
std::set<uint32_t> robIdSet;
45
46
ATH_MSG_DEBUG
(
"Number of ROB fragments is "
<< vecRobs.size());
47
48
if
(vecRobs.empty())
return
StatusCode::SUCCESS;
49
50
std::vector<const ROBFragment*>::const_iterator rob_it = vecRobs.begin();
51
52
// loop over the ROB fragments
53
for
(; rob_it!=vecRobs.end(); ++rob_it) {
54
55
uint32_t robid = (*rob_it)->rod_source_id();
56
57
58
// check if this ROBFragment was already decoded
59
if
(!robIdSet.insert(robid).second) {
60
ATH_MSG_DEBUG
(
" ROB Fragment with ID "
<< std::hex<<robid<<std::dec <<
" already decoded, skip"
);
61
}
else
{
62
ATH_CHECK
(
m_decoder_charge
->fillCollection(&**rob_it, rdoCont) );
63
ATH_MSG_DEBUG
(
" ROB Fragment with ID "
<< std::hex<<robid<<std::dec <<
" fill Container"
);
64
}
65
}
// loop over the ROB fragments
66
67
return
StatusCode::SUCCESS;
68
}
ALFA_RawDataProviderTool_charge.h
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
ALFA_RawDataContainer_charge
This container provides acces to the PMF RDOs.
Definition
ALFA_RawDataContainer_charge.h:21
ALFA_RawDataProviderTool_charge::convert_charge
StatusCode convert_charge(std::vector< const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment * > &vecRobs, ALFA_RawDataContainer_charge *rdoCont)
this is the main decoding method
Definition
ALFA_RawDataProviderTool_charge.cxx:41
ALFA_RawDataProviderTool_charge::ALFA_RawDataProviderTool_charge
ALFA_RawDataProviderTool_charge(const std::string &type, const std::string &name, const IInterface *parent)
constructor
Definition
ALFA_RawDataProviderTool_charge.cxx:14
ALFA_RawDataProviderTool_charge::initialize
virtual StatusCode initialize() override
initialize
Definition
ALFA_RawDataProviderTool_charge.cxx:27
ALFA_RawDataProviderTool_charge::m_decoder_charge
ToolHandle< ALFA_Decoder_charge > m_decoder_charge
Definition
ALFA_RawDataProviderTool_charge.h:52
ALFA_RawDataProviderTool_charge::~ALFA_RawDataProviderTool_charge
virtual ~ALFA_RawDataProviderTool_charge()
destructor
Definition
ALFA_RawDataProviderTool_charge.cxx:22
AthAlgTool::AthAlgTool
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Definition
AthAlgTool.cxx:16
OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment
eformat::ROBFragment< PointerType > ROBFragment
Definition
RawEvent.h:27
type
Generated on
for ATLAS Offline Software by
1.17.0