ATLAS Offline Software
Loading...
Searching...
No Matches
TrigByteStreamCnvSvc Class Reference

A ByteStreamCnvSvc implementation for online use. More...

#include <TrigByteStreamCnvSvc.h>

Inheritance diagram for TrigByteStreamCnvSvc:
Collaboration diagram for TrigByteStreamCnvSvc:

Public Member Functions

 TrigByteStreamCnvSvc (const std::string &name, ISvcLocator *svcLoc)
 Standard constructor.
virtual ~TrigByteStreamCnvSvc ()
 Standard destructor.
virtual StatusCode initialize () override
virtual StatusCode finalize () override
virtual StatusCode connectOutput (const std::string &outputFile) override
 In the case of online BS data, this method creates the output FullEventFragment and fills its header.
StatusCode connectOutput (const std::string &outputFile, const EventContext &eventContext)
 In the case of online BS data, this method creates the output FullEventFragment and fills its header.
virtual StatusCode connectOutput (const std::string &outputFile, const std::string &openMode) override
 This overload is kept only for interface compatibility.
virtual StatusCode commitOutput (const std::string &outputFile, bool do_commit) override
 In the case of online BS data, this method binds and sends out the output FullEventFragment.
StatusCode commitOutput (const std::string &outputFile, bool do_commit, const EventContext &eventContext)
 In the case of online BS data, this method binds and sends out the output FullEventFragment.
virtual RawEventWritegetRawEvent () override
 Return a pointer to the raw event for the current event context.
RawEventWritegetRawEvent (const EventContext &eventContext) const
 Return a pointer to the raw event for the given event context.

Protected Member Functions

virtual FullEventAssemblerBasefindFullEventAssembler (const std::string &name) const override
virtual StatusCode storeFullEventAssembler (std::unique_ptr< FullEventAssemblerBase > fea, const std::string &name) override

Private Member Functions

RawEventWritesetRawEvent (std::unique_ptr< RawEventWrite > &&rawEventWrite, const EventContext &eventContext)
 Store new raw event in the cache.
void clearRawEvent (const EventContext &eventContext)
 Delete raw event from the cache.
void printRawEvent (const EventContext &eventContext) const
 Print contents of the raw event.
void monitorRawEvent (const std::unique_ptr< uint32_t[]> &rawEventPtr) const
 Fill histograms from contents of a FullEventFragment.
const EventContext * currentContext () const
 Hack used in HLT to avoid using ThreadLocalContext, see explanation in the implementation.

Private Attributes

ServiceHandle< StoreGateSvcm_evtStore {this, "EventStore", "StoreGateSvc"}
ServiceHandle< IROBDataProviderSvcm_robDataProviderSvc {this, "ROBDataProvider", "ROBDataProviderSvc"}
ServiceHandle< EFInterfaceSvcm_efInterfaceSvc {this, "EFInterfaceSvc", "", "Online service managing EF interface with Dataflow"}
ToolHandle< GenericMonitoringToolm_monTool {this, "MonTool", "" , "Monitoring tool"}
SG::SlotSpecificObj< std::unique_ptr< RawEventWrite > > m_rawEventWriteCache
bool m_hasEFInterface {false}

Detailed Description

A ByteStreamCnvSvc implementation for online use.

It overrides the connectOutput and commitOutput methods of the base class. In this implementation, they create the specific online HLT output and send it out directly to the TDAQ infrastructure without using an output service.

Definition at line 24 of file TrigByteStreamCnvSvc.h.

Constructor & Destructor Documentation

◆ TrigByteStreamCnvSvc()

TrigByteStreamCnvSvc::TrigByteStreamCnvSvc ( const std::string & name,
ISvcLocator * svcLoc )

Standard constructor.

Definition at line 86 of file TrigByteStreamCnvSvc.cxx.

87 : base_class(name, svcLoc) {}

◆ ~TrigByteStreamCnvSvc()

TrigByteStreamCnvSvc::~TrigByteStreamCnvSvc ( )
virtual

Standard destructor.

Definition at line 92 of file TrigByteStreamCnvSvc.cxx.

92{}

Member Function Documentation

◆ clearRawEvent()

void TrigByteStreamCnvSvc::clearRawEvent ( const EventContext & eventContext)
private

Delete raw event from the cache.

Definition at line 292 of file TrigByteStreamCnvSvc.cxx.

