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 80 of file TrigByteStreamCnvSvc.cxx.

81 : base_class(name, svcLoc) {}

◆ ~TrigByteStreamCnvSvc()

TrigByteStreamCnvSvc::~TrigByteStreamCnvSvc ( )
virtual

Standard destructor.

Definition at line 86 of file TrigByteStreamCnvSvc.cxx.

86{}

Member Function Documentation

◆ clearRawEvent()

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

Delete raw event from the cache.

Definition at line 286 of file TrigByteStreamCnvSvc.cxx.

286 {
287 m_rawEventWriteCache.get(eventContext)->reset();
288}
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 185 of file TrigByteStreamCnvSvc.cxx.

185 {
186 const EventContext* eventContext = currentContext();
187 if (eventContext == nullptr) return StatusCode::FAILURE;
188 return commitOutput(outputFile, do_commit, *eventContext);
189}
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 191 of file TrigByteStreamCnvSvc.cxx.

191 {
192 ATH_MSG_VERBOSE("start of " << __FUNCTION__);
193
194 if (msgLvl(MSG::DEBUG)) printRawEvent(eventContext);
195
196 RawEventWrite* re = getRawEvent(eventContext);
197
198 // Serialise the output FullEventFragment
199 std::unique_ptr<uint32_t[]> rawEventPtr;
200 try {
201 const eformat::write::node_t* top = re->bind();
202 uint32_t rawEventSize = re->size_word();
203 rawEventPtr = std::make_unique<uint32_t[]>(rawEventSize);
204 uint32_t copiedSize = eformat::write::copy(*top,rawEventPtr.get(),rawEventSize);
205 if(copiedSize!=rawEventSize) {
206 ATH_MSG_ERROR("FullEventFragment serialisation failed");
207 return StatusCode::FAILURE;
208 }
209 }
210 catch (const std::exception& e) {
211 ATH_MSG_ERROR("FullEventFragment serialisation failed, caught an unexpected std::exception " << e.what());
212 clearRawEvent(eventContext);
213 return StatusCode::FAILURE;
214 }
215 catch (...) {
216 ATH_MSG_ERROR("FullEventFragment serialisation failed, caught an unexpected exception");
217 clearRawEvent(eventContext);
218 return StatusCode::FAILURE;
219 }
220
221 {
222 auto t_mon = Monitored::Timer("TIME_monitorRawEvent");
223 monitorRawEvent(rawEventPtr);
224 Monitored::Group(m_monTool, t_mon);
225 }
226
227 // Send output to the DataCollector
228 StatusCode result = StatusCode::SUCCESS;
229 try {
230 auto t_eventDone = Monitored::Timer<std::chrono::duration<float, std::milli>>("TIME_eventDone");
232 m_efInterfaceSvc->eventDone(std::move(rawEventPtr));
233 else
234 hltinterface::DataCollector::instance()->eventDone(std::move(rawEventPtr));
235 Monitored::Group(m_monTool, t_eventDone);
236 ATH_MSG_DEBUG("Serialised FullEventFragment with HLT result was returned to DataCollector successfully, "
237 << "the eventDone call took " << (double)t_eventDone << " milliseconds");
238 }
239 catch (const std::exception& e) {
240 ATH_MSG_ERROR("Sending output to DataCollector failed, caught an unexpected std::exception " << e.what());
241 result = StatusCode::FAILURE;
242 }
243 catch (...) {
244 ATH_MSG_ERROR("Sending output to DataCollector failed, caught an unexpected exception");
245 result = StatusCode::FAILURE;
246 }
247
248 clearRawEvent(eventContext);
249
250 ATH_MSG_VERBOSE("end of " << __FUNCTION__);
251 return result;
252}
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 147 of file TrigByteStreamCnvSvc.cxx.

147 {
148 const EventContext* eventContext = currentContext();
149 if (eventContext == nullptr) return StatusCode::FAILURE;
150 return connectOutput(outputFile, *eventContext);
151}
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 153 of file TrigByteStreamCnvSvc.cxx.

