ATLAS Offline Software
ByteStreamEventStorageInputSvc.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 #include "DumpFrags.h"
11 #include "EventStorage/pickDataReader.h"
12 #include "EventStorage/DataReader.h"
13 
14 #include "Gaudi/Property.h"
15 
18 #include "StoreGate/StoreGateSvc.h"
21 
22 #include "eformat/HeaderMarker.h"
23 #include "eformat/SourceIdentifier.h"
24 #include "eformat/Issue.h"
25 #include "eformat/Problem.h"
26 #include "eformat/Version.h"
27 #include "eformat/Status.h"
28 #include "eformat/old/util.h"
29 
30 #include <cstdio>
31 #include <string>
32 #include <vector>
33 #include <unistd.h>
34 
35 
36 /******************************************************************************/
37 // Constructor.
39  const std::string& name, ISvcLocator* pSvcLocator)
40  : base_class(name, pSvcLocator)
41  , m_readerMutex()
42  , m_eventsCache()
43  , m_reader()
44  , m_evtOffsets()
45  , m_evtInFile(0)
46  , m_evtFileOffset(0)
47  , m_fileGUID("")
48  , m_storeGate ("StoreGateSvc", name)
49  , m_inputMetadata("StoreGateSvc/InputMetaDataStore", name)
50  , m_robProvider ("ROBDataProviderSvc", name)
51  , m_sequential (this, "EnableSequential", false, "")
52  , m_dump (this, "DumpFlag", false, "Dump fragments")
53  , m_wait (this, "WaitSecs", 0., "Seconds to wait if input is in wait state")
54  , m_valEvent (this, "ValidateEvent", true, "switch on check_tree when reading events")
55  , m_eventInfoKey (this, "EventInfoKey", "EventInfo", "Key of EventInfo in metadata store")
56 {
57  assert(pSvcLocator != nullptr);
58 
59  declareProperty("EventStore", m_storeGate);
60  declareProperty("MetaDataStore", m_inputMetadata);
61 }
62 
63 
64 /******************************************************************************/
66 {}
67 
68 
69 /******************************************************************************/
72 {
73  ATH_MSG_INFO("Initializing");
74 
75  ATH_CHECK(m_inputMetadata.retrieve());
76  ATH_CHECK(m_storeGate.retrieve());
77  ATH_CHECK(m_robProvider.retrieve());
78 
79  return(StatusCode::SUCCESS);
80 }
81 
82 
83 /******************************************************************************/
86 {
87  // close moved to EventSelector for explicit coupling with incident
88  //if (m_reader != 0) closeBlockIterator(false);
89  return(StatusCode::SUCCESS);
90 }
91 
92 
93 /******************************************************************************/
96 
97  ATH_CHECK(m_storeGate.release());
98  ATH_CHECK(m_robProvider.release());
99  ATH_CHECK(m_inputMetadata.release());
100 
101  return(StatusCode::SUCCESS);
102 }
103 
104 
105 /******************************************************************************/
106 // Can't inline this because it is called via pointer to the base class
107 long
109 {
110  return m_evtOffsets.size();
111 }
112 
113 
114 /******************************************************************************/
117 {
118  // default goes into ByteStreamMetadata
119  auto bsmdc = std::make_unique<ByteStreamMetadataContainer>();
120  bsmdc->push_back(std::make_unique<ByteStreamMetadata>(*m_reader));
121  ATH_MSG_DEBUG("ByteStreamMetadata:\n" << *(bsmdc->front()));
122 
123  return m_inputMetadata->record(std::move(bsmdc), "ByteStreamMetadata");
124 }
125 
126 
127 /******************************************************************************/
128 const RawEvent*
130 {
131  std::lock_guard<std::mutex> lock(m_readerMutex);
132  const EventContext& context{Gaudi::Hive::currentContext()};
133  EventCache* cache = m_eventsCache.get(context);
134  // initialize before building RawEvent
135  cache->releaseEvent();
136 
137  // Load data buffer from file
138  unsigned int eventSize;
139  if (readerReady()) {
140  //get current event position (cast to long long until native tdaq implementation)
141  m_evtInFile--;
143  DRError ecode = m_reader->getData(eventSize, &(cache->data), m_evtOffsets.at(m_evtInFile - 1));
144 
145  if (DRWAIT == ecode && m_wait > 0) {
146  do {
147  // wait for n seconds
148  ATH_MSG_DEBUG("Waiting for input: " << m_wait << " seconds");
149  int result = usleep(static_cast<int>(m_wait * 1e6));
150  if (result != 0) {
151  ATH_MSG_ERROR("System Error while running sleep");
152  return nullptr;
153  }
154  } while(m_reader->getData(eventSize, &(cache->data), m_evtFileOffset) == DRWAIT);
155  } else if (DROK != ecode) {
156  ATH_MSG_ERROR("Error reading previous event");
158  }
159  ATH_MSG_DEBUG("Event Size " << eventSize);
160  }
161  else {
162  ATH_MSG_ERROR("DataReader not ready. Need to getBlockIterator first");
163  return 0;
164  }
165 
166  // Use buffer to build FullEventFragment
167  try {
168  buildFragment(cache, eventSize, true);
169  }
170  catch (...) {
171  // rethrow any exceptions
172  throw;
173  }
174 
175  if (cache->rawEvent == nullptr) {
176  ATH_MSG_ERROR("Failure to build fragment");
177  return nullptr;
178  }
179 
180  // Set it for the data provider
181  m_robProvider->setNextEvent(context, cache->rawEvent.get());
182  m_robProvider->setEventStatus(context, cache->eventStatus);
183 
184  // dump
185  if (m_dump) {
186  DumpFrags::dump(cache->rawEvent.get());
187  }
188  ATH_MSG_DEBUG( "switched to previous event in slot " << context);
189  return(cache->rawEvent.get());
190 }
191 
192 
193 /******************************************************************************/
194 // Read the next event.
195 const RawEvent*
197 
198  std::lock_guard<std::mutex> lock( m_readerMutex );
199  const EventContext& context{ Gaudi::Hive::currentContext() };
200  EventCache* cache = m_eventsCache.get(context);
201 
202  // initialize before building RawEvent
203  cache->releaseEvent();
204 
205  // Load data buffer from file
206  unsigned int eventSize;
207  if (readerReady()) {
208  DRError ecode;
209  // Check if have moved back from high water mark
210  m_evtInFile++; // increment iterator
211  if (m_evtInFile+1 > m_evtOffsets.size()) {
212  //get current event position (cast to long long until native tdaq implementation)
213  ATH_MSG_DEBUG("nextEvent _above_ high water mark");
214  m_evtFileOffset = static_cast<long long>(m_reader->getPosition());
215  m_evtOffsets.push_back(m_evtFileOffset);
216  ecode = m_reader->getData(eventSize, &(cache->data));
217  } else {
218  // Load from previous offset
219  ATH_MSG_DEBUG("nextEvent below high water mark");
221  ecode = m_reader->getData(eventSize, &(cache->data), m_evtFileOffset);
222  }
223 
224  if (DRWAIT == ecode && m_wait > 0) {
225  do {
226  // wait for n seconds
227  ATH_MSG_DEBUG("Waiting for input: " << m_wait << " seconds");
228  int result = usleep(static_cast<int>(m_wait * 1e6));
229  if (result != 0) {
230  ATH_MSG_ERROR("System Error while running sleep");
231  return 0;
232  }
233  } while(m_reader->getData(eventSize, &(cache->data)) == DRWAIT);
234  } else if (DROK != ecode) {
235  ATH_MSG_ERROR("Error reading next event");
237  }
238  ATH_MSG_DEBUG("Event Size " << eventSize);
239 
240  } else {
241  ATH_MSG_ERROR("DataReader not ready. Need to getBlockIterator first");
242  return 0;
243  }
244 
245  // Use buffer to build FullEventFragment
246  try {
247  buildFragment(cache, eventSize, true);
248  }
249  catch (...) {
250  // rethrow any exceptions
251  throw;
252  }
253 
254  if (cache->rawEvent == nullptr) {
255  ATH_MSG_ERROR("Failure to build fragment");
256  return nullptr;
257  }
258 
259  // Set it for the data provider
260  m_robProvider->setNextEvent(context, cache->rawEvent.get());
261  m_robProvider->setEventStatus(context, cache->eventStatus);
262 
263  //++m_totalEventCounter;
264 
265  // dump
266  if (m_dump) {
267  DumpFrags::dump(cache->rawEvent.get());
268  }
269  ATH_MSG_DEBUG("switched to next event in slot " << context);
270  return(cache->rawEvent.get());
271 }
272 
273 
274 /******************************************************************************/
275 void
277 {
278  const EventContext& context{Gaudi::Hive::currentContext()};
279  const RawEvent* const event = m_eventsCache.get(context)->rawEvent.get();
280  m_eventsCache.get(context)->eventStatus = validateEvent(event);
281 }
282 
283 
284 /******************************************************************************/
285 unsigned
287 {
288  unsigned int status = 0;
289  if (m_valEvent) {
290  // check validity
291  std::vector<eformat::FragmentProblem> problems;
292  rawEvent->problems(problems);
293 
294  if(!problems.empty()) {
295  status += 0x01000000;
296 
297  // bad event
298  ATH_MSG_WARNING("Failed to create FullEventFragment");
299  for(const auto& problem : problems)
300  ATH_MSG_WARNING(eformat::helper::FragmentProblemDictionary.string(problem));
301 
303  }
304 
305  if(!ROBFragmentCheck(rawEvent)) {
306  status += 0x02000000;
307 
308  // bad event
309  ATH_MSG_ERROR("Skipping bad event");
311  }
312  } else {
313  ATH_MSG_DEBUG("Processing event without validating.");
314  }
315  return status;
316 }
317 
318 
319 /******************************************************************************/
320 void
322  EventCache* cache, uint32_t eventSize, bool validate) const {
325  DataType* fragment = reinterpret_cast<DataType*>(cache->data);
326 
327  if (validate) {
328  // check fragment type
329  const DataType headWord = fragment[0];
330  ATH_MSG_DEBUG("First word of the fragment " << MSG::hex << headWord << MSG::dec);
331  // format version
332  const DataType formatVersion = eformat::helper::Version(fragment[3]).major_version();
333  ATH_MSG_DEBUG("Format version" << MSG::hex << formatVersion << MSG::dec);
334  // error message
335  if((formatVersion != eformat::MAJOR_DEFAULT_VERSION) &&
336  (formatVersion != eformat::MAJOR_V24_VERSION) &&
337  (formatVersion != eformat::MAJOR_V30_VERSION) &&
338  (formatVersion != eformat::MAJOR_V40_VERSION) &&
339  (formatVersion != eformat::MAJOR_V31_VERSION) ) {
340  ATH_MSG_ERROR("unsupported Format Version : "
341  << MSG::hex << formatVersion << MSG::dec);
342  }
343 
344  if(eformat::FULL_EVENT == headWord || 0xcc1234cc == headWord) { // ROS = 0xcc1234cc
345  try {
346  // convert old fragment
347  if(formatVersion != eformat::MAJOR_DEFAULT_VERSION) {
348  // 100 for increase of data-size due to header conversion
349  const uint32_t newEventSize = eventSize + 1000;
350  DataType* newFragment = new DataType[newEventSize];
351  eformat::old::convert(fragment, newFragment, newEventSize);
352 
353  // delete old fragment
354  delete [] fragment; fragment = nullptr;
355 
356  // set new pointer
357  fragment = newFragment;
358  cache->data = reinterpret_cast< char* >(fragment);
359  }
360  } catch (const eformat::Issue& ex) {
361  // bad event
362  ATH_MSG_WARNING(ex.what());
363  ATH_MSG_ERROR("Skipping bad event");
365  }
366  } else {
367  // Unknown fragment
368  ATH_MSG_FATAL("Unknown Header work in input fragment " << MSG::hex << headWord);
370  }
371  }
372 
373  // This is a FullEventFragment
374  // make a new FEFrag in memory from it
375  cache->eventStatus = 0;
376  if(fragment[5] > 0) {
377  cache->eventStatus += eformat::helper::Status(fragment[6]).specific();
378  cache->eventStatus += (eformat::helper::Status(fragment[6]).generic() & 0x000000ff) << 16;
379  }
380 
381  // This is a FullEventFragment
382  // make a new RawEvent in memory from it
383  cache->rawEvent = std::make_unique<RawEvent>(fragment);
384  ATH_MSG_DEBUG("Made an FullEventFragment from ES " << fragment);
385 }
386 
387 
388 /******************************************************************************/
391 {
392  // get file GUID
393  m_fileGUID = m_reader->GUID();
394 
395  // reader returns -1 when end of the file is reached
396  if(m_evtFileOffset != -1) {
397  ATH_MSG_DEBUG("ByteStream File GUID: " << m_fileGUID);
398  ATH_MSG_DEBUG("ByteStream Event Position in File: " << m_evtFileOffset);
399 
400  // To accommodate for skipEvents option in EventSelector
401  // While skipping BS event Selector does not return SUCCESS code,
402  // just advances silently through events. So SG content is not refreshed
403  // Lets do refresh of the event header here
404  std::string key = "ByteStreamDataHeader";
405  ATH_CHECK(deleteEntry<DataHeader>(key));
406 
407  // Created data header element with BS provenance information
408  std::unique_ptr<DataHeaderElement> dataHeaderElement = makeBSProvenance();
409  // Create data header itself
410  std::unique_ptr<DataHeader> dataHeader = std::make_unique<DataHeader>();
411  // Declare header primary
412  dataHeader->setStatus(DataHeader::Input);
413  // Set processTag
414  dataHeader->setProcessTag(dataHeaderElement->getKey());
415  //add the data header element self reference to the object vector
416  dataHeader->insert(*std::move(dataHeaderElement));
417 
418  // Clean up EventInfo from the previous event
419  key = m_eventInfoKey.value();
420  ATH_CHECK(deleteEntry<xAOD::EventInfo>(key));
421  // Now add ref to xAOD::EventInfo
422  std::unique_ptr<IOpaqueAddress> iopx = std::make_unique<ByteStreamAddress>(
424  ATH_CHECK(m_storeGate->recordAddress(key, iopx.release()));
425  const SG::DataProxy* ptmpx = m_storeGate->transientProxy(
427  if (ptmpx != nullptr) {
428  DataHeaderElement element(ptmpx, 0, key);
429  dataHeader->insert(element);
430  }
431 
432  // Clean up auxiliary EventInfo from the previous event
433  key = m_eventInfoKey.value() + "Aux.";
434  ATH_CHECK(deleteEntry<xAOD::EventAuxInfo>(key));
435  // Now add ref to xAOD::EventAuxInfo
436  std::unique_ptr<IOpaqueAddress> iopaux = std::make_unique<ByteStreamAddress>(
438  ATH_CHECK(m_storeGate->recordAddress(key, iopaux.release()));
439  const SG::DataProxy* ptmpaux = m_storeGate->transientProxy(
441  if (ptmpaux !=0) {
442  DataHeaderElement element(ptmpaux, 0, key);
443  dataHeader->insert(element);
444  }
445 
446  // Record new data header.Boolean flags will allow it's deletion in case
447  // of skipped events.
448  ATH_CHECK(m_storeGate->record<DataHeader>(dataHeader.release(),
449  "ByteStreamDataHeader", true, false, true));
450  }
451  return StatusCode::SUCCESS;
452 }
453 
454 
455 /******************************************************************************/
456 void
458 {
459  // cleanup parts of previous event and re-init them
460  if (rawEvent) {
461  rawEvent.reset(nullptr);
462  eventStatus = 0;
463  }
464 
465  if (data) {
466  delete [] data;
467  data = nullptr;
468  }
469 }
470 
471 
472 /******************************************************************************/
474 {
475  releaseEvent();
476 }
477 
478 
479 /******************************************************************************/
480 void
482 {
483  if (clearMetadata) {
484  ATH_MSG_WARNING("Clearing input metadata store");
485  StatusCode status = m_inputMetadata->clearStore();
486  if (!status.isSuccess()) {
487  ATH_MSG_WARNING("Unable to clear Input MetaData Proxies");
488  }
489  }
490 
491  if (!readerReady()) {
492  ATH_MSG_INFO("No more events in this run, high water mark for this file = "
493  << m_evtOffsets.size()-1);
494  }
495 
496  m_reader.reset();
497 }
498 
499 
500 /******************************************************************************/
501 bool
503 {
504  // enable SequenceReading
505  m_reader->enableSequenceReading();
506  return true;
507 }
508 
509 
510 /******************************************************************************/
511 bool
513 {
514  return readerReady();
515 }
516 
517 
518 /******************************************************************************/
519 std::pair<long,std::string>
521 {
522  // open the file
523  if(m_reader != 0) closeBlockIterator();
524 
525  m_reader = std::unique_ptr<EventStorage::DataReader>(pickDataReader(fileName));
526 
527  if(m_reader == nullptr) {
528  ATH_MSG_ERROR("Failed to open file " << fileName);
530  return std::make_pair(-1,"END");
531  }
532 
533  // Initialize offset vector
534  m_evtOffsets.resize(m_reader->eventsInFile(), -1);
535  m_evtOffsets.clear();
536 
537  // Get ByteStream Metadata into Input MetaData Store
538  // (include begin Input File Incident)
539  if (loadMetadata().isSuccess()) {
540  ATH_MSG_DEBUG("Recorded ByteStreamMetadata in InputMetaDataStore");
541  } else {
542  ATH_MSG_ERROR("Unable to record ByteStreamMetadata in InputMetaDataStore");
543  return std::make_pair(-1, "FAIL");
544  }
545 
546  m_evtInFile = 0;
547 
548  // enable sequentialReading if multiple files
549  if(m_sequential) {
550  bool test = setSequentialRead();
551  if (!test) return std::make_pair(-1,"SEQ");
552  }
553 
554  ATH_MSG_INFO("Picked valid file: " << m_reader->fileName());
555  // initialize offsets and counters
556  m_evtOffsets.push_back(static_cast<long long>(m_reader->getPosition()));
557  return std::make_pair(m_reader->eventsInFile(), m_reader->GUID());
558 }
559 
560 
561 /******************************************************************************/
562 bool
564 {
565  bool eofFlag(false);
566 
567  if (m_reader) eofFlag = m_reader->endOfFile();
568  else {
569  ATH_MSG_INFO("eformat reader object not initialized");
570  return false;
571  }
572 
573  bool moreEvent = m_reader->good();
574 
575  return (!eofFlag) && moreEvent;
576 }
577 
578 
579 /******************************************************************************/
580 bool
582 {
583  bool allOK = true;
584  uint32_t total = re->nchildren();
585  uint32_t lastId = 0;
586  std::vector<eformat::FragmentProblem> problems;
587 
588  for (size_t i = 0; i<total; ++i) {
590  re->child(fp, i);
591 
593  lastId = f.source_id();
594 
595  problems.clear();
596  f.problems(problems);
597  if(!problems.empty()) {
598  allOK = false;
599  for(const auto& problem : problems) {
600  ATH_MSG_WARNING("Failed to create ROBFragment id = " << lastId << ", "
601  << eformat::helper::SourceIdentifier(lastId).human() << " : "
602  << eformat::helper::FragmentProblemDictionary.string(problem));
603  }
604  }
605  }
606 
607  return allOK;
608 }
609 
610 
611 /******************************************************************************/
612 void
613 ByteStreamEventStorageInputSvc::setEvent(void* data, unsigned int eventStatus)
614 {
615  const EventContext& context{Gaudi::Hive::currentContext()};
616  return setEvent(context, data, eventStatus);
617 }
618 
619 
620 /******************************************************************************/
621 void
622 ByteStreamEventStorageInputSvc::setEvent(const EventContext& context,
623  void* data, unsigned int eventStatus)
624 {
626  EventCache* cache = m_eventsCache.get(context);
627  cache->releaseEvent();
628 
629  DataType* fragment = reinterpret_cast<DataType*>(data);
630  cache->rawEvent = std::make_unique<RawEvent>(fragment);
631  cache->eventStatus = eventStatus;
632 
633  // Set it for the data provider
634  m_robProvider->setNextEvent(context, cache->rawEvent.get());
635  m_robProvider->setEventStatus(context, cache->eventStatus);
636 
637  // Build a DH for use by other components
638  StatusCode rec_sg = generateDataHeader();
639  if (rec_sg != StatusCode::SUCCESS) {
640  ATH_MSG_ERROR("Fail to record BS DataHeader in StoreGate. Skipping events?! "
641  << rec_sg);
642  }
643 }
644 
645 
646 /******************************************************************************/
647 const
649 {
650  const EventContext& context{Gaudi::Hive::currentContext()};
651  return m_eventsCache.get(context)->rawEvent.get();
652 }
653 
654 
655 /******************************************************************************/
656 unsigned int
658 {
659  const EventContext& context{Gaudi::Hive::currentContext()};
660  return m_eventsCache.get(context)->eventStatus;
661 }
662 
663 
664 /******************************************************************************/
665 std::unique_ptr<DataHeaderElement>
667 {
668  std::unique_ptr<Token> token = std::make_unique<Token>();
669  token->setDb(m_fileGUID);
670  token->setTechnology(0x00001000);
671  token->setOid(Token::OID_t(0LL, m_evtFileOffset));
672 
673  // note: passing ownership of token to DataHeaderElement
674  return std::make_unique<DataHeaderElement>(ClassID_traits<DataHeader>::ID(),
675  "StreamRAW", token.release());
676 }
DumpFrags.h
ByteStreamEventStorageInputSvc::m_evtFileOffset
long long int m_evtFileOffset
last read in event offset within a file, can be -1
Definition: ByteStreamEventStorageInputSvc.h:87
DataHeader::setProcessTag
void setProcessTag(const std::string &processTag)
Set ProcessTag for DataHeader.
Definition: DataHeader.cxx:243
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
validation.validate
def validate(testSampleDir, thisSampleName, testSamplePath, weight_database, outputSamples)
Definition: validation.py:26
ByteStreamEventStorageInputSvc::EventCache
Definition: ByteStreamEventStorageInputSvc.h:72
get_generator_info.result
result
Definition: get_generator_info.py:21
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
OFFLINE_FRAGMENTS_NAMESPACE::DataType
uint32_t DataType
Definition: RawEvent.h:24
ByteStreamEventStorageInputSvc::m_readerMutex
std::mutex m_readerMutex
Definition: ByteStreamEventStorageInputSvc.h:70
ByteStreamEventStorageInputSvc.h
This file contains the class definition for the ByteStreamEventStorageInputSvc class.
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
DataHeader::Input
@ Input
Definition: DataHeader.h:126
ByteStreamEventStorageInputSvc::m_evtOffsets
std::vector< long long int > m_evtOffsets
offset for event i in that file
Definition: ByteStreamEventStorageInputSvc.h:85
ByteStreamEventStorageInputSvc::m_eventsCache
SG::SlotSpecificObj< EventCache > m_eventsCache
Definition: ByteStreamEventStorageInputSvc.h:81
ByteStreamEventStorageInputSvc::ready
virtual bool ready() override
Definition: ByteStreamEventStorageInputSvc.cxx:512
ByteStreamEventStorageInputSvc::m_storeGate
ServiceHandle< StoreGateSvc > m_storeGate
Pointer to StoreGate.
Definition: ByteStreamEventStorageInputSvc.h:95
Issue
Configuration Issue
Definition: PscIssues.h:31
ByteStreamEventStorageInputSvc::setSequentialRead
virtual bool setSequentialRead()
Definition: ByteStreamEventStorageInputSvc.cxx:502
DataType
OFFLINE_FRAGMENTS_NAMESPACE::PointerType DataType
Definition: RoIBResultByteStreamTool.cxx:25
ByteStreamEventStorageInputSvc::validateEvent
virtual void validateEvent() override
Definition: ByteStreamEventStorageInputSvc.cxx:276
RawEvent
OFFLINE_FRAGMENTS_NAMESPACE::FullEventFragment RawEvent
data type for reading raw event
Definition: RawEvent.h:37
ByteStreamMetadataContainer.h
This file contains the class definition for the ByteStreamMetadataContainer class.
ByteStreamEventStorageInputSvc::m_eventInfoKey
Gaudi::Property< std::string > m_eventInfoKey
Definition: ByteStreamEventStorageInputSvc.h:102
ByteStreamEventStorageInputSvc::EventCache::eventStatus
unsigned int eventStatus
check_tree() status of the current event
Definition: ByteStreamEventStorageInputSvc.h:75
ByteStreamEventStorageInputSvc::m_robProvider
ServiceHandle< IROBDataProviderSvc > m_robProvider
Definition: ByteStreamEventStorageInputSvc.h:97
TrigInDetValidation_Base.test
test
Definition: TrigInDetValidation_Base.py:147
ByteStreamEventStorageInputSvc::generateDataHeader
virtual StatusCode generateDataHeader() override
Definition: ByteStreamEventStorageInputSvc.cxx:390
ByteStreamEventStorageInputSvc::stop
virtual StatusCode stop() override
Definition: ByteStreamEventStorageInputSvc.cxx:85
ByteStreamEventStorageInputSvc::nextEvent
virtual const RawEvent * nextEvent() override
++, new
Definition: ByteStreamEventStorageInputSvc.cxx:196
ByteStreamEventStorageInputSvc::m_evtInFile
unsigned int m_evtInFile
Definition: ByteStreamEventStorageInputSvc.h:86
ByteStreamEventStorageInputSvc::m_dump
Gaudi::Property< bool > m_dump
Definition: ByteStreamEventStorageInputSvc.h:99
ByteStreamEventStorageInputSvc::closeBlockIterator
virtual void closeBlockIterator(bool clearMetadata=true) override
Definition: ByteStreamEventStorageInputSvc.cxx:481
ByteStreamEventStorageInputSvc::m_valEvent
Gaudi::Property< bool > m_valEvent
Definition: ByteStreamEventStorageInputSvc.h:101
ByteStreamEventStorageInputSvc::loadMetadata
StatusCode loadMetadata()
Definition: ByteStreamEventStorageInputSvc.cxx:116
ByteStreamEventStorageInputSvc::m_wait
Gaudi::Property< float > m_wait
Definition: ByteStreamEventStorageInputSvc.h:100
ByteStreamEventStorageInputSvc::ROBFragmentCheck
bool ROBFragmentCheck(const RawEvent *) const
Definition: ByteStreamEventStorageInputSvc.cxx:581
DataHeaderElement::getKey
const std::string & getKey() const
Definition: DataHeader.cxx:127
Token::OID_t
Definition: Token.h:24
ByteStreamEventStorageInputSvc::EventCache::rawEvent
std::unique_ptr< RawEvent > rawEvent
current event
Definition: ByteStreamEventStorageInputSvc.h:73
OFFLINE_FRAGMENTS_NAMESPACE::PointerType
const DataType * PointerType
Definition: RawEvent.h:25
DataHeaderElement
This class provides a persistent form for the TransientAddress.
Definition: DataHeader.h:36
FortranAlgorithmOptions.fileName
fileName
Definition: FortranAlgorithmOptions.py:13
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
ByteStreamExceptions::readError
Definition: ByteStreamExceptions.h:21
ByteStreamEventStorageInputSvc::positionInBlock
virtual long positionInBlock() override
Definition: ByteStreamEventStorageInputSvc.cxx:108
ByteStreamEventStorageInputSvc::m_reader
std::unique_ptr< EventStorage::DataReader > m_reader
DataReader from EventStorage.
Definition: ByteStreamEventStorageInputSvc.h:83
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
ByteStreamEventStorageInputSvc::ByteStreamEventStorageInputSvc
ByteStreamEventStorageInputSvc(const std::string &name, ISvcLocator *pSvcLocator)
Constructors:
Definition: ByteStreamEventStorageInputSvc.cxx:38
eformat::ROBFragment
Definition: L1CaloBsDecoderUtil.h:12
DataHeader
This class provides the layout for summary information stored for data written to POOL.
Definition: DataHeader.h:124
lumiFormat.i
int i
Definition: lumiFormat.py:85
trigmenu_modify_prescale_json.fp
fp
Definition: trigmenu_modify_prescale_json.py:53
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
ByteStreamExceptions.h
ClassID_traits
Default, invalid implementation of ClassID_traits.
Definition: Control/AthenaKernel/AthenaKernel/ClassID_traits.h:40
ByteStreamEventStorageInputSvc::initialize
virtual StatusCode initialize() override
Required of all Gaudi Services.
Definition: ByteStreamEventStorageInputSvc.cxx:71
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Token::setDb
Token & setDb(const Guid &db)
Set database name.
Definition: Token.h:64
hist_file_dump.f
f
Definition: hist_file_dump.py:135
ByteStreamAddress.h
Token::setTechnology
Token & setTechnology(int t)
Set technology type.
Definition: Token.h:77
DataHeader.h
This file contains the class definition for the DataHeader and DataHeaderElement classes.
DataHeader::insert
void insert(const SG::TransientAddress *sgAddress, IOpaqueAddress *tokAddress=0, const std::string &pTag="")
Insert a new element into the "DataObject" vector.
Definition: DataHeader.cxx:267
ByteStreamExceptions::badFragmentData
Definition: ByteStreamExceptions.h:33
DataHeader::setStatus
void setStatus(statusFlag status)
Set StatusFlag enum for DataHeader.
Definition: DataHeader.cxx:235
EventAuxInfo.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
ByteStreamEventStorageInputSvc::readerReady
bool readerReady()
Definition: ByteStreamEventStorageInputSvc.cxx:563
ByteStreamEventStorageInputSvc::EventCache::data
char * data
take ownership of RawEvent content
Definition: ByteStreamEventStorageInputSvc.h:74
ByteStreamEventStorageInputSvc::buildFragment
void buildFragment(EventCache *cache, uint32_t eventSize, bool validate) const
Definition: ByteStreamEventStorageInputSvc.cxx:321
Token::setOid
Token & setOid(const OID_t &oid)
Set object identifier.
Definition: Token.h:83
ByteStreamEventStorageInputSvc::EventCache::~EventCache
virtual ~EventCache()
calls releaseEvent
Definition: ByteStreamEventStorageInputSvc.cxx:473
TMVAToMVAUtils::convert
std::unique_ptr< MVAUtils::BDT > convert(TMVA::MethodBDT *bdt, bool isRegression=true, bool useYesNoLeaf=false)
Definition: TMVAToMVAUtils.h:114
EventInfo.h
ByteStreamExceptions::badFragment
Definition: ByteStreamExceptions.h:27
Athena::Status
Status
Athena specific StatusCode values.
Definition: AthStatusCode.h:22
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
ByteStreamEventStorageInputSvc::previousEvent
virtual const RawEvent * previousEvent() override
–, old
Definition: ByteStreamEventStorageInputSvc.cxx:129
ByteStreamEventStorageInputSvc::m_sequential
Gaudi::Property< bool > m_sequential
enable sequential reading.
Definition: ByteStreamEventStorageInputSvc.h:98
re
const boost::regex re(r_e)
ByteStreamEventStorageInputSvc::m_inputMetadata
ServiceHandle< StoreGateSvc > m_inputMetadata
StoreGateSvc.
Definition: ByteStreamEventStorageInputSvc.h:96
ByteStreamEventStorageInputSvc::currentEventStatus
virtual unsigned int currentEventStatus() const override
Return the current event status.
Definition: ByteStreamEventStorageInputSvc.cxx:657
merge.status
status
Definition: merge.py:17
DumpFrags::dump
static void dump(const RawEvent *re)
dump fragments from FullEventFragment
Definition: DumpFrags.h:23
SG::DataProxy
Definition: DataProxy.h:45
Token.h
This file contains the class definition for the Token class (migrated from POOL).
util.h
Declarations of methods for working with old eformat versions.
ByteStreamEventStorageInputSvc::currentEvent
virtual const RawEvent * currentEvent() const override
Implementation of the IByteStreamInputSvc interface methods.
Definition: ByteStreamEventStorageInputSvc.cxx:648
StoreGateSvc.h
ByteStreamEventStorageInputSvc::getBlockIterator
virtual std::pair< long, std::string > getBlockIterator(const std::string &fileName) override
Definition: ByteStreamEventStorageInputSvc.cxx:520
ByteStreamEventStorageInputSvc::makeBSProvenance
std::unique_ptr< DataHeaderElement > makeBSProvenance() const
Definition: ByteStreamEventStorageInputSvc.cxx:666
ByteStreamEventStorageInputSvc::finalize
virtual StatusCode finalize() override
Definition: ByteStreamEventStorageInputSvc.cxx:95
ByteStreamEventStorageInputSvc::m_fileGUID
std::string m_fileGUID
current file GUID
Definition: ByteStreamEventStorageInputSvc.h:89
ByteStreamEventStorageInputSvc::EventCache::releaseEvent
void releaseEvent()
deletes fragments and raw event
Definition: ByteStreamEventStorageInputSvc.cxx:457
ByteStreamEventStorageInputSvc::setEvent
virtual void setEvent(void *data, unsigned int eventStatus) override
Definition: ByteStreamEventStorageInputSvc.cxx:613
ByteStreamEventStorageInputSvc::~ByteStreamEventStorageInputSvc
virtual ~ByteStreamEventStorageInputSvc()
Destructor.
Definition: ByteStreamEventStorageInputSvc.cxx:65
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37