292 {
293 m_rawEventWriteCache.get(eventContext)->reset();
294}
SG::SlotSpecificObj< std::unique_ptr< RawEventWrite > > m_rawEventWriteCache

◆ commitOutput() [1/2]

StatusCode TrigByteStreamCnvSvc::commitOutput ( const std::string & outputFile,
bool do_commit )
overridevirtual

In the case of online BS data, this method binds and sends out the output FullEventFragment.

Definition at line 191 of file TrigByteStreamCnvSvc.cxx.

191 {
192 const EventContext* eventContext = currentContext();
193 if (eventContext == nullptr) return StatusCode::FAILURE;
194 return commitOutput(outputFile, do_commit, *eventContext);
195}
const EventContext * currentContext() const
Hack used in HLT to avoid using ThreadLocalContext, see explanation in the implementation.
virtual StatusCode commitOutput(const std::string &outputFile, bool do_commit) override
In the case of online BS data, this method binds and sends out the output FullEventFragment.

◆ commitOutput() [2/2]

StatusCode TrigByteStreamCnvSvc::commitOutput ( const std::string & outputFile,
bool do_commit,
const EventContext & eventContext )

In the case of online BS data, this method binds and sends out the output FullEventFragment.

Definition at line 197 of file TrigByteStreamCnvSvc.cxx.

197 {
198 ATH_MSG_VERBOSE("start of " << __FUNCTION__);
199
200 if (msgLvl(MSG::DEBUG)) printRawEvent(eventContext);
201
202 RawEventWrite* re = getRawEvent(eventContext);
203
204 // Serialise the output FullEventFragment
205 std::unique_ptr<uint32_t[]> rawEventPtr;
206 try {
207 const eformat::write::node_t* top = re->bind();
208 uint32_t rawEventSize = re->size_word();
209 rawEventPtr = std::make_unique<uint32_t[]>(rawEventSize);
210 uint32_t copiedSize = eformat::write::copy(*top,rawEventPtr.get(),rawEventSize);
211 if(copiedSize!=rawEventSize) {
212 ATH_MSG_ERROR("FullEventFragment serialisation failed");
213 return StatusCode::FAILURE;
214 }
215 }
216 catch (const std::exception& e) {
217 ATH_MSG_ERROR("FullEventFragment serialisation failed, caught an unexpected std::exception " << e.what());
218 clearRawEvent(eventContext);
219 return StatusCode::FAILURE;
220 }
221 catch (...) {
222 ATH_MSG_ERROR("FullEventFragment serialisation failed, caught an unexpected exception");
223 clearRawEvent(eventContext);
224 return StatusCode::FAILURE;
225 }
226
227 {
228 auto t_mon = Monitored::Timer("TIME_monitorRawEvent");
229 monitorRawEvent(rawEventPtr);
230 Monitored::Group(m_monTool, t_mon);
231 }
232
233 // Send output to the DataCollector
234 StatusCode result = StatusCode::SUCCESS;
235 try {
236 auto t_eventDone = Monitored::Timer<std::chrono::duration<float, std::milli>>("TIME_eventDone");
238 m_efInterfaceSvc->eventDone(std::move(rawEventPtr));
239 else
240 hltinterface::DataCollector::instance()->eventDone(std::move(rawEventPtr));
241 Monitored::Group(m_monTool, t_eventDone);
242 ATH_MSG_DEBUG("Serialised FullEventFragment with HLT result was returned to DataCollector successfully, "
243 << "the eventDone call took " << (double)t_eventDone << " milliseconds");
244 }
245 catch (const std::exception& e) {
246 ATH_MSG_ERROR("Sending output to DataCollector failed, caught an unexpected std::exception " << e.what());
247 result = StatusCode::FAILURE;
248 }
249 catch (...) {
250 ATH_MSG_ERROR("Sending output to DataCollector failed, caught an unexpected exception");
251 result = StatusCode::FAILURE;
252 }
253
254 clearRawEvent(eventContext);
255
256 ATH_MSG_VERBOSE("end of " << __FUNCTION__);
257 return result;
258}
const boost::regex re(r_e)
#define ATH_MSG_ERROR(x)
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_DEBUG(x)
OFFLINE_FRAGMENTS_NAMESPACE_WRITE::FullEventFragment RawEventWrite
data type for writing raw event
Definition RawEvent.h:39
@ top
void monitorRawEvent(const std::unique_ptr< uint32_t[]> &rawEventPtr) const
Fill histograms from contents of a FullEventFragment.
virtual RawEventWrite * getRawEvent() override
Return a pointer to the raw event for the current event context.
void printRawEvent(const EventContext &eventContext) const
Print contents of the raw event.
ToolHandle< GenericMonitoringTool > m_monTool
ServiceHandle< EFInterfaceSvc > m_efInterfaceSvc
void clearRawEvent(const EventContext &eventContext)
Delete raw event from the cache.
::StatusCode StatusCode
StatusCode definition for legacy code.
setEventNumber uint32_t

