85 const EventContext* eventContext =
nullptr;
86 if (
m_evtStore->retrieve(eventContext).isFailure()) {
87 ATH_MSG_ERROR(
"Failed to retrieve EventContext from the event store, new event cannot be read");
91 ATH_MSG_DEBUG(
"Reading new event for event context " << *eventContext);
97 cache->releaseEvent();
100 DCStatus
status = DCStatus::NO_EVENT;
109 ATH_MSG_ERROR(
"Failed to read new event, caught an unexpected exception: " << ex.what()
110 <<
". Throwing hltonl::Exception::EventSourceCorrupted" );
114 ATH_MSG_ERROR(
"Failed to read new event, caught an unexpected exception. "
115 <<
"Throwing hltonl::Exception::EventSourceCorrupted" );
119 if (
status == DCStatus::STOP) {
120 ATH_MSG_DEBUG(
"DataCollector::getNext returned STOP - no more events available");
123 else if (
status == DCStatus::NO_EVENT) {
124 ATH_MSG_DEBUG(
"DataCollector::getNext returned NO_EVENT - no events available temporarily");
129 else if (
status != DCStatus::OK) {
130 ATH_MSG_ERROR(
"Unhandled return Status " <<
static_cast<int>(
status) <<
" from DataCollector::getNext");
136 cache->fullEventFragment.reset(
new RawEvent(cache->rawData.get()));
139 if (m_maxLB < cache->fullEventFragment->lumi_block()) {
140 m_maxLB = cache->fullEventFragment->lumi_block();
146 cache->fullEventFragment->nchildren());
148 cache->fullEventFragment->fragment_size_word()*wordsToKiloBytes);
149 std::vector<eformat::read::ROBFragment> robVec;
150 cache->fullEventFragment->robs(robVec);
151 std::vector<std::string> subdetNameVec;
153 eformat::helper::SourceIdentifier sid(rob.rob_source_id());
154 subdetNameVec.push_back(sid.human_detector());
156 auto subdets = Monitored::Collection<std::vector<std::string>>(
"L1Result_SubDets", subdetNameVec);
165 const eformat::helper::SourceIdentifier sid{eformat::SubDetector::TDAQ_CTP,
167 std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*> vrobf;
170 ATH_MSG_INFO(
"The CTP ROB fragment 0x" << std::hex << sid.code() << std::dec <<
" is missing. "
171 <<
"Throwing hltonl::Exception::MissingCTPFragment");
174 uint32_t robStatus = vrobf.at(0)->nstatus()>0 ? *(vrobf.at(0)->status()) : 0;
176 std::string hexStatus(8,
char{0});
177 std::to_chars(hexStatus.data(), hexStatus.data()+hexStatus.size(), robStatus, 16);
178 ATH_MSG_INFO(
"The CTP ROB fragment 0x" << std::hex << sid.code() << std::dec <<
" has non-zero status word: 0x"
179 << hexStatus <<
". Throwing hltonl::Exception::BadCTPFragment");
183 vrobf.at(0)->check();
186 ATH_MSG_INFO(
"The CTP ROB fragment 0x" << std::hex << sid.code() << std::dec <<
" is corrupted: "
187 << ex.what() <<
". Throwing hltonl::Exception::BadCTPFragment");
193 return cache->fullEventFragment.get();