84 #include "eformat/Status.h"
88 : base_class(
name, svcloc) {
103 if (tmpsrc.human_detector() !=
"UNKNOWN") {
109 if (tmpsrc.human_detector() !=
"UNKNOWN") {
116 eformat::helper::SourceIdentifier tmpsrc(
p.first);
117 ATH_MSG_INFO(
" RobId=0x" << MSG::hex <<
p.first <<
" -> in Sub Det = " << tmpsrc.human_detector());
121 << MSG::hex << std::setfill(
'0' ) << std::setw(8) << tmpstatus.code()
122 <<
" Generic Part=0x" << std::setw(4) << tmpstatus.generic()
123 <<
" Specific Part=0x" << std::setw(4) << tmpstatus.specific());
129 eformat::helper::SourceIdentifier tmpsrc(
p.first, 0);
130 ATH_MSG_INFO(
" SubDetId=0x" << MSG::hex <<
p.first <<
" -> " << tmpsrc.human_detector());
134 << MSG::hex << std::setfill(
'0' ) << std::setw(8) << tmpstatus.code()
135 <<
" Generic Part=0x" << std::setw(4) << tmpstatus.generic()
136 <<
" Specific Part=0x" << std::setw(4) << tmpstatus.specific());
139 return(StatusCode::SUCCESS);
152 ATH_MSG_DEBUG(
" ---> Number of ROB Id s requested : " << robIds.size() <<
", Caller Name = " << callerName);
157 if ( (eformat::helper::SourceIdentifier(
id).module_id() != 0) &&
158 (eformat::helper::SourceIdentifier(
id).subdetector_id() == eformat::TDAQ_LVL2) ) {
159 id = eformat::helper::SourceIdentifier(eformat::helper::SourceIdentifier(
id).subdetector_id(),0).code();
162 ATH_MSG_ERROR(
"Inconsistent flag for masking L2/EF module IDs");
165 }
else if ( (eformat::helper::SourceIdentifier(
id).module_id() != 0) &&
166 (eformat::helper::SourceIdentifier(
id).subdetector_id() == eformat::TDAQ_EVENT_FILTER) &&
168 id = eformat::helper::SourceIdentifier(eformat::helper::SourceIdentifier(
id).subdetector_id(),0).code();
172 if (map_it != robmap.end()) {
173 ATH_MSG_DEBUG(
" ---> Found ROB Id : 0x" << MSG::hex << (*map_it).second->source_id()
174 << MSG::dec <<
" in cache");
177 << MSG::dec <<
" not found in cache for running mode OFFLINE (method addROBData),");
193 ATH_MSG_FATAL(
" +-----------------------------------------------------------------+ ");
194 ATH_MSG_FATAL(
" | The method ROBDataProviderSvc::setNextEvent(const ROBF* result) | ");
195 ATH_MSG_FATAL(
" | is not implemented for this version of ROBDataProviderSvc | ");
196 ATH_MSG_FATAL(
" | Use the version from the HLT repository if you need it. | ");
197 ATH_MSG_FATAL(
" +-----------------------------------------------------------------+ ");
198 ATH_MSG_FATAL(
" ---> The " <<
result.size() <<
" ROB fragments in the call will not be used.");
221 const size_t MAX_ROBFRAGMENTS = 4096;
224 re->start(rePointer);
225 size_t robcount =
re->children(robF, MAX_ROBFRAGMENTS);
226 if (robcount == MAX_ROBFRAGMENTS) {
230 for (
size_t irob = 0; irob < robcount; irob++) {
233 std::unique_ptr<const ROBF> rob=std::make_unique<const ROBF>(robF[irob]);
236 if ( (eformat::helper::SourceIdentifier(
id).module_id() != 0) &&
237 (eformat::helper::SourceIdentifier(
id).subdetector_id() == eformat::TDAQ_LVL2) ) {
238 id = eformat::helper::SourceIdentifier(eformat::helper::SourceIdentifier(
id).subdetector_id(),0).code();
240 ATH_MSG_ERROR(
"Inconsistent flag for masking L2/EF module IDs");
243 }
else if ( (eformat::helper::SourceIdentifier(
id).module_id() != 0) &&
244 (eformat::helper::SourceIdentifier(
id).subdetector_id() == eformat::TDAQ_EVENT_FILTER) &&
246 id = eformat::helper::SourceIdentifier(eformat::helper::SourceIdentifier(
id).subdetector_id(),0).code();
249 if (rob->nstatus() > 0) {
251 rob->status(it_status);
253 ATH_MSG_DEBUG(
" ---> ROB Id = 0x" << MSG::hex <<
id << std::setfill(
'0')
254 <<
" with Generic Status Code = 0x" << std::setw(4) << tmpstatus.generic()
255 <<
" and Specific Status Code = 0x" << std::setw(4) << tmpstatus.specific() << MSG::dec
260 ATH_MSG_DEBUG(
" ---> Empty ROB Id = 0x" << MSG::hex <<
id << MSG::dec
264 ROBMAP::const_iterator
it = cache->
robmap.find(
id);
266 ATH_MSG_WARNING(
" ROBDataProviderSvc:: Duplicate ROBID 0x" << MSG::hex <<
id
267 <<
" found. " << MSG::dec <<
" Overwriting the previous one ");
282 const std::string_view callerName) {
287 if ( (eformat::helper::SourceIdentifier(
id).module_id() != 0) &&
288 (eformat::helper::SourceIdentifier(
id).subdetector_id() == eformat::TDAQ_LVL2) ) {
289 id = eformat::helper::SourceIdentifier(eformat::helper::SourceIdentifier(
id).subdetector_id(),0).code();
291 ATH_MSG_ERROR(
"Inconsistent flag for masking L2/EF module IDs");
294 }
else if ( (eformat::helper::SourceIdentifier(
id).module_id() != 0) &&
295 (eformat::helper::SourceIdentifier(
id).subdetector_id() == eformat::TDAQ_EVENT_FILTER) &&
297 id = eformat::helper::SourceIdentifier(eformat::helper::SourceIdentifier(
id).subdetector_id(),0).code();
300 if (map_it != cache->
robmap.end()) {
301 v.push_back((*map_it).second.get());
303 ATH_MSG_DEBUG(
"Failed to find ROB for id 0x" << MSG::hex <<
id << MSG::dec <<
", Caller Name = " << callerName);
307 for (
const auto&
p : cache->
robmap) {
309 ATH_MSG_VERBOSE(
" # = " << nrob <<
" id = 0x" << MSG::hex <<
p.second->source_id() << MSG::dec);
319 for (
auto&
it : toclear) {
343 const std::function<
void(
const ROBF* )>&
fn )
const {
345 fn(
el.second.get() );
361 if (rob->nstatus() == 0) {
366 rob->status(rob_it_status);
368 eformat::helper::SourceIdentifier tmpsrc(rob->rob_source_id());
373 if (*rob_it_status ==
status) {
382 if (*rob_it_status ==
status) {