ATLAS Offline Software
Loading...
Searching...
No Matches
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
9StatusCode LUCID_RodDecoder::decode(const ROBFragment* robFragment,
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}
#define endmsg
unsigned int getSourceID() const
StatusCode decode(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment *robFragment, std::vector< uint32_t > &data_block, MsgStream &msg) const
const DataType * PointerType
Definition RawEvent.h:25
eformat::ROBFragment< PointerType > ROBFragment
Definition RawEvent.h:27
MsgStream & msg
Definition testRead.cxx:32