37 const std::string& name,
38 const IInterface* parent)
42 declareInterface<L1TopoByteStreamTool>(
this);
44 "ROB fragment source identifiers - overrides decodeDAQROBs "
48 "add standard DAQ ROBs to list of ROBs to decode; default true");
51 "add standard ROI ROBs to list of ROBs to decode; default false");
68 "ROBSourceIDs property is set: this overrides decodeDAQROBs and "
76 << std::dec << std::noshowbase);
79 return AlgTool::initialize();
87 return AlgTool::finalize();
103 for (
unsigned int slink : {0, 1, 2}) {
104 unsigned int roiOrDaq = 0;
113 for (
unsigned int module :
115 const uint32_t moduleId =
117 eformat::helper::SourceIdentifier sourceId(eformat::TDAQ_CALO_TOPO_PROC, moduleId);
132 ATH_MSG_DEBUG(
"executing convert() from RDO to ROBFragment");
143 uint16_t minorVersion = 0;
151 const uint32_t rodId =
m_srcIdMap->getRodID();
160 const std::vector<uint32_t>& vDataWords = result->getDataWords();
161 std::vector<uint32_t>::const_iterator it = vDataWords.begin();
162 std::vector<uint32_t>::const_iterator end = vDataWords.end();
163 for (; it != end; ++it) {
164 theROD->push_back(*it);
169 ATH_MSG_DEBUG(
"Now filling the event with the L1Topo fragment");
172 return StatusCode::SUCCESS;
176 const std::string& sgKey,
184 if (robFrags.size() == 0) {
186 return StatusCode::SUCCESS;
189 for (
auto it : robFrags) {
192 if (
sc.isFailure()) {
197 result->push_back(rdo);
202 return StatusCode::SUCCESS;
212 ATH_MSG_DEBUG(
"executing convert() from ROBFragment to RDO");
214 uint32_t rodId = rob->rob_source_id();
217 <<
" ID found: " << MSG::hex
218 << rodId << MSG::dec);
220 bool idMatch =
false;
230 bool error_rob(
false);
231 bool error_rod(
false);
233 if (rob->check_rob()) {
236 }
catch (std::exception
const& ex) {
241 if (rob->check_rod()) {
244 }
catch (std::exception
const& ex) {
252 <<
" rod_version 0x" << rob->rod_version() <<
" \n"
253 <<
" rod_run_no 0x" << MSG::dec
254 << rob->rod_run_no() <<
" \n"
255 <<
" rod_lvl1_id 0x" << MSG::hex
256 << rob->rod_lvl1_id() <<
" \n"
257 <<
" rod_bc_id 0x" << rob->rod_bc_id() <<
" \n"
258 <<
" rod_lvl1_trigger_type 0x" << rob->rod_lvl1_trigger_type()
260 <<
" nchildren 0x" << rob->nchildren() <<
" \n"
265 const uint32_t nstatus = rob->rod_nstatus();
267 std::vector<uint32_t> vStatusWords;
268 vStatusWords.reserve(nstatus);
270 for (uint32_t i = 0; i < nstatus; ++i, ++it_status) {
271 vStatusWords.push_back(
static_cast<uint32_t
>(*it_status));
273 << *it_status << MSG::dec);
280 bool error_status(
false);
281 if (vStatusWords.size() == 0) {
284 if (vStatusWords.size() > 0 && vStatusWords.at(0) != 0) {
285 ATH_MSG_WARNING(
"Non-zero first status word, payload may not be valid");
291 const uint32_t ndata = rob->rod_ndata();
295 std::vector<uint32_t> vDataWords;
296 vDataWords.reserve(ndata);
297 for (uint32_t i = 0; i < ndata; ++i, ++it_data) {
298 vDataWords.push_back(
static_cast<uint32_t
>(*it_data));
300 << *it_data << MSG::dec);
305 result->setDataWords(std::move(vDataWords));
306 result->setStatusWords(std::move(vStatusWords));
316 result->setSourceID(rodId);
318 return StatusCode::SUCCESS;
321 ATH_MSG_ERROR(
"Wrong ROD ID found in the L1Topo ROB fragment!");
322 return StatusCode::FAILURE;
const boost::regex re(r_e)
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
#define CHECK(...)
Evaluate an expression and check for errors.
Defines the ROB data entity. The ROB data is an abstract entity that is used to decouple the raw even...
ROBData_T< OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment, OFFLINE_FRAGMENTS_NAMESPACE::PointerType > ROBData
OFFLINE_FRAGMENTS_NAMESPACE_WRITE::FullEventFragment RawEventWrite
data type for writing raw event
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Template class for assembling a full atlas raw event from subfragments.
void setRodMinorVersion(uint16_t m)
change the ROD minor version
void fill(RawEventWrite *re, MsgStream &log)
Fill the FullEventFragment with all the ROD data stored in this.
void setDetEvtType(uint32_t m)
change Detector Event Type
std::vector< uint32_t > RODDATA
ROD data as a vector of unsigned int.
RODDATA * getRodData(uint32_t id)
get a block of ROD data
std::vector< const ROBF * > VROBFRAG
Container of L1TopoRDOs (standard Athena boilerplate).
The class that represents the raw data received from an L1Topo board.
This class provides conversion between Lower level Source ID to higher level source ID for L1Topo Byt...
Represents the L1Topo module ID, with decoder and encoder.
uint16_t id() const
access method
const DataType * PointerType