◆ connectOutput() [1/3]

StatusCode TrigByteStreamCnvSvc::connectOutput ( const std::string & outputFile)
overridevirtual

In the case of online BS data, this method creates the output FullEventFragment and fills its header.

Definition at line 153 of file TrigByteStreamCnvSvc.cxx.

153 {
154 const EventContext* eventContext = currentContext();
155 if (eventContext == nullptr) return StatusCode::FAILURE;
156 return connectOutput(outputFile, *eventContext);
157}
virtual StatusCode connectOutput(const std::string &outputFile) override
In the case of online BS data, this method creates the output FullEventFragment and fills its header.

◆ connectOutput() [2/3]

StatusCode TrigByteStreamCnvSvc::connectOutput ( const std::string & outputFile,
const EventContext & eventContext )

In the case of online BS data, this method creates the output FullEventFragment and fills its header.

Definition at line 159 of file TrigByteStreamCnvSvc.cxx.

159 {
160 ATH_MSG_VERBOSE("start of " << __FUNCTION__);
161
162 ATH_MSG_DEBUG("Creating new RawEventWrite for EventContext = " << eventContext);
163 // Create a new RawEventWrite and copy the header from the input RawEvent
164 RawEventWrite* re = setRawEvent(std::make_unique<RawEventWrite>(), eventContext);
165 const uint32_t* inputRawEvent = m_robDataProviderSvc->getEvent(eventContext)->start();
166 if (!inputRawEvent) {
167 ATH_MSG_ERROR("Input RawEvent is nullptr, cannot create output");
168 return StatusCode::FAILURE;
169 }
170 re->copy_header(inputRawEvent);
171
172 ATH_MSG_VERBOSE("Created RawEventWrite pointer = " << re);
173
174 ATH_MSG_VERBOSE("end of " << __FUNCTION__);
175 return StatusCode::SUCCESS;
176}
RawEventWrite * setRawEvent(std::unique_ptr< RawEventWrite > &&rawEventWrite, const EventContext &eventContext)
Store new raw event in the cache.
ServiceHandle< IROBDataProviderSvc > m_robDataProviderSvc

◆ connectOutput() [3/3]

StatusCode TrigByteStreamCnvSvc::connectOutput ( const std::string & outputFile,
const std::string & openMode )
overridevirtual

This overload is kept only for interface compatibility.

Definition at line 182 of file TrigByteStreamCnvSvc.cxx.

182 {
183 return connectOutput(outputFile);
184}

◆ currentContext()

const EventContext * TrigByteStreamCnvSvc::currentContext ( ) const
private

Hack used in HLT to avoid using ThreadLocalContext, see explanation in the implementation.

Definition at line 261 of file TrigByteStreamCnvSvc.cxx.

261 {
262 // Get the EventContext via event store because the base class doesn't allow passing it explicitly as an argument
263 // and we don't want to use ThreadLocalContext. Don't use ReadHandle here because it calls ThreadLocalContext if
264 // not given a context (which we want to retrieve). This relies on IHiveWhiteBoard::selectStore being called on the
265 // current thread before we arrive here (it is done in HltEventLoopMgr).
266 const EventContext* eventContext = nullptr;
267 if (m_evtStore->retrieve(eventContext).isFailure()) {
268 ATH_MSG_ERROR("Failed to retrieve EventContext from the event store");
269 }
270 return eventContext;
271}
ServiceHandle< StoreGateSvc > m_evtStore

◆ finalize()

StatusCode TrigByteStreamCnvSvc::finalize ( )
overridevirtual

Definition at line 120 of file TrigByteStreamCnvSvc.cxx.

