ATLAS Offline Software
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)
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 
41 StatusCode 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 
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
ALFA_RawDataProviderTool.h
ALFA_RawDataProviderTool::m_decoder
ToolHandle< ALFA_Decoder > m_decoder
Definition: ALFA_RawDataProviderTool.h:50
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
ALFA_RawDataProviderTool::~ALFA_RawDataProviderTool
virtual ~ALFA_RawDataProviderTool()
destructor
Definition: ALFA_RawDataProviderTool.cxx:22
ALFA_RawDataProviderTool::initialize
virtual StatusCode initialize() override
initialize
Definition: ALFA_RawDataProviderTool.cxx:27
ALFA_RawDataProviderTool::convert
StatusCode convert(std::vector< const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment * > &vecRobs, ALFA_RawDataContainer *rdoCont)
this is the main decoding method
Definition: ALFA_RawDataProviderTool.cxx:41
ALFA_RawDataProviderTool::ALFA_RawDataProviderTool
ALFA_RawDataProviderTool(const std::string &type, const std::string &name, const IInterface *parent)
constructor
Definition: ALFA_RawDataProviderTool.cxx:14
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment
eformat::ROBFragment< PointerType > ROBFragment
Definition: RawEvent.h:27
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
ALFA_RawDataContainer
This container provides acces to the PMF RDOs.
Definition: ALFA_RawDataContainer.h:21
AthAlgTool
Definition: AthAlgTool.h:26