ATLAS Offline Software
ByteStreamEventStorageOutputSvc.cxx
Go to the documentation of this file.
1 /* Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration */
3 
4 #include <stdexcept>
5 #include <stdlib.h>
6 #include <sstream>
7 
8 #include <boost/shared_ptr.hpp>
9 
10 #include "ByteStreamDataWriter.h"
11 
12 #include "AthenaKernel/StoreID.h"
13 
16 
17 #include "EventStorage/EventStorageRecords.h"
18 #include "EventStorage/RawFileName.h"
19 #include "EventStorage/SimpleFileName.h"
20 
22 
23 #include "GaudiKernel/ServiceHandle.h"
24 #include "GaudiKernel/IIoComponentMgr.h"
25 
26 #include "StoreGate/ReadHandle.h"
27 
28 
30  const std::string& name, ISvcLocator* pSvcLocator)
31  : base_class(name, pSvcLocator) {
32 }
33 
34 
37  ATH_MSG_INFO("Initializing");
38 
41 
42  // register this service for 'I/O' events
43  ATH_CHECK(m_ioMgr.retrieve());
44  ATH_CHECK(m_ioMgr->io_register(this));
45 
46  // Register output file's name with the I/O manager
47  if (!m_simpleFileName.empty()) {
50  ATH_MSG_VERBOSE("io_register[" << this->name() << "]("
51  << m_simpleFileName << ") [ok]");
52  }
53 
54  // validate m_eformatVersion
55  const std::vector< std::string > choices_ef{"current", "v40", "run1"};
56  if (std::find(choices_ef.begin(), choices_ef.end(), m_eformatVersion)
57  == choices_ef.end()) {
58  ATH_MSG_FATAL("Unexpected value for EformatVersion property: "
59  << m_eformatVersion);
60  return StatusCode::FAILURE;
61  }
62  ATH_MSG_INFO("eformat version to use: \"" << m_eformatVersion << "\"");
63 
64  // validate m_eventStorageVersion
65  const std::vector< std::string > choices_es{"current", "v5", "run1"};
66  if (std::find(choices_es.begin(), choices_es.end(), m_eventStorageVersion)
67  == choices_es.end()) {
68  ATH_MSG_FATAL("Unexpected value for EventStorageVersion property: "
70  return StatusCode::FAILURE;
71  }
72  ATH_MSG_INFO("event storage (BS) version to use: \""
73  << m_eventStorageVersion << "\"");
74 
75  m_isRun1 = (m_eformatVersion == "v40" or m_eformatVersion == "run1");
76 
77  ATH_CHECK(reinit());
78 
79  return StatusCode::SUCCESS;
80 }
81 
82 
85  ATH_MSG_INFO("Reinitialization...");
86  return StatusCode::SUCCESS;
87 }
88 
89 
92  // Check whether anything has been written and whether the user wants metadata
93  // only files
94  if (m_dataWriter == 0 and m_writeEventless) {
95  const ByteStreamMetadata* metaData = getByteStreamMetadata();
96 
97  // Try to write metadata to eventless file
98  bool dWok = initDataWriterContents(nullptr, metaData);
99  if (!dWok) ATH_MSG_WARNING("Could not write Metadata for eventless file");
100  }
101 
102  return StatusCode::SUCCESS;
103 }
104 
105 
108  // clean up
109  ATH_MSG_DEBUG("deleting DataWriter");
110  m_dataWriter.reset();
111  ATH_MSG_INFO("number of events written: " << m_totalEventCounter);
112  return StatusCode::SUCCESS;
113 }
114 
115 
116 bool
118  // Called on first event. Reads run parameters first event and/or first event
119  const xAOD::EventInfo* eventInfo = ctx == nullptr
121  : SG::get(m_eventInfoKey, *ctx);
122  if (eventInfo == nullptr) ATH_MSG_WARNING("failed to retrieve EventInfo");
123 
124  const ByteStreamMetadata* metaData = ctx == nullptr ? getByteStreamMetadata() : getByteStreamMetadata(*ctx);
125  if (metaData == nullptr)
126  ATH_MSG_WARNING("failed to retrieve ByteStreamMetaData");
127 
128  // Now open a file for writing from retrieved parameters
129  return initDataWriterContents(eventInfo, metaData);
130 }
131 
132 
133 bool
135  const xAOD::EventInfo* evtInfo,
136  const ByteStreamMetadata* metaData) {
137  // check that we have sufficient information to do what we need
138  if (evtInfo or metaData)
139  ATH_MSG_DEBUG("Looking up data writer parameters");
140  else
141  throw std::runtime_error("Cannot write data without run parameters");
142 
143  // The heirarchy of run/lumiblock number, GNARR
144  //
145  // 1) User override
146  // 2) Event data
147  // 3) File metadata
148  // 4) default = unknown = 0
149  //
150  // Go from 4 to 1 and overwrite
152  if (metaData != nullptr) updateDataWriterParameters(params, *metaData);
153  if (evtInfo != nullptr) updateDataWriterParameters(params, *evtInfo);
155 
157 
158  bool result = m_dataWriter->good();
159  if (result)
160  ATH_MSG_DEBUG("initialized output stream to file with name "
161  << params.fileNameCore);
162  else
163  ATH_MSG_ERROR("Unable to initialize file");
164 
165  return result;
166 }
167 
168 
169 bool
171  // Read the next event.
172  return putEvent(re, Gaudi::Hive::currentContext());
173 }
174 
175 
176 bool
178  const RawEvent* re, const EventContext& ctx) {
179  // Read the next event.
182 
183  EventCache* cache = m_eventCache.get(ctx);
184  cache->releaseEvent();
185 
186  // we need the size and the start of the event to give to the data writer
187  cache->size = re->fragment_size_word();
188  ATH_MSG_DEBUG("event size = " << cache->size << ", start = " << re->start());
189 
190  if (m_isRun1) {
191  // convert to current eformat
192  // allocate some extra space just in case
193  ATH_MSG_DEBUG("converting Run 1 format ");
194 
195  cache->size += 128;
196  cache->buffer = std::make_unique< DataType[] >(cache->size);
197  ATH_MSG_DEBUG("created buffer 0x"
198  << std::hex << cache->buffer.get() << std::dec);
199 
200  // This builds no-checksum headers, should use the same
201  // checksum type as original event
203  re->start(), cache->buffer.get(), cache->size);
204  ATH_MSG_DEBUG("filled buffer");
205 
206  if (cache->size == 0) {
207  // not enough space in buffer
208  ATH_MSG_ERROR("Failed to convert event, buffer is too small");
209  return false;
210  }
211 
212  ATH_MSG_DEBUG("event size after conversion = " << cache->size
213  << " version = " << cache->buffer.get()[3]);
214 
215  } else {
216  cache->buffer = std::make_unique< DataType[] >(cache->size);
217  std::copy(re->start(), re->start() + cache->size, cache->buffer.get());
218  }
219 
220  {
221  // multiple data writers concurrently sounds like a bad idea
222  std::lock_guard< std::mutex > lock(m_dataWriterMutex);
223 
224  // make sure the data writer is ready
225  ATH_MSG_DEBUG("looking up data writer");
226  if (!m_dataWriter) {
227  if (!initDataWriter(&ctx)) {
228  ATH_MSG_ERROR("Failed to initialize DataWriter");
229  return false;
230  }
231  }
232 
233  // write event to disk
234  EventStorage::DWError write_result = m_dataWriter->putData(
235  sizeof(DataType) * cache->size,
236  reinterpret_cast< void* >(cache->buffer.get()));
237 
238  // Report success or failure
239  if (write_result != EventStorage::DWOK) {
240  ATH_MSG_ERROR("Failed to write event to DataWriter");
241  return false;
242  }
244  }
245 
246  return true;
247 }
248 
249 
252  ATH_MSG_INFO("I/O reinitialization...");
253 
254  if (!m_ioMgr->io_hasitem(this)) {
255  ATH_MSG_FATAL("IoComponentMgr does not know about myself !");
256  return StatusCode::FAILURE;
257  }
258 
259  if (!m_simpleFileName.empty()) {
260  std::string outputFile = m_simpleFileName;
261  ATH_MSG_INFO("I/O reinitialization, file = " << outputFile);
262  std::string &fname = outputFile;
263  if (!m_ioMgr->io_contains(this, fname)) {
264  ATH_MSG_ERROR("IoComponentMgr does not know about [" << fname << "] !");
265  return(StatusCode::FAILURE);
266  }
267  if (!m_ioMgr->io_retrieve(this, fname).isSuccess()) {
268  ATH_MSG_FATAL("Could not retrieve new value for [" << fname << "] !");
269  return(StatusCode::FAILURE);
270  }
271  // all good... copy over.
272  // modify directory
273  m_inputDir.setValue(outputFile.substr(0, outputFile.find_last_of("/")));
274  // FIXME: modify file name, not done for now because of
275  // IoUtils.update_io_registry vs. merge conflict.
276  //m_simpleFileName.setValue(
277  // outputFile.substr(outputFile.find_last_of("/") + 1));
278  }
279  ATH_MSG_DEBUG("Deleting DataWriter");
280  m_dataWriter.reset();
281 
282  ATH_CHECK(reinit());
283 
284  return StatusCode::SUCCESS;
285 }
286 
287 
288 const ByteStreamMetadata *
290 {
292 
293  if (!metaDataCont.isValid()) return nullptr;
294 
295  if (metaDataCont->size() > 1)
296  ATH_MSG_WARNING("Multiple run parameters in MetaDataStore. "
297  "Bytestream format only supports one. Arbitrarily "
298  "choosing first.");
299 
300  return metaDataCont->front();
301 }
302 
303 
304 const ByteStreamMetadata *
306  const EventContext& ctx)
307 {
309 
310  if (!metaDataCont.isValid()) return nullptr;
311 
312  if (metaDataCont->size() > 1)
313  ATH_MSG_WARNING("Multiple run parameters in MetaDataStore. "
314  "Bytestream format only supports one. Arbitrarily "
315  "choosing first.");
316 
317  return metaDataCont->front();
318 }
319 
320 
321 void
323  DataWriterParameters& params) const {
324 
325  if (m_eventStorageVersion == "v5" or m_eventStorageVersion == "run1")
326  params.version = 5;
327  else params.version = 0;
328 
329  params.writingPath = m_inputDir;
330 
331  if (m_run != 0) params.rPar.run_number = m_run;
332  ATH_MSG_DEBUG("Run number: " << params.rPar.run_number);
333 
334  if (m_lumiBlockNumber != 0) params.lumiBlockNumber = m_lumiBlockNumber;
335  ATH_MSG_DEBUG("LB number: " << params.lumiBlockNumber);
336 
337  if (!m_streamType.empty()) params.streamType = m_streamType;
338  if (!m_streamName.empty()) params.streamName = m_streamName;
339 
340  if (params.streamType.empty()) params.streamType = "Single";
341  if (params.streamName.empty()) params.streamName = "Stream";
342 
343  params.stream = params.streamType + "_" + params.streamName;
344 
345  if (!m_projectTag.empty()) params.project = m_projectTag;
346 
347  params.applicationName = m_appName;
348 
349  if (!m_simpleFileName.empty()) {
350  // set up for simple file name
351  boost::shared_ptr<EventStorage::SimpleFileName> simple_file_name(
352  new EventStorage::SimpleFileName(m_simpleFileName));
353  params.theFNCB = simple_file_name;
354  } else {
355  // set up for production file name
356  daq::RawFileName fileNameObj(
357  params.project,
358  params.rPar.run_number,
359  params.streamType,
360  params.streamName,
361  params.lumiBlockNumber,
362  params.applicationName);
363  params.fileNameCore = fileNameObj.fileNameCore();
364  }
365 
366  params.compression = m_compressEvents
368  : EventStorage::NONE;
369 
370  params.maxFileMB = m_maxFileMB;
371  params.maxFileNE = params.rPar.max_events = m_maxFileNE;
372 }
373 
374 
375 void
377  DataWriterParameters& params, const xAOD::EventInfo& eventInfo) const {
378  ATH_MSG_DEBUG("Parsing run parameters from EventInfo" << eventInfo);
379 
380  params.rPar.run_number = eventInfo.runNumber();
381  params.lumiBlockNumber = eventInfo.lumiBlock();
382 
383  for (const xAOD::EventInfo::StreamTag& tag : eventInfo.streamTags())
384  if(!tag.type().empty()) {
385  params.streamType = tag.type();
386  break;
387  }
388 
389  for (const xAOD::EventInfo::StreamTag& tag : eventInfo.streamTags())
390  if (!tag.name().empty()) {
391  params.streamName = tag.name();
392  break;
393  }
394 
395  for (const auto& tag : eventInfo.detDescrTags())
396  params.fmdStrings.push_back(tag.first + ' ' + tag.second);
397 
398  params.rPar.trigger_type = eventInfo.level1TriggerType();
399  params.rPar.detector_mask_LS = eventInfo.detectorMask();
400  params.rPar.detector_mask_MS = eventInfo.detectorMaskExt();
401 
402  std::string event_type = "Event type: sim/data - ";
403  if (eventInfo.eventType(xAOD::EventInfo::EventType::IS_SIMULATION))
404  event_type += "is sim";
405  else event_type += "is data";
406 
407  event_type += " , testbeam/atlas - ";
408  if (eventInfo.eventType(xAOD::EventInfo::EventType::IS_TESTBEAM))
409  event_type += "is testbeam";
410  else event_type += "is atlas";
411 
412  event_type += " , calibration/physics - ";
413  if (eventInfo.eventType(xAOD::EventInfo::EventType::IS_CALIBRATION))
414  event_type += "is calibration";
415  else event_type += "is physics";
416 
417  params.fmdStrings.push_back(event_type);
418 }
419 
420 
421 void
423  DataWriterParameters& params, const ByteStreamMetadata& metaData) const {
424  ATH_MSG_DEBUG("Parsing run parameters from metadata:\n" << metaData);
425 
426  params.rPar.run_number = metaData.getRunNumber();
427  params.lumiBlockNumber = metaData.getLumiBlock();
428 
429  const std::string stream = metaData.getStream();
430  const std::string::size_type split = stream.find('_');
431 
432  if (split != std::string::npos and params.streamType.empty())
433  params.streamType = stream.substr(0,split);
434 
435  if (split != std::string::npos and params.streamName.empty())
436  params.streamName = stream.substr(split+1);
437 
438  params.project = metaData.getProject();
439  params.maxFileNE = params.rPar.max_events = metaData.getMaxEvents();
440 
441  params.rPar.rec_enable = metaData.getRecEnable();
442  params.rPar.trigger_type = metaData.getTriggerType();
443  params.rPar.beam_type = metaData.getBeamType();
444  if (metaData.getBeamEnergy() != 0)
445  params.rPar.beam_energy = metaData.getBeamEnergy();
446 
447  params.rPar.detector_mask_LS = metaData.getDetectorMask();
448  params.rPar.detector_mask_MS = metaData.getDetectorMask2();
449 
450  for (const std::string& fmd : metaData.getFreeMetaDataStrings())
451  params.fmdStrings.push_back(fmd);
452  // if(fmd.find("Compression=") == std::string::npos)
453 }
ByteStreamEventStorageOutputSvc::initDataWriter
bool initDataWriter(const EventContext *ctx=nullptr)
initialize EventStorage's DataWriter
Definition: ByteStreamEventStorageOutputSvc.cxx:117
ByteStreamEventStorageOutputSvc::m_byteStreamMetadataKey
SG::ReadHandleKey< ByteStreamMetadataContainer > m_byteStreamMetadataKey
Definition: ByteStreamEventStorageOutputSvc.h:143
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
get_generator_info.result
result
Definition: get_generator_info.py:21
ByteStreamEventStorageOutputSvc::EventCache::size
unsigned int size
Definition: ByteStreamEventStorageOutputSvc.h:181
ByteStreamMetadata::getDetectorMask
uint64_t getDetectorMask() const
Definition: ByteStreamMetadata.cxx:156
ByteStreamEventStorageOutputSvc::m_writeEventless
Gaudi::Property< bool > m_writeEventless
Compress events.
Definition: ByteStreamEventStorageOutputSvc.h:126
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
OFFLINE_FRAGMENTS_NAMESPACE::DataType
uint32_t DataType
Definition: RawEvent.h:24
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
ByteStreamEventStorageOutputSvc::io_reinit
StatusCode io_reinit() override
Definition: ByteStreamEventStorageOutputSvc.cxx:251
ByteStreamEventStorageOutputSvc::m_eventCache
SG::SlotSpecificObj< EventCache > m_eventCache
Cache of event data for each slot.
Definition: ByteStreamEventStorageOutputSvc.h:185
ByteStreamEventStorageOutputSvc::m_streamType
Gaudi::Property< std::string > m_streamType
stream name
Definition: ByteStreamEventStorageOutputSvc.h:89
xAOD::EventInfo_v1::detectorMaskExt
uint64_t detectorMaskExt() const
Bit field indicating which TTC zones are present in the event.
Definition: EventInfo_v1.cxx:164
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
DataType
OFFLINE_FRAGMENTS_NAMESPACE::PointerType DataType
Definition: RoIBResultByteStreamTool.cxx:25
RawEvent
OFFLINE_FRAGMENTS_NAMESPACE::FullEventFragment RawEvent
data type for reading raw event
Definition: RawEvent.h:37
ByteStreamEventStorageOutputSvc::m_isRun1
bool m_isRun1
Definition: ByteStreamEventStorageOutputSvc.h:153
pool::WRITE
@ WRITE
Definition: Database/APR/StorageSvc/StorageSvc/pool.h:72
ByteStreamEventStorageOutputSvc.h
This file contains the class definition for the ByteStreamEventStorageOutputSvc class.
ByteStreamEventStorageOutputSvc::m_totalEventCounter
int m_totalEventCounter
number of event counter
Definition: ByteStreamEventStorageOutputSvc.h:151
ByteStreamEventStorageOutputSvc::m_lumiBlockNumber
Gaudi::Property< int > m_lumiBlockNumber
run number
Definition: ByteStreamEventStorageOutputSvc.h:116
ByteStreamEventStorageOutputSvc::m_eventInfoKey
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
Definition: ByteStreamEventStorageOutputSvc.h:140
ByteStreamMetadata::getBeamEnergy
unsigned int getBeamEnergy() const
Definition: ByteStreamMetadata.cxx:168
ByteStreamMetadata::getFreeMetaDataStrings
const std::vector< std::string > & getFreeMetaDataStrings() const
Definition: ByteStreamMetadata.cxx:188
ByteStreamMetadata
This class is the StoreGate data object for bytestream metadata.
Definition: ByteStreamMetadata.h:25
ByteStreamEventStorageOutputSvc::m_maxFileNE
Gaudi::Property< unsigned int > m_maxFileNE
Definition: ByteStreamEventStorageOutputSvc.h:137
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
ByteStreamMetadata::getMaxEvents
unsigned int getMaxEvents() const
Definition: ByteStreamMetadata.cxx:144
ByteStreamEventStorageOutputSvc::m_streamName
Gaudi::Property< std::string > m_streamName
eformat event version to produce, "v40" for run1, or "current"
Definition: ByteStreamEventStorageOutputSvc.h:93
ByteStreamEventStorageOutputSvc::m_inputDir
Gaudi::Property< std::string > m_inputDir
< directory for the data files
Definition: ByteStreamEventStorageOutputSvc.h:73
ByteStreamMetadata::getStream
const std::string & getStream() const
Definition: ByteStreamMetadata.cxx:176
ByteStreamEventStorageOutputSvc::getByteStreamMetadata
const ByteStreamMetadata * getByteStreamMetadata()
Definition: ByteStreamEventStorageOutputSvc.cxx:289
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
xAOD::EventInfo_v1::runNumber
uint32_t runNumber() const
The current event's run number.
ByteStreamEventStorageOutputSvc::EventCache::releaseEvent
void releaseEvent()
Definition: ByteStreamEventStorageOutputSvc.h:173
ByteStreamEventStorageOutputSvc::putEvent
virtual bool putEvent(const RawEvent *re) override
Implementation of the IByteStreamOutputSvc interface method putEvent.
Definition: ByteStreamEventStorageOutputSvc.cxx:170
ByteStreamEventStorageOutputSvc::reinit
StatusCode reinit()
reinitialize the service when a fork() occurred/was-issued
Definition: ByteStreamEventStorageOutputSvc.cxx:84
ByteStreamMetadata::getBeamType
unsigned int getBeamType() const
Definition: ByteStreamMetadata.cxx:164
compareGeometries.outputFile
string outputFile
Definition: compareGeometries.py:25
ByteStreamDataWriter.h
This file contains the class definition for the ByteStreamDataWriter class.
ByteStreamEventStorageOutputSvc::m_run
Gaudi::Property< int > m_run
Dump fragments.
Definition: ByteStreamEventStorageOutputSvc.h:120
ByteStreamMetadata::getProject
const std::string & getProject() const
Definition: ByteStreamMetadata.cxx:180
ByteStreamMetadata::getLumiBlock
unsigned int getLumiBlock() const
Definition: ByteStreamMetadata.cxx:184
OFFLINE_FRAGMENTS_NAMESPACE::PointerType
const DataType * PointerType
Definition: RawEvent.h:25
ByteStreamMetadata::getDetectorMask2
uint64_t getDetectorMask2() const
Definition: ByteStreamMetadata.cxx:160
ByteStreamEventStorageOutputSvc::m_eformatVersion
Gaudi::Property< std::string > m_eformatVersion
EventStorage BS version to produce, "v5" for run1, or "current".
Definition: ByteStreamEventStorageOutputSvc.h:97
ByteStreamEventStorageOutputSvc::m_dataWriter
std::unique_ptr< ByteStreamDataWriter > m_dataWriter
pointer to DataWriter
Definition: ByteStreamEventStorageOutputSvc.h:156
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
ByteStreamEventStorageOutputSvc::m_simpleFileName
Gaudi::Property< std::string > m_simpleFileName
use this string for filename, not from the "AgreedFileName"
Definition: ByteStreamEventStorageOutputSvc.h:112
ByteStreamEventStorageOutputSvc::updateDataWriterParameters
void updateDataWriterParameters(DataWriterParameters &) const
Create DataWriter parameters from job properties.
Definition: ByteStreamEventStorageOutputSvc.cxx:322
ByteStreamMetadata::getRecEnable
unsigned int getRecEnable() const
Definition: ByteStreamMetadata.cxx:148
ByteStreamEventStorageOutputSvc::m_appName
Gaudi::Property< std::string > m_appName
File Tag.
Definition: ByteStreamEventStorageOutputSvc.h:81
RawEvent.h
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
DataVector::front
const T * front() const
Access the first element in the collection as an rvalue.
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
ByteStreamEventStorageOutputSvc::m_dataWriterMutex
std::mutex m_dataWriterMutex
mutex to lock data writer during initialization or writing
Definition: ByteStreamEventStorageOutputSvc.h:159
xAOD::EventInfo_v1::detectorMask
uint64_t detectorMask() const
Bit field indicating which TTC zones are present in the event.
Definition: EventInfo_v1.cxx:143
xAOD::EventInfo_v1::lumiBlock
uint32_t lumiBlock() const
The current event's luminosity block number.
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
DataWriterParameters
Class containing parameters needed to initiate DataWriter.
Definition: ByteStreamDataWriter.h:153
offline_EventStorage_v5::ZLIB
@ ZLIB
Definition: v5_EventStorageRecords.h:41
ByteStreamEventStorageOutputSvc::m_ioMgr
ServiceHandle< IIoComponentMgr > m_ioMgr
Definition: ByteStreamEventStorageOutputSvc.h:147
StoreID.h
ByteStreamEventStorageOutputSvc::ByteStreamEventStorageOutputSvc
ByteStreamEventStorageOutputSvc(const std::string &name, ISvcLocator *pSvcLocator)
Constructors:
Definition: ByteStreamEventStorageOutputSvc.cxx:29
ByteStreamEventStorageOutputSvc::finalize
StatusCode finalize() override
Definition: ByteStreamEventStorageOutputSvc.cxx:107
ByteStreamEventStorageOutputSvc::m_eventStorageVersion
Gaudi::Property< std::string > m_eventStorageVersion
stream name for multiple output
Definition: ByteStreamEventStorageOutputSvc.h:102
ByteStreamEventStorageOutputSvc::initialize
StatusCode initialize() override
Required of all Gaudi Services.
Definition: ByteStreamEventStorageOutputSvc.cxx:36
ByteStreamEventStorageOutputSvc::EventCache
Definition: ByteStreamEventStorageOutputSvc.h:172
offline_eformat::old::convert_to_40
uint32_t convert_to_40(const uint32_t *src, uint32_t *dest, uint32_t max, eformat::CheckSum event_checksum=eformat::NO_CHECKSUM, eformat::CheckSum rob_checksum=eformat::NO_CHECKSUM)
Converts a full event fragment or a ROS fragment, from some format to v4.0 format,...
Definition: util.cxx:21
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
ByteStreamEventStorageOutputSvc::initDataWriterContents
bool initDataWriterContents(const xAOD::EventInfo *, const ByteStreamMetadata *)
Definition: ByteStreamEventStorageOutputSvc.cxx:134
ByteStreamDataWriter::makeWriter
static std::unique_ptr< ByteStreamDataWriter > makeWriter(int version, const std::string &writingPath, const std::string &fileNameCore, const EventStorage::run_parameters_record &rPar, const std::vector< std::string > &fmdStrings, unsigned int maxFileNE=0, unsigned int maxFileMB=0, unsigned int startIndex=1, EventStorage::CompressionType compression=EventStorage::NONE, unsigned int compLevel=1)
Factory method returning data writer instance for specified version.
Definition: ByteStreamDataWriter.cxx:69
ByteStreamMetadata::getRunNumber
unsigned int getRunNumber() const
Definition: ByteStreamMetadata.cxx:136
ByteStreamEventStorageOutputSvc::m_compressEvents
Gaudi::Property< bool > m_compressEvents
number of MB per file
Definition: ByteStreamEventStorageOutputSvc.h:130
EventInfo.h
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
xAOD::EventInfo_v1::streamTags
const std::vector< StreamTag > & streamTags() const
Get the streams that the event was put in.
Definition: EventInfo_v1.cxx:283
python.AthDsoLogger.fname
string fname
Definition: AthDsoLogger.py:67
xAOD::EventInfo_v1::detDescrTags
const DetDescrTags_t & detDescrTags() const
The detector description tags.
ByteStreamMetadata::getTriggerType
unsigned int getTriggerType() const
Definition: ByteStreamMetadata.cxx:152
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
ByteStreamEventStorageOutputSvc::stop
StatusCode stop() override
Definition: ByteStreamEventStorageOutputSvc.cxx:91
re
const boost::regex re(r_e)
ByteStreamEventStorageOutputSvc::m_maxFileMB
Gaudi::Property< unsigned int > m_maxFileMB
number of events per file
Definition: ByteStreamEventStorageOutputSvc.h:133
xAOD::EventInfo_v1::level1TriggerType
uint16_t level1TriggerType() const
The Level-1 trigger type.
calibdata.copy
bool copy
Definition: calibdata.py:27
CaloCondBlobAlgs_fillNoiseFromASCII.tag
string tag
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:24
ReadHandle.h
Handle class for reading from StoreGate.
PowhegControl_ttFCNC_NLO.params
params
Definition: PowhegControl_ttFCNC_NLO.py:226
ByteStreamEventStorageOutputSvc::m_projectTag
Gaudi::Property< std::string > m_projectTag
Application Name.
Definition: ByteStreamEventStorageOutputSvc.h:77
ByteStreamEventStorageOutputSvc::EventCache::buffer
std::unique_ptr< uint32_t[] > buffer
Underlying data structure.
Definition: ByteStreamEventStorageOutputSvc.h:179
SG::get
const T * get(const ReadHandleKey< T > &key)
Convenience function to retrieve an object given a ReadHandleKey.
util.h
Declarations of methods for working with old eformat versions.
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
Trk::split
@ split
Definition: LayerMaterialProperties.h:38
xAOD::EventInfo_v1::StreamTag
Class describing a stream tag on the event.
Definition: EventInfo_v1.h:190
xAOD::EventInfo_v1::eventType
bool eventType(EventType type) const
Check for one particular bitmask value.