120 {
121 ATH_MSG_VERBOSE("start of " << __FUNCTION__);
122 if (m_robDataProviderSvc.release().isFailure())
123 ATH_MSG_WARNING("Failed to release service " << m_robDataProviderSvc.typeAndName());
124 if (m_hasEFInterface){
125 if (m_efInterfaceSvc.release().isFailure())
126 ATH_MSG_WARNING("Failed to release service " << m_efInterfaceSvc.typeAndName());
127 }
128 if (m_evtStore.release().isFailure())
129 ATH_MSG_WARNING("Failed to release service " << m_evtStore.typeAndName());
130 ATH_MSG_VERBOSE("end of " << __FUNCTION__);
131 ATH_CHECK(ByteStreamCnvSvcBase::finalize());
132 return StatusCode::SUCCESS;
133}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)

◆ findFullEventAssembler()

FullEventAssemblerBase * TrigByteStreamCnvSvc::findFullEventAssembler ( const std::string & name) const
overrideprotectedvirtual

Definition at line 138 of file TrigByteStreamCnvSvc.cxx.

138 {
139 ATH_MSG_ERROR("Bytestream creation is not supported by TrigByteStreamCnvSvc");
140 return nullptr;
141}

◆ getRawEvent() [1/2]

RawEventWrite * TrigByteStreamCnvSvc::getRawEvent ( )
overridevirtual

Return a pointer to the raw event for the current event context.

Definition at line 274 of file TrigByteStreamCnvSvc.cxx.

274 {
275 const EventContext* eventContext = currentContext();
276 if (eventContext == nullptr) return nullptr;
277 return getRawEvent(*eventContext);
278}

◆ getRawEvent() [2/2]

RawEventWrite * TrigByteStreamCnvSvc::getRawEvent ( const EventContext & eventContext) const

Return a pointer to the raw event for the given event context.

Definition at line 281 of file TrigByteStreamCnvSvc.cxx.

281 {
282 return m_rawEventWriteCache.get(eventContext)->get();
283}

◆ initialize()

StatusCode TrigByteStreamCnvSvc::initialize ( )
overridevirtual

Definition at line 97 of file TrigByteStreamCnvSvc.cxx.

97 {
98 ATH_MSG_VERBOSE("start of " << __FUNCTION__);
100 ATH_CHECK(m_evtStore.retrieve());
102 //Check if EFInterfaceSvc is available and set flag for selecting which interface to use
103 if (!m_efInterfaceSvc.empty()) {
104 ATH_MSG_INFO("Using EFInterfaceSvc");
105 ATH_CHECK(m_efInterfaceSvc.retrieve());
106 m_hasEFInterface = true;
107 }
108 else {
109 ATH_MSG_INFO("Using legacy dataflow interface");
110 m_hasEFInterface = false;
111 }
112 if (!m_monTool.empty()) ATH_CHECK(m_monTool.retrieve());
113 ATH_MSG_VERBOSE("end of " << __FUNCTION__);
114 return StatusCode::SUCCESS;
115}
#define ATH_MSG_INFO(x)
virtual StatusCode initialize() override
Required of all Gaudi Services.

◆ monitorRawEvent()

void TrigByteStreamCnvSvc::monitorRawEvent ( const std::unique_ptr< uint32_t[]> & rawEventPtr) const
private

Fill histograms from contents of a FullEventFragment.

Definition at line 297 of file TrigByteStreamCnvSvc.cxx.

