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);
83 using DCStatus = hltinterface::DataCollector::Status;
84 DCStatus status = DCStatus::NO_EVENT;
89 status = hltinterface::DataCollector::instance()->getNext(cache->
rawData);
92 catch (
const std::exception& ex) {
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");
133 std::vector<eformat::read::ROBFragment> robVec;
135 std::vector<std::string> subdetNameVec;
136 for (
const eformat::read::ROBFragment& rob : robVec) {
137 eformat::helper::SourceIdentifier sid(rob.rob_source_id());
138 subdetNameVec.push_back(sid.human_detector());
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();
169 catch (
const std::exception& ex) {
170 ATH_MSG_INFO(
"The CTP ROB fragment 0x" << std::hex << sid.code() << std::dec <<
" is corrupted: "
171 << ex.what() <<
". Throwing hltonl::Exception::BadCTPFragment");
Assign a CLID to EventContext.