|
ATLAS Offline Software
|
Go to the documentation of this file.
21 static const InterfaceID IID_IL1TopoByteStreamTool(
"L1TopoByteStreamTool", 1,
29 return IID_IL1TopoByteStreamTool;
37 const std::string&
name,
41 m_robDataProvider(
"ROBDataProviderSvc",
"L1TopoByteStreamTool") {
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);
103 for (
unsigned int slink : {0, 1, 2}) {
104 unsigned int roiOrDaq = 0;
113 for (
unsigned int module :
117 eformat::helper::SourceIdentifier sourceId(eformat::TDAQ_CALO_TOPO_PROC, moduleId);
132 ATH_MSG_DEBUG(
"executing convert() from RDO to ROBFragment");
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();
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()) {
239 if (rob->check_rod()) {
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);
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;
The class that represents the raw data received from an L1Topo board.
OFFLINE_FRAGMENTS_NAMESPACE_WRITE::FullEventFragment RawEventWrite
data type for writing raw event
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
Template class for assembling a full atlas raw event from subfragments.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
ROBData_T< OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment, OFFLINE_FRAGMENTS_NAMESPACE::PointerType > ROBData
Defines the ROB data entity. The ROB data is an abstract entity that is used to discase the raw event...
This class provides conversion between Lower level Source ID to higher level source ID for L1Topo Byt...
#define ATH_MSG_VERBOSE(x)
const DataType * PointerType
::StatusCode StatusCode
StatusCode definition for legacy code.
#define CHECK(...)
Evaluate an expression and check for errors.
std::vector< const ROBF * > VROBFRAG
Container of L1TopoRDOs (standard Athena boilerplate)
Represents the L1Topo module ID, with decoder and encoder.
void setRodMinorVersion(uint16_t m)
change the ROD minor version
#define ATH_MSG_WARNING(x)
const boost::regex re(r_e)
uint32_t getRodID() const
get a ROD Source ID (deprecated)
std::vector< uint32_t > RODDATA
ROD data as a vector of unsigned int.
uint16_t id() const
access method
RODDATA * getRodData(uint32_t id)
get a block of ROD data
void setDetEvtType(uint32_t m)
change Detector Event Type
void fill(RawEventWrite *re, MsgStream &log)
Fill the FullEventFragment with all the ROD data stored in this.