297 {
298 // Create a read fragment from the pointer
299 eformat::read::FullEventFragment rawEvent(rawEventPtr.get());
300
301 // Monitor error code
302 if (rawEvent.nstatus() > 1) {
303 HLT::OnlineErrorCode errorCode = static_cast<HLT::OnlineErrorCode>(rawEvent.status()[1]);
304 std::ostringstream ss;
305 ss << errorCode;
306 auto monOnlineErrorCode = Monitored::Scalar<std::string>("OnlineErrorCode", ss.str());
307 Monitored::Group(m_monTool, monOnlineErrorCode);
308 }
309
310 // Decode stream tags
311 std::vector<eformat::helper::StreamTag> streamTags;
312 try {
313 eformat::helper::decode(rawEvent.nstream_tag(), rawEvent.stream_tag(), streamTags);
314 }
315 catch (const std::exception& ex) {
316 ATH_MSG_ERROR("StreamTag decoding failed, caught an unexpected std::exception " << ex.what());
317 return;
318 }
319 catch (...) {
320 ATH_MSG_ERROR("StreamTag decoding failed, caught an unexpected exception");
321 return;
322 }
323
324 // Get HLT result sizes
325 std::vector<eformat::read::ROBFragment> robs;
326 rawEvent.robs(robs);
327 std::vector<uint16_t> resultSizeMap_moduleID;
328 std::vector<uint32_t> resultSizeMap_size;
329 uint32_t totalSizeWords = 0;
330 try {
331 for (const eformat::read::ROBFragment& rob : robs) {
332 eformat::helper::SourceIdentifier sid(rob.rob_source_id());
333 if (sid.subdetector_id() != eformat::SubDetector::TDAQ_HLT)
334 continue;
335 const uint16_t module_id = sid.module_id();
336 const uint32_t size = rob.fragment_size_word();
337 totalSizeWords += size;
338 if (!contains(resultSizeMap_moduleID, module_id)) {
339 resultSizeMap_moduleID.push_back(module_id);
340 resultSizeMap_size.push_back(size);
341 }
342 else {
343 ATH_MSG_ERROR("HLT result ROB monitoring found multiple HLT ROBs with the same module ID " << module_id);
344 }
345 }
346 }
347 catch (const std::exception& ex) {
348 ATH_MSG_ERROR("HLT result ROB monitoring failed, caught an unexpected std::exception " << ex.what());
349 return;
350 }
351 catch (...) {
352 ATH_MSG_ERROR("HLT result ROB monitoring failed, caught an unexpected exception");
353 return;
354 }
355
356 // Fill helper containers for monitoring
357 std::vector<std::string> sdFromRobList;
358 std::vector<std::string> sdFromSubDetList;
359 std::vector<std::string> streamTagCorrA;
360 std::vector<std::string> streamTagCorrB;
361 std::vector<float> streamResultSize; // Correlated with streamTags vector
362 streamTagCorrA.reserve(streamTags.size() * streamTags.size());
363 streamTagCorrB.reserve(streamTags.size() * streamTags.size());
364 streamResultSize.reserve(streamTags.size());
365 for (const eformat::helper::StreamTag& st : streamTags) {
366 bool hasHLTSubDet = st.dets.find(eformat::SubDetector::TDAQ_HLT) != st.dets.end();
367 bool includeAll = st.robs.empty() && (st.dets.empty() || hasHLTSubDet);
368 // includeAll means a stream with full event building or all HLT results included
369 uint32_t sizeWords = includeAll ? totalSizeWords : 0;
370 for (const eformat::SubDetector sd : st.dets) {
371 const std::string& detName = eformat::helper::SubDetectorDictionary.string(sd);
372 if (!contains(sdFromSubDetList, detName)) sdFromSubDetList.push_back(detName);
373 }
374 for (const uint32_t robid : st.robs) {
375 eformat::helper::SourceIdentifier sid(robid);
376 const std::string& detName = sid.human_detector();
377 if (!contains(sdFromRobList, detName)) sdFromRobList.push_back(detName);
378 if (!includeAll && sid.subdetector_id() == eformat::SubDetector::TDAQ_HLT) {
379 if (const int ix = index(resultSizeMap_moduleID, sid.module_id()); ix >= 0) {
380 sizeWords += resultSizeMap_size[ix];
381 }
382 else {
383 ATH_MSG_WARNING("Stream tag " << st.type << "_" << st.name << " declares " << sid.human()
384 << " in ROB list, but the ROBFragment is missing");
385 }
386 }
387 }
388 streamResultSize.push_back(sizeWords*wordsToKiloBytes);
389 for (const eformat::helper::StreamTag& st2 : streamTags) {
390 streamTagCorrA.push_back(mon_streamTypeName(st));
391 streamTagCorrB.push_back(mon_streamTypeName(st2));
392 }
393 }
394
395 // General stream tag monitoring
396 auto monStreamTagsNum = Monitored::Scalar<size_t>("StreamTagsNum", streamTags.size());
397 auto monStreamTags = Monitored::Collection("StreamTags", streamTags, mon_streamTypeName);
398 auto monStreamTagsType = Monitored::Collection("StreamTagsType", streamTags, mon_streamType);
399 auto monStreamTagCorrA = Monitored::Collection("StreamTagCorrA", streamTagCorrA);
400 auto monStreamTagCorrB = Monitored::Collection("StreamTagCorrB", streamTagCorrB);
401 // PEB stream tag monitoring
402 auto monStreamIsPeb = Monitored::Collection("StreamTagIsPeb", streamTags, mon_streamIsPeb);
403 auto monPebRobsNum = Monitored::Collection("StreamTagsPebRobsNum", streamTags, mon_streamPebRobsNum);
404 auto monPebSubDetsNum = Monitored::Collection("StreamTagsPebSubDetsNum", streamTags, mon_streamPebSubDetsNum);
405 auto monSubDetsFromRobList = Monitored::Collection("StreamTagsPebSubDetsFromRobList", sdFromRobList);
406 auto monSubDetsFromSubDetList = Monitored::Collection("StreamTagsPebSubDetsFromSubDetList", sdFromSubDetList);
407 // Result size monitoring
408 auto monResultSizeTotal = Monitored::Scalar<float>("ResultSizeTotal", totalSizeWords*wordsToKiloBytes);
409 auto monResultSizeFullEvFrag = Monitored::Scalar<float>("ResultSizeFullEvFrag", rawEvent.fragment_size_word()*wordsToKiloBytes);
410 auto monResultCollModuleID = Monitored::Collection("ResultModuleID", resultSizeMap_moduleID);
411 auto monResultCollModuleSize = Monitored::Collection("ResultModuleSize", resultSizeMap_size, [](uint32_t sw){return sw*wordsToKiloBytes;});
412 auto monResultSizeByStream = Monitored::Collection("ResultSizeStream", streamResultSize);
413 // Collect all variables
414 Monitored::Group(m_monTool, monStreamTagsNum, monStreamTags, monStreamTagsType, monStreamTagCorrA,
415 monStreamTagCorrB, monStreamIsPeb, monPebRobsNum, monPebSubDetsNum, monSubDetsFromRobList,
416 monSubDetsFromSubDetList, monResultSizeTotal, monResultSizeFullEvFrag, monResultCollModuleID,
417 monResultCollModuleSize, monResultSizeByStream);
418}
static Double_t ss
bool contains(const std::string &s, const std::string &regx)
does a string contain the substring
Definition hcg.cxx:114
str index
Definition DeMoScan.py:362
ValuesCollection< T > Collection(std::string name, const T &collection)
Declare a monitored (double-convertible) collection.
setWord1 uint16_t

