ATLAS Offline Software
Loading...
Searching...
No Matches
ALFA_RawDataProviderTool.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
6
8
10// contructor
12
14(const std::string& type, const std::string& name, const IInterface* parent)
15: AthAlgTool(type,name,parent)
16{
17}
18
20// destructor
23
25// initialize() -
28
29 // Retrieve decoder
30 ATH_CHECK( m_decoder.retrieve() );
31
32 return StatusCode::SUCCESS;
33}
34
35
36
38// convert() -
40
41StatusCode ALFA_RawDataProviderTool::convert( std::vector<const ROBFragment*>& vecRobs, ALFA_RawDataContainer* 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 StatusCode sc = m_decoder->fillCollection(&**rob_it, rdoCont);
63 if (sc.isFailure()) return sc;
64 ATH_MSG_DEBUG(" ROB Fragment with ID " << std::hex<<robid<<std::dec << " fill Container");
65 }
66 }// loop over the ROB fragments
67
68 return StatusCode::SUCCESS;
69
70}
71
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x)
static Double_t sc
This container provides acces to the PMF RDOs.
ToolHandle< ALFA_Decoder > m_decoder
StatusCode convert(std::vector< const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment * > &vecRobs, ALFA_RawDataContainer *rdoCont)
this is the main decoding method
ALFA_RawDataProviderTool(const std::string &type, const std::string &name, const IInterface *parent)
constructor
virtual ~ALFA_RawDataProviderTool()
destructor
virtual StatusCode initialize() override
initialize
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
eformat::ROBFragment< PointerType > ROBFragment
Definition RawEvent.h:27