ATLAS Offline Software
LUCID_RodDecoder.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 
8 
10  std::vector<uint32_t>& data_block,
11  MsgStream& msg) const {
12 
13  if (msg.level() <= MSG::DEBUG) {
14  msg << MSG::DEBUG << " LUCID_RodDecoder::decode" << endmsg;
15  }
16 
17  uint32_t ROD_source_ID = robFragment->rod_source_id();
18  uint32_t ROD_ndata = robFragment->rod_ndata();
19  uint32_t ROD_nstatus = robFragment->rod_nstatus();
20 
21  if (msg.level() <= MSG::DEBUG) {
22  msg << MSG::DEBUG
23  << std::hex
24  << " ROD_source_ID: " << ROD_source_ID << endmsg
25  << " getSourceID(): " << getSourceID() << endmsg
26  << " ROD_ndata: " << ROD_ndata << endmsg
27  << " ROD_nstatus: " << ROD_nstatus << endmsg
28  << std::dec;
29  }
30 
31  if (ROD_source_ID != getSourceID() ) return StatusCode::FAILURE;
32  if (ROD_ndata != 4 && ROD_ndata != 12) return StatusCode::FAILURE;
33  if (ROD_nstatus != 1 ) return StatusCode::FAILURE;
34 
35  if (msg.level() <= MSG::DEBUG) {
36  msg << MSG::DEBUG << " Filling the data_block " << endmsg;
37  }
38 
41 
42  robFragment->rod_data (vintData);
43  robFragment->rod_status(vintStat);
44 
45  for (uint32_t dataword_it = 0; dataword_it < ROD_ndata; ++dataword_it)
46  data_block.push_back(vintData[dataword_it]);
47 
48  for (uint32_t dataword_it = 0; dataword_it < ROD_nstatus; ++dataword_it)
49  data_block.push_back(vintStat[dataword_it]);
50 
51  return StatusCode::SUCCESS;
52 }
LUCID_RodDecoder::decode
StatusCode decode(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment *robFragment, std::vector< uint32_t > &data_block, MsgStream &msg) const
Definition: LUCID_RodDecoder.cxx:9
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
OFFLINE_FRAGMENTS_NAMESPACE::PointerType
const DataType * PointerType
Definition: RawEvent.h:25
eformat::ROBFragment
Definition: L1CaloBsDecoderUtil.h:12
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LUCID_RodDecoder.h
OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment
eformat::ROBFragment< PointerType > ROBFragment
Definition: RawEvent.h:27
DEBUG
#define DEBUG
Definition: page_access.h:11
LUCID_RodDecoder::getSourceID
unsigned int getSourceID() const
Definition: LUCID_RodDecoder.h:20
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7