153 {
154 ATH_MSG_VERBOSE("start of " << __FUNCTION__);
155
156 ATH_MSG_DEBUG("Creating new RawEventWrite for EventContext = " << eventContext);
157 // Create a new RawEventWrite and copy the header from the input RawEvent
158 RawEventWrite* re = setRawEvent(std::make_unique<RawEventWrite>(), eventContext);
159 const uint32_t* inputRawEvent = m_robDataProviderSvc->getEvent(eventContext)->start();
160 if (!inputRawEvent) {
161 ATH_MSG_ERROR("Input RawEvent is nullptr, cannot create output");
162 return StatusCode::FAILURE;
163 }
164 re->copy_header(inputRawEvent);
165
166 ATH_MSG_VERBOSE("Created RawEventWrite pointer = " << re);
167
168 ATH_MSG_VERBOSE("end of " << __FUNCTION__);
169 return StatusCode::SUCCESS;
170}
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 176 of file TrigByteStreamCnvSvc.cxx.

176 {
177 return connectOutput(outputFile);
178}

◆ currentContext()

const EventContext * TrigByteStreamCnvSvc::currentContext ( ) const
private

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

Definition at line 255 of file TrigByteStreamCnvSvc.cxx.

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

◆ finalize()

StatusCode TrigByteStreamCnvSvc::finalize ( )
overridevirtual

Definition at line 114 of file TrigByteStreamCnvSvc.cxx.

114 {
115 ATH_MSG_VERBOSE("start of " << __FUNCTION__);
116 if (m_robDataProviderSvc.release().isFailure())
117 ATH_MSG_WARNING("Failed to release service " << m_robDataProviderSvc.typeAndName());
118 if (m_hasEFInterface){
119 if (m_efInterfaceSvc.release().isFailure())
120 ATH_MSG_WARNING("Failed to release service " << m_efInterfaceSvc.typeAndName());
121 }
122 if (m_evtStore.release().isFailure())
123 ATH_MSG_WARNING("Failed to release service " << m_evtStore.typeAndName());
124 ATH_MSG_VERBOSE("end of " << __FUNCTION__);
125 ATH_CHECK(ByteStreamCnvSvcBase::finalize());
126 return StatusCode::SUCCESS;
127}
#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 132 of file TrigByteStreamCnvSvc.cxx.

132 {
133 ATH_MSG_ERROR("Bytestream creation is not supported by TrigByteStreamCnvSvc");
134 return nullptr;
135}

◆ getRawEvent() [1/2]

RawEventWrite * TrigByteStreamCnvSvc::getRawEvent ( )
overridevirtual

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

Definition at line 268 of file TrigByteStreamCnvSvc.cxx.

268 {
269 const EventContext* eventContext = currentContext();
270 if (eventContext == nullptr) return nullptr;
271 return getRawEvent(*eventContext);
272}

◆ 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 275 of file TrigByteStreamCnvSvc.cxx.

275 {
276 return m_rawEventWriteCache.get(eventContext)->get();
277}

◆ initialize()

StatusCode TrigByteStreamCnvSvc::initialize ( )
overridevirtual

Definition at line 91 of file TrigByteStreamCnvSvc.cxx.

91 {
92 ATH_MSG_VERBOSE("start of " << __FUNCTION__);
94 ATH_CHECK(m_evtStore.retrieve());
96 //Check if EFInterfaceSvc is available and set flag for selecting which interface to use
97 if (!m_efInterfaceSvc.empty()) {
98 ATH_MSG_INFO("Using EFInterfaceSvc");
99 ATH_CHECK(m_efInterfaceSvc.retrieve());
100 m_hasEFInterface = true;
101 }
102 else {
103 ATH_MSG_INFO("Using legacy dataflow interface");
104 m_hasEFInterface = false;
105 }
106 if (!m_monTool.empty()) ATH_CHECK(m_monTool.retrieve());
107 ATH_MSG_VERBOSE("end of " << __FUNCTION__);
108 return StatusCode::SUCCESS;
109}
#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 291 of file TrigByteStreamCnvSvc.cxx.

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

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

280 {
281 *(m_rawEventWriteCache.get(eventContext)) = std::move(rawEventWrite);
282 return getRawEvent(eventContext);
283}

◆ storeFullEventAssembler()

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

Definition at line 137 of file TrigByteStreamCnvSvc.cxx.

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

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: