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()) {
200 return StatusCode::SUCCESS;
210 ATH_MSG_DEBUG(
"executing convert() from ROBFragment to RDO");
212 uint32_t rodId = rob->rob_source_id();
215 <<
" ID found: " << MSG::hex
216 << rodId << MSG::dec);
218 bool idMatch =
false;
228 bool error_rob(
false);
229 bool error_rod(
false);
231 if (rob->check_rob()) {
234 }
catch (std::exception
const& ex) {
239 if (rob->check_rod()) {
242 }
catch (std::exception
const& ex) {
250 <<
" rod_version 0x" << rob->rod_version() <<
" \n"
251 <<
" rod_run_no 0x" << MSG::dec
252 << rob->rod_run_no() <<
" \n"
253 <<
" rod_lvl1_id 0x" << MSG::hex
254 << rob->rod_lvl1_id() <<
" \n"
255 <<
" rod_bc_id 0x" << rob->rod_bc_id() <<
" \n"
256 <<
" rod_lvl1_trigger_type 0x" << rob->rod_lvl1_trigger_type()
258 <<
" nchildren 0x" << rob->nchildren() <<
" \n"
263 const uint32_t nstatus = rob->rod_nstatus();
265 std::vector<uint32_t> vStatusWords;
266 vStatusWords.reserve(nstatus);
268 for (uint32_t i = 0; i < nstatus; ++i, ++it_status) {
269 vStatusWords.push_back(
static_cast<uint32_t
>(*it_status));
271 << *it_status << MSG::dec);
278 bool error_status(
false);
279 if (vStatusWords.size() == 0) {
282 if (vStatusWords.size() > 0 && vStatusWords.at(0) != 0) {
283 ATH_MSG_WARNING(
"Non-zero first status word, payload may not be valid");
289 const uint32_t ndata = rob->rod_ndata();
293 std::vector<uint32_t> vDataWords;
294 vDataWords.reserve(ndata);
295 for (uint32_t i = 0; i < ndata; ++i, ++it_data) {
296 vDataWords.push_back(
static_cast<uint32_t
>(*it_data));
298 << *it_data << MSG::dec);
303 result->setDataWords(std::move(vDataWords));
304 result->setStatusWords(std::move(vStatusWords));
314 result->setSourceID(rodId);
316 return StatusCode::SUCCESS;
319 ATH_MSG_ERROR(
"Wrong ROD ID found in the L1Topo ROB fragment!");
320 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