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);
148 const EventContext context{ Gaudi::Hive::currentContext() };
149 return addROBData( context, robIds, callerName );
156 ATH_MSG_DEBUG(
" ---> Number of ROB Id s requested : " << robIds.size() <<
", Caller Name = " << callerName);
161 if ( (eformat::helper::SourceIdentifier(
id).module_id() != 0) &&
162 (eformat::helper::SourceIdentifier(
id).subdetector_id() == eformat::TDAQ_LVL2) ) {
163 id = eformat::helper::SourceIdentifier(eformat::helper::SourceIdentifier(
id).subdetector_id(),0).code();
166 ATH_MSG_ERROR(
"Inconsistent flag for masking L2/EF module IDs");
169 }
else if ( (eformat::helper::SourceIdentifier(
id).module_id() != 0) &&
170 (eformat::helper::SourceIdentifier(
id).subdetector_id() == eformat::TDAQ_EVENT_FILTER) &&
172 id = eformat::helper::SourceIdentifier(eformat::helper::SourceIdentifier(
id).subdetector_id(),0).code();
176 if (map_it != robmap.end()) {
177 ATH_MSG_DEBUG(
" ---> Found ROB Id : 0x" << MSG::hex << (*map_it).second->source_id()
178 << MSG::dec <<
" in cache");
181 << MSG::dec <<
" not found in cache for running mode OFFLINE (method addROBData),");
192 const EventContext context{ Gaudi::Hive::currentContext() };
201 ATH_MSG_FATAL(
" +-----------------------------------------------------------------+ ");
202 ATH_MSG_FATAL(
" | The method ROBDataProviderSvc::setNextEvent(const ROBF* result) | ");
203 ATH_MSG_FATAL(
" | is not implemented for this version of ROBDataProviderSvc | ");
204 ATH_MSG_FATAL(
" | Use the version from the HLT repository if you need it. | ");
205 ATH_MSG_FATAL(
" +-----------------------------------------------------------------+ ");
206 ATH_MSG_FATAL(
" ---> The " <<
result.size() <<
" ROB fragments in the call will not be used.");
218 const EventContext context{ Gaudi::Hive::currentContext() };
234 const size_t MAX_ROBFRAGMENTS = 4096;
237 re->start(rePointer);
238 size_t robcount =
re->children(robF, MAX_ROBFRAGMENTS);
239 if (robcount == MAX_ROBFRAGMENTS) {
243 for (
size_t irob = 0; irob < robcount; irob++) {
246 std::unique_ptr<const ROBF> rob=std::make_unique<const ROBF>(robF[irob]);
249 if ( (eformat::helper::SourceIdentifier(
id).module_id() != 0) &&
250 (eformat::helper::SourceIdentifier(
id).subdetector_id() == eformat::TDAQ_LVL2) ) {
251 id = eformat::helper::SourceIdentifier(eformat::helper::SourceIdentifier(
id).subdetector_id(),0).code();
253 ATH_MSG_ERROR(
"Inconsistent flag for masking L2/EF module IDs");
256 }
else if ( (eformat::helper::SourceIdentifier(
id).module_id() != 0) &&
257 (eformat::helper::SourceIdentifier(
id).subdetector_id() == eformat::TDAQ_EVENT_FILTER) &&
259 id = eformat::helper::SourceIdentifier(eformat::helper::SourceIdentifier(
id).subdetector_id(),0).code();
262 if (rob->nstatus() > 0) {
264 rob->status(it_status);
266 ATH_MSG_DEBUG(
" ---> ROB Id = 0x" << MSG::hex <<
id << std::setfill(
'0')
267 <<
" with Generic Status Code = 0x" << std::setw(4) << tmpstatus.generic()
268 <<
" and Specific Status Code = 0x" << std::setw(4) << tmpstatus.specific() << MSG::dec
273 ATH_MSG_DEBUG(
" ---> Empty ROB Id = 0x" << MSG::hex <<
id << MSG::dec
277 ROBMAP::const_iterator
it = cache->
robmap.find(
id);
279 ATH_MSG_WARNING(
" ROBDataProviderSvc:: Duplicate ROBID 0x" << MSG::hex <<
id
280 <<
" found. " << MSG::dec <<
" Overwriting the previous one ");
294 const EventContext context{ Gaudi::Hive::currentContext() };
299 const std::string_view callerName) {
304 if ( (eformat::helper::SourceIdentifier(
id).module_id() != 0) &&
305 (eformat::helper::SourceIdentifier(
id).subdetector_id() == eformat::TDAQ_LVL2) ) {
306 id = eformat::helper::SourceIdentifier(eformat::helper::SourceIdentifier(
id).subdetector_id(),0).code();
308 ATH_MSG_ERROR(
"Inconsistent flag for masking L2/EF module IDs");
311 }
else if ( (eformat::helper::SourceIdentifier(
id).module_id() != 0) &&
312 (eformat::helper::SourceIdentifier(
id).subdetector_id() == eformat::TDAQ_EVENT_FILTER) &&
314 id = eformat::helper::SourceIdentifier(eformat::helper::SourceIdentifier(
id).subdetector_id(),0).code();
317 if (map_it != cache->robmap.end()) {
318 v.push_back((*map_it).second.get());
320 ATH_MSG_DEBUG(
"Failed to find ROB for id 0x" << MSG::hex <<
id << MSG::dec <<
", Caller Name = " << callerName);
323 ATH_MSG_VERBOSE(
" --- Dump of ROB cache ids --- total size = " << cache->robmap.size());
324 for (
const auto&
p : cache->robmap) {
326 ATH_MSG_VERBOSE(
" # = " << nrob <<
" id = 0x" << MSG::hex <<
p.second->source_id() << MSG::dec);
336 for (
auto&
it : toclear) {
343 const EventContext context{ Gaudi::Hive::currentContext() };
354 const EventContext context{ Gaudi::Hive::currentContext() };
363 const EventContext context{ Gaudi::Hive::currentContext() };
372 const std::function<
void(
const ROBF* )>&
fn )
const {
374 fn(
el.second.get() );
390 if (rob->nstatus() == 0) {
395 rob->status(rob_it_status);
397 eformat::helper::SourceIdentifier tmpsrc(rob->rob_source_id());
402 if (*rob_it_status ==
status) {
411 if (*rob_it_status ==
status) {