◆ printRawEvent()

void TrigByteStreamCnvSvc::printRawEvent ( const EventContext & eventContext) const
private

Print contents of the raw event.

Definition at line 421 of file TrigByteStreamCnvSvc.cxx.

421 {
422 RawEventWrite* re = getRawEvent(eventContext);
423
424 if (!re) {
425 ATH_MSG_WARNING("RawEventWrite pointer is null");
426 return;
427 }
428 std::ostringstream ss;
429 ss << "Dumping header of the FullEventFragment with HLT result:" << std::endl;
430 ss << "--> status = "
431 << printNWordsHex<uint32_t>(re->nstatus(), re->status())
432 << std::endl;
433 ss << "--> source_id = " << printWordHex<uint32_t>(re->source_id()) << std::endl;
434 ss << "--> checksum_type = " << printWordHex<uint32_t>(re->checksum_type()) << std::endl;
435 ss << "--> compression_type = " << printWordHex<uint32_t>(re->compression_type()) << std::endl;
436 ss << "--> compression_level = " << re->compression_level() << std::endl;
437 ss << "--> bc_time_seconds = " << re->bc_time_seconds() << std::endl;
438 ss << "--> bc_time_nanoseconds = " << re->bc_time_nanoseconds() << std::endl;
439 ss << "--> global_id = " << re->global_id() << std::endl;
440 ss << "--> run_type = " << re->run_type() << std::endl;
441 ss << "--> run_no = " << re->run_no() << std::endl;
442 ss << "--> lumi_block = " << re->lumi_block() << std::endl;
443 ss << "--> lvl1_id = " << re->lvl1_id() << std::endl;
444 ss << "--> bc_id = " << re->bc_id() << std::endl;
445 ss << "--> lvl1_trigger_type = " << printWordHex<uint8_t>(re->lvl1_trigger_type()) << std::endl;
446 ss << "--> lvl1_trigger_info = "
447 << printNWordsHex<uint32_t>(re->nlvl1_trigger_info(), re->lvl1_trigger_info())
448 << std::endl;
449 ss << "--> lvl2_trigger_info = "
450 << printNWordsHex<uint32_t>(re->nlvl2_trigger_info(), re->lvl2_trigger_info())
451 << std::endl;
452 ss << "--> event_filter_info = "
453 << printNWordsHex<uint32_t>(re->nevent_filter_info(), re->event_filter_info())
454 << std::endl;
455 ss << "--> hlt_info = "
456 << printNWordsHex<uint32_t>(re->nhlt_info(), re->hlt_info())
457 << std::endl;
458
459 std::vector<eformat::helper::StreamTag> stream_tags;
460 try {
461 eformat::helper::decode(re->nstream_tag(), re->stream_tag(), stream_tags);
462 }
463 catch (const std::exception& ex) {
464 ATH_MSG_ERROR("StreamTag decoding failed, caught an unexpected std::exception " << ex.what());
465 return;
466 }
467 catch (...) {
468 ATH_MSG_ERROR("StreamTag decoding failed, caught an unexpected exception");
469 return;
470 }
471 ss << "--> stream_tags = ";
472 bool first = true;
473 for (const auto& st : stream_tags) {
474 if (first) first=false;
475 else ss << " ";
476 ss << "{" << st.name << ", " << st.type << ", obeysLB=" << st.obeys_lumiblock << ", robs=[";
477 for (const auto& robid : st.robs) ss << printWordHex<uint32_t>(robid) << ", ";
478 ss << "], dets = [";
479 for (const auto& detid : st.dets) ss << printWordHex<uint8_t>(detid) << ", ";
480 ss << "]}" << std::endl;
481 }
482
483 ATH_MSG_DEBUG(ss.str());
484}
bool first
Definition DeMoScan.py:534

