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;
183 if (robFrags.size() == 0) {
185 return StatusCode::SUCCESS;
188 for (
auto it : robFrags) {
191 if (
sc.isFailure()) {
201 return StatusCode::SUCCESS;
211 ATH_MSG_DEBUG(
"executing convert() from ROBFragment to RDO");
213 uint32_t rodId = rob->rob_source_id();
216 <<
" ID found: " << MSG::hex
217 << rodId << MSG::dec);
219 bool idMatch =
false;
229 bool error_rob(
false);
230 bool error_rod(
false);
232 if (rob->check_rob()) {
235 }
catch (std::exception
const& ex) {
240 if (rob->check_rod()) {
243 }
catch (std::exception
const& ex) {
251 <<
" rod_version 0x" << rob->rod_version() <<
" \n"
252 <<
" rod_run_no 0x" << MSG::dec
253 << rob->rod_run_no() <<
" \n"
254 <<
" rod_lvl1_id 0x" << MSG::hex
255 << rob->rod_lvl1_id() <<
" \n"
256 <<
" rod_bc_id 0x" << rob->rod_bc_id() <<
" \n"
257 <<
" rod_lvl1_trigger_type 0x" << rob->rod_lvl1_trigger_type()
259 <<
" nchildren 0x" << rob->nchildren() <<
" \n"
264 const uint32_t nstatus = rob->rod_nstatus();
266 std::vector<uint32_t> vStatusWords;
267 vStatusWords.reserve(nstatus);
269 for (uint32_t i = 0; i < nstatus; ++i, ++it_status) {
270 vStatusWords.push_back(
static_cast<uint32_t
>(*it_status));
272 << *it_status << MSG::dec);
279 bool error_status(
false);
280 if (vStatusWords.size() == 0) {
283 if (vStatusWords.size() > 0 && vStatusWords.at(0) != 0) {
284 ATH_MSG_WARNING(
"Non-zero first status word, payload may not be valid");
290 const uint32_t ndata = rob->rod_ndata();
294 std::vector<uint32_t> vDataWords;
295 vDataWords.reserve(ndata);
296 for (uint32_t i = 0; i < ndata; ++i, ++it_data) {
297 vDataWords.push_back(
static_cast<uint32_t
>(*it_data));
299 << *it_data << MSG::dec);
304 result->setDataWords(std::move(vDataWords));
305 result->setStatusWords(std::move(vStatusWords));
315 result->setSourceID(rodId);
317 return StatusCode::SUCCESS;
320 ATH_MSG_ERROR(
"Wrong ROD ID found in the L1Topo ROB fragment!");
321 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