A ByteStreamInputSvc implementation for online use, reading events from hltinterface::DataCollector.
More...
#include <TrigByteStreamInputSvc.h>
A ByteStreamInputSvc implementation for online use, reading events from hltinterface::DataCollector.
The layout and implementation are based on ByteStreamEventStorageInputSvc
Definition at line 24 of file TrigByteStreamInputSvc.h.
◆ TrigByteStreamInputSvc()
TrigByteStreamInputSvc::TrigByteStreamInputSvc |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
svcLoc |
|
) |
| |
◆ ~TrigByteStreamInputSvc()
TrigByteStreamInputSvc::~TrigByteStreamInputSvc |
( |
| ) |
|
|
virtual |
◆ currentEvent()
◆ finalize()
StatusCode TrigByteStreamInputSvc::finalize |
( |
| ) |
|
|
overridevirtual |
◆ initialize()
StatusCode TrigByteStreamInputSvc::initialize |
( |
| ) |
|
|
overridevirtual |
◆ nextEvent()
Definition at line 63 of file TrigByteStreamInputSvc.cxx.
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();
◆ previousEvent()
◆ m_checkCTPFragmentModuleID
Gaudi::Property<int> TrigByteStreamInputSvc::m_checkCTPFragmentModuleID |
|
private |
Initial value:{this, "CheckCTPFragmentModuleID", -1,
"After reading a new event, assert we can retrieve the CTP fragment with Module ID given by this property, "
"and that has no errors. A value <0 disables the check."}
Definition at line 47 of file TrigByteStreamInputSvc.h.
◆ m_eventsCache
◆ m_evtStore
◆ m_maxLB
uint16_t TrigByteStreamInputSvc::m_maxLB {0} |
|
private |
◆ m_monTool
◆ m_robDataProviderSvc
The documentation for this class was generated from the following files: