69 const EventContext* eventContext =
nullptr;
70 if (
m_evtStore->retrieve(eventContext).isFailure()) {
71 ATH_MSG_ERROR(
"Failed to retrieve EventContext from the event store, new event cannot be read");
75 ATH_MSG_DEBUG(
"Reading new event for event context " << *eventContext);
81 cache->releaseEvent();
84 DCStatus
status = DCStatus::NO_EVENT;
93 ATH_MSG_ERROR(
"Failed to read new event, caught an unexpected exception: " << ex.what()
94 <<
". Throwing hltonl::Exception::EventSourceCorrupted" );
98 ATH_MSG_ERROR(
"Failed to read new event, caught an unexpected exception. "
99 <<
"Throwing hltonl::Exception::EventSourceCorrupted" );
103 if (
status == DCStatus::STOP) {
104 ATH_MSG_DEBUG(
"DataCollector::getNext returned STOP - no more events available");
107 else if (
status == DCStatus::NO_EVENT) {
108 ATH_MSG_DEBUG(
"DataCollector::getNext returned NO_EVENT - no events available temporarily");
113 else if (
status != DCStatus::OK) {
114 ATH_MSG_ERROR(
"Unhandled return Status " <<
static_cast<int>(
status) <<
" from DataCollector::getNext");
120 cache->fullEventFragment.reset(
new RawEvent(cache->rawData.get()));
123 if (m_maxLB < cache->fullEventFragment->lumi_block()) {
124 m_maxLB = cache->fullEventFragment->lumi_block();
130 cache->fullEventFragment->nchildren());
132 cache->fullEventFragment->fragment_size_word()*wordsToKiloBytes);
133 std::vector<eformat::read::ROBFragment> robVec;
134 cache->fullEventFragment->robs(robVec);
135 std::vector<std::string> subdetNameVec;
137 eformat::helper::SourceIdentifier sid(rob.rob_source_id());
138 subdetNameVec.push_back(sid.human_detector());
140 auto subdets = Monitored::Collection<std::vector<std::string>>(
"L1Result_SubDets", subdetNameVec);
149 const eformat::helper::SourceIdentifier sid{eformat::SubDetector::TDAQ_CTP,
151 std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*> vrobf;
154 ATH_MSG_INFO(
"The CTP ROB fragment 0x" << std::hex << sid.code() << std::dec <<
" is missing. "
155 <<
"Throwing hltonl::Exception::MissingCTPFragment");
158 uint32_t robStatus = vrobf.at(0)->nstatus()>0 ? *(vrobf.at(0)->status()) : 0;
160 std::string hexStatus(8,
char{0});
161 std::to_chars(hexStatus.data(), hexStatus.data()+hexStatus.size(), robStatus, 16);
162 ATH_MSG_INFO(
"The CTP ROB fragment 0x" << std::hex << sid.code() << std::dec <<
" has non-zero status word: 0x"
163 << hexStatus <<
". Throwing hltonl::Exception::BadCTPFragment");
167 vrobf.at(0)->check();
170 ATH_MSG_INFO(
"The CTP ROB fragment 0x" << std::hex << sid.code() << std::dec <<
" is corrupted: "
171 << ex.what() <<
". Throwing hltonl::Exception::BadCTPFragment");
177 return cache->fullEventFragment.get();