◆ setRawEvent()

RawEventWrite * TrigByteStreamCnvSvc::setRawEvent ( std::unique_ptr< RawEventWrite > && rawEventWrite,
const EventContext & eventContext )
private

Store new raw event in the cache.

Definition at line 286 of file TrigByteStreamCnvSvc.cxx.

286 {
287 *(m_rawEventWriteCache.get(eventContext)) = std::move(rawEventWrite);
288 return getRawEvent(eventContext);
289}

◆ storeFullEventAssembler()

StatusCode TrigByteStreamCnvSvc::storeFullEventAssembler ( std::unique_ptr< FullEventAssemblerBase > fea,
const std::string & name )
overrideprotectedvirtual

Definition at line 143 of file TrigByteStreamCnvSvc.cxx.

144 {
145 ATH_MSG_ERROR("Bytestream creation is not supported by TrigByteStreamCnvSvc");
146 return StatusCode::FAILURE;
147}

Member Data Documentation

◆ m_efInterfaceSvc

ServiceHandle<EFInterfaceSvc> TrigByteStreamCnvSvc::m_efInterfaceSvc {this, "EFInterfaceSvc", "", "Online service managing EF interface with Dataflow"}
private

Definition at line 75 of file TrigByteStreamCnvSvc.h.

75{this, "EFInterfaceSvc", "", "Online service managing EF interface with Dataflow"};

◆ m_evtStore

ServiceHandle<StoreGateSvc> TrigByteStreamCnvSvc::m_evtStore {this, "EventStore", "StoreGateSvc"}
private

Definition at line 73 of file TrigByteStreamCnvSvc.h.

73{this, "EventStore", "StoreGateSvc"};

◆ m_hasEFInterface

bool TrigByteStreamCnvSvc::m_hasEFInterface {false}
private

Definition at line 80 of file TrigByteStreamCnvSvc.h.

80{false};

◆ m_monTool

ToolHandle<GenericMonitoringTool> TrigByteStreamCnvSvc::m_monTool {this, "MonTool", "" , "Monitoring tool"}
private

Definition at line 76 of file TrigByteStreamCnvSvc.h.

76{this, "MonTool", "" , "Monitoring tool"};

◆ m_rawEventWriteCache

SG::SlotSpecificObj<std::unique_ptr<RawEventWrite> > TrigByteStreamCnvSvc::m_rawEventWriteCache
private

Definition at line 79 of file TrigByteStreamCnvSvc.h.

◆ m_robDataProviderSvc

ServiceHandle<IROBDataProviderSvc> TrigByteStreamCnvSvc::m_robDataProviderSvc {this, "ROBDataProvider", "ROBDataProviderSvc"}
private

Definition at line 74 of file TrigByteStreamCnvSvc.h.

74{this, "ROBDataProvider", "ROBDataProviderSvc"};

The documentation for this class was generated from the following files: