84 #include "eformat/Status.h"
88 : base_class(
name, svcloc) {}
98 if (tmpsrc.human_detector() !=
"UNKNOWN") {
104 if (tmpsrc.human_detector() !=
"UNKNOWN") {
111 eformat::helper::SourceIdentifier tmpsrc(
p.first);
112 ATH_MSG_INFO(
" RobId=0x" << MSG::hex <<
p.first <<
" -> in Sub Det = " << tmpsrc.human_detector());
116 << MSG::hex << std::setfill(
'0' ) << std::setw(8) << tmpstatus.code()
117 <<
" Generic Part=0x" << std::setw(4) << tmpstatus.generic()
118 <<
" Specific Part=0x" << std::setw(4) << tmpstatus.specific());
124 eformat::helper::SourceIdentifier tmpsrc(
p.first, 0);
125 ATH_MSG_INFO(
" SubDetId=0x" << MSG::hex <<
p.first <<
" -> " << tmpsrc.human_detector());
129 << MSG::hex << std::setfill(
'0' ) << std::setw(8) << tmpstatus.code()
130 <<
" Generic Part=0x" << std::setw(4) << tmpstatus.generic()
131 <<
" Specific Part=0x" << std::setw(4) << tmpstatus.specific());
134 return(StatusCode::SUCCESS);
147 ATH_MSG_DEBUG(
" ---> Number of ROB Id s requested : " << robIds.size() <<
", Caller Name = " << callerName);
152 if ( (eformat::helper::SourceIdentifier(
id).module_id() != 0) &&
153 (eformat::helper::SourceIdentifier(
id).subdetector_id() == eformat::TDAQ_LVL2) ) {
154 id = eformat::helper::SourceIdentifier(eformat::helper::SourceIdentifier(
id).subdetector_id(),0).code();
157 ATH_MSG_ERROR(
"Inconsistent flag for masking L2/EF module IDs");
160 }
else if ( (eformat::helper::SourceIdentifier(
id).module_id() != 0) &&
161 (eformat::helper::SourceIdentifier(
id).subdetector_id() == eformat::TDAQ_EVENT_FILTER) &&
163 id = eformat::helper::SourceIdentifier(eformat::helper::SourceIdentifier(
id).subdetector_id(),0).code();
167 if (map_it != robmap.end()) {
168 ATH_MSG_DEBUG(
" ---> Found ROB Id : 0x" << MSG::hex << (*map_it).second->source_id()
169 << MSG::dec <<
" in cache");
172 << MSG::dec <<
" not found in cache for running mode OFFLINE (method addROBData),");
188 ATH_MSG_FATAL(
" +-----------------------------------------------------------------+ ");
189 ATH_MSG_FATAL(
" | The method ROBDataProviderSvc::setNextEvent(const ROBF* result) | ");
190 ATH_MSG_FATAL(
" | is not implemented for this version of ROBDataProviderSvc | ");
191 ATH_MSG_FATAL(
" | Use the version from the HLT repository if you need it. | ");
192 ATH_MSG_FATAL(
" +-----------------------------------------------------------------+ ");
193 ATH_MSG_FATAL(
" ---> The " <<
result.size() <<
" ROB fragments in the call will not be used.");
216 constexpr
size_t MAX_ROBFRAGMENTS = 4096;
217 std::vector<OFFLINE_FRAGMENTS_NAMESPACE::PointerType> robF(MAX_ROBFRAGMENTS);
219 re->start(rePointer);
220 size_t robcount =
re->children(robF.data(), MAX_ROBFRAGMENTS);
221 if (robcount == MAX_ROBFRAGMENTS) {
225 for (
size_t irob = 0; irob < robcount; irob++) {
228 std::unique_ptr<const ROBF> rob=std::make_unique<const ROBF>(robF[irob]);
231 if ( (eformat::helper::SourceIdentifier(
id).module_id() != 0) &&
232 (eformat::helper::SourceIdentifier(
id).subdetector_id() == eformat::TDAQ_LVL2) ) {
233 id = eformat::helper::SourceIdentifier(eformat::helper::SourceIdentifier(
id).subdetector_id(),0).code();
235 ATH_MSG_ERROR(
"Inconsistent flag for masking L2/EF module IDs");
238 }
else if ( (eformat::helper::SourceIdentifier(
id).module_id() != 0) &&
239 (eformat::helper::SourceIdentifier(
id).subdetector_id() == eformat::TDAQ_EVENT_FILTER) &&
241 id = eformat::helper::SourceIdentifier(eformat::helper::SourceIdentifier(
id).subdetector_id(),0).code();
244 if (rob->nstatus() > 0) {
246 rob->status(it_status);
248 ATH_MSG_DEBUG(
" ---> ROB Id = 0x" << MSG::hex <<
id << std::setfill(
'0')
249 <<
" with Generic Status Code = 0x" << std::setw(4) << tmpstatus.generic()
250 <<
" and Specific Status Code = 0x" << std::setw(4) << tmpstatus.specific() << MSG::dec
255 ATH_MSG_DEBUG(
" ---> Empty ROB Id = 0x" << MSG::hex <<
id << MSG::dec
259 ROBMAP::const_iterator
it = cache->
robmap.find(
id);
261 ATH_MSG_WARNING(
" ROBDataProviderSvc:: Duplicate ROBID 0x" << MSG::hex <<
id
262 <<
" found. " << MSG::dec <<
" Overwriting the previous one ");
277 const std::string_view callerName) {
282 if ( (eformat::helper::SourceIdentifier(
id).module_id() != 0) &&
283 (eformat::helper::SourceIdentifier(
id).subdetector_id() == eformat::TDAQ_LVL2) ) {
284 id = eformat::helper::SourceIdentifier(eformat::helper::SourceIdentifier(
id).subdetector_id(),0).code();
286 ATH_MSG_ERROR(
"Inconsistent flag for masking L2/EF module IDs");
289 }
else if ( (eformat::helper::SourceIdentifier(
id).module_id() != 0) &&
290 (eformat::helper::SourceIdentifier(
id).subdetector_id() == eformat::TDAQ_EVENT_FILTER) &&
292 id = eformat::helper::SourceIdentifier(eformat::helper::SourceIdentifier(
id).subdetector_id(),0).code();
295 if (map_it != cache->
robmap.end()) {
296 v.push_back((*map_it).second.get());
298 ATH_MSG_DEBUG(
"Failed to find ROB for id 0x" << MSG::hex <<
id << MSG::dec <<
", Caller Name = " << callerName);
302 for (
const auto&
p : cache->
robmap) {
304 ATH_MSG_VERBOSE(
" # = " << nrob <<
" id = 0x" << MSG::hex <<
p.second->source_id() << MSG::dec);
314 for (
auto&
it : toclear) {
338 const std::function<
void(
const ROBF* )>&
fn )
const {
340 fn(
el.second.get() );
356 if (rob->nstatus() == 0) {
361 rob->status(rob_it_status);
363 eformat::helper::SourceIdentifier tmpsrc(rob->rob_source_id());
368 if (*rob_it_status ==
status) {
377 if (*rob_it_status ==
status) {