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

This class provides the services for writing FullEventFragment into file. More...

#include <ByteStreamEventStorageOutputSvc.h>

Inheritance diagram for ByteStreamEventStorageOutputSvc:
Collaboration diagram for ByteStreamEventStorageOutputSvc:

Classes

struct  EventCache

Public Member Functions

 ByteStreamEventStorageOutputSvc (const std::string &name, ISvcLocator *pSvcLocator)
 Constructors:
virtual ~ByteStreamEventStorageOutputSvc ()=default
 Destructor.
StatusCode initialize () override
 Required of all Gaudi Services.
StatusCode stop () override
StatusCode finalize () override
virtual bool putEvent (const RawEvent *re) override
 Implementation of the IByteStreamOutputSvc interface method putEvent.
virtual bool putEvent (const RawEvent *re, const EventContext &ctx) override
StatusCode io_reinit () override

Private Member Functions

StatusCode reinit ()
 reinitialize the service when a fork() occurred/was-issued
bool initDataWriter (const EventContext *ctx=nullptr)
 initialize EventStorage's DataWriter
bool initDataWriterContents (const xAOD::EventInfo *, const ByteStreamMetadata *)
const ByteStreamMetadatagetByteStreamMetadata ()
const ByteStreamMetadatagetByteStreamMetadata (const EventContext &ctx)
void updateDataWriterParameters (DataWriterParameters &) const
 Create DataWriter parameters from job properties.
void updateDataWriterParameters (DataWriterParameters &params, const xAOD::EventInfo &evtInfo) const
 Create DataWriter parameters from EventInfo.
void updateDataWriterParameters (DataWriterParameters &params, const ByteStreamMetadata &metaData) const
 Create DataWriter parameters from MetaData.

Private Attributes

Gaudi::Property< std::string > m_inputDir
 < directory for the data files
Gaudi::Property< std::string > m_projectTag
 Application Name.
Gaudi::Property< std::string > m_appName
 File Tag.
Gaudi::Property< std::string > m_fileTag
 stream type
Gaudi::Property< std::string > m_streamType
 stream name
Gaudi::Property< std::string > m_streamName
 EventStorage BS version to produce, "v5" for run1, or "current".
Gaudi::Property< std::string > m_eventStorageVersion
 stream name for multiple output
Gaudi::Property< std::string > m_bsOutputStreamName
Gaudi::Property< std::string > m_simpleFileName
 use this string for filename, not from the "AgreedFileName"
Gaudi::Property< int > m_lumiBlockNumber
 run number
Gaudi::Property< int > m_run {this, "RunNumber", 0, "part of filename"}
 Dump fragments.
Gaudi::Property< bool > m_dump {this, "DumpFlag", false, "dump fragments"}
 Write eventless files.
Gaudi::Property< bool > m_writeEventless
 Compress events.
Gaudi::Property< bool > m_compressEvents {this, "CompressEvents", false, ""}
 number of MB per file
Gaudi::Property< unsigned int > m_maxFileMB
 number of events per file
Gaudi::Property< unsigned int > m_maxFileNE
SG::ReadHandleKey< xAOD::EventInfom_eventInfoKey
SG::ReadHandleKey< ByteStreamMetadataContainerm_byteStreamMetadataKey
ServiceHandle< IIoComponentMgr > m_ioMgr {"IoComponentMgr", name()}
ServiceHandle< ITagInfoMgrm_tagInfoMgr {"TagInfoMgr", name()}
ServiceHandle< StoreGateSvcm_metaDataStore {"StoreGateSvc/MetaDataStore", name()}
int m_totalEventCounter {0}
 number of event counter
std::unique_ptr< ByteStreamDataWriterm_dataWriter
 pointer to DataWriter
std::mutex m_dataWriterMutex
 mutex to lock data writer during initialization or writing
SG::SlotSpecificObj< EventCachem_eventCache
 Cache of event data for each slot.

Detailed Description

This class provides the services for writing FullEventFragment into file.

This class implements the interface IByteStreamOutputSvc for the conversion service to write the output to a file.

Definition at line 49 of file ByteStreamEventStorageOutputSvc.h.

Constructor & Destructor Documentation

◆ ByteStreamEventStorageOutputSvc()

ByteStreamEventStorageOutputSvc::ByteStreamEventStorageOutputSvc ( const std::string & name,
ISvcLocator * pSvcLocator )

Constructors:

Definition at line 30 of file ByteStreamEventStorageOutputSvc.cxx.

32 : base_class(name, pSvcLocator) {
33}

◆ ~ByteStreamEventStorageOutputSvc()

virtual ByteStreamEventStorageOutputSvc::~ByteStreamEventStorageOutputSvc ( )
virtualdefault

Destructor.

Member Function Documentation

◆ finalize()

StatusCode ByteStreamEventStorageOutputSvc::finalize ( )
override

Definition at line 87 of file ByteStreamEventStorageOutputSvc.cxx.

87 {
88 // clean up
89 ATH_MSG_DEBUG("deleting DataWriter");
90 std::lock_guard< std::mutex > lock(m_dataWriterMutex);
91 m_dataWriter.reset();
92 ATH_MSG_INFO("number of events written: " << m_totalEventCounter);
93 return StatusCode::SUCCESS;
94}
#define ATH_MSG_INFO(x)
#define ATH_MSG_DEBUG(x)
std::mutex m_dataWriterMutex
mutex to lock data writer during initialization or writing
std::unique_ptr< ByteStreamDataWriter > m_dataWriter
pointer to DataWriter

◆ getByteStreamMetadata() [1/2]

const ByteStreamMetadata * ByteStreamEventStorageOutputSvc::getByteStreamMetadata ( )
private

Definition at line 240 of file ByteStreamEventStorageOutputSvc.cxx.

241{
242 SG::ReadHandle<ByteStreamMetadataContainer> metaDataCont (m_byteStreamMetadataKey);
243
244 if (!metaDataCont.isValid()) return nullptr;
245
246 if (metaDataCont->size() > 1)
247 ATH_MSG_WARNING("Multiple run parameters in MetaDataStore. "
248 "Bytestream format only supports one. Arbitrarily "
249 "choosing first.");
250
251 return metaDataCont->front();
252}
#define ATH_MSG_WARNING(x)
SG::ReadHandleKey< ByteStreamMetadataContainer > m_byteStreamMetadataKey

◆ getByteStreamMetadata() [2/2]

const ByteStreamMetadata * ByteStreamEventStorageOutputSvc::getByteStreamMetadata ( const EventContext & ctx)
private

Definition at line 256 of file ByteStreamEventStorageOutputSvc.cxx.

258{
259 SG::ReadHandle<ByteStreamMetadataContainer> metaDataCont (m_byteStreamMetadataKey, ctx);
260
261 if (!metaDataCont.isValid()) return nullptr;
262
263 if (metaDataCont->size() > 1)
264 ATH_MSG_WARNING("Multiple run parameters in MetaDataStore. "
265 "Bytestream format only supports one. Arbitrarily "
266 "choosing first.");
267
268 return metaDataCont->front();
269}

◆ initDataWriter()

bool ByteStreamEventStorageOutputSvc::initDataWriter ( const EventContext * ctx = nullptr)
private

initialize EventStorage's DataWriter

Definition at line 98 of file ByteStreamEventStorageOutputSvc.cxx.

98 {
99 // Called on first event. Reads run parameters first event and/or first event
100 const xAOD::EventInfo* eventInfo = ctx == nullptr
102 : SG::get(m_eventInfoKey, *ctx);
103 if (eventInfo == nullptr) ATH_MSG_WARNING("failed to retrieve EventInfo");
104
105 const ByteStreamMetadata* metaData = ctx == nullptr ? getByteStreamMetadata() : getByteStreamMetadata(*ctx);
106 if (metaData == nullptr)
107 ATH_MSG_WARNING("failed to retrieve ByteStreamMetaData");
108
109 // Now open a file for writing from retrieved parameters
110 return initDataWriterContents(eventInfo, metaData);
111}
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
bool initDataWriterContents(const xAOD::EventInfo *, const ByteStreamMetadata *)
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition hcg.cxx:130
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
EventInfo_v1 EventInfo
Definition of the latest event info version.

◆ initDataWriterContents()

bool ByteStreamEventStorageOutputSvc::initDataWriterContents ( const xAOD::EventInfo * evtInfo,
const ByteStreamMetadata * metaData )
private

Definition at line 115 of file ByteStreamEventStorageOutputSvc.cxx.

117 {
118 // check that we have sufficient information to do what we need
119 if (evtInfo or metaData)
120 ATH_MSG_DEBUG("Looking up data writer parameters");
121 else
122 throw std::runtime_error("Cannot write data without run parameters");
123
124 // The heirarchy of run/lumiblock number, GNARR
125 //
126 // 1) User override
127 // 2) Event data
128 // 3) File metadata
129 // 4) default = unknown = 0
130 //
131 // Go from 4 to 1 and overwrite
132 DataWriterParameters params;
133 if (metaData != nullptr) updateDataWriterParameters(params, *metaData);
134 if (evtInfo != nullptr) updateDataWriterParameters(params, *evtInfo);
136
138
139 bool result = m_dataWriter->good();
140 if (result)
141 ATH_MSG_DEBUG("initialized output stream to file with name "
142 << params.fileNameCore);
143 else
144 ATH_MSG_ERROR("Unable to initialize file");
145
146 return result;
147}
#define ATH_MSG_ERROR(x)
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.
void updateDataWriterParameters(DataWriterParameters &) const
Create DataWriter parameters from job properties.

◆ initialize()

StatusCode ByteStreamEventStorageOutputSvc::initialize ( )
override

Required of all Gaudi Services.

Definition at line 37 of file ByteStreamEventStorageOutputSvc.cxx.

37 {
38 ATH_MSG_INFO("Initializing");
39
40 ATH_CHECK(m_eventInfoKey.initialize());
42 ATH_CHECK(m_tagInfoMgr.retrieve());
43 ATH_CHECK(m_metaDataStore.retrieve());
44
45 // register this service for 'I/O' events
46 ATH_CHECK(m_ioMgr.retrieve());
47 ATH_CHECK(m_ioMgr->io_register(this));
48
49 // Register output file's name with the I/O manager
50 if (!m_simpleFileName.empty()) {
51 ATH_CHECK(m_ioMgr->io_register(this, IIoComponentMgr::IoMode::WRITE,
53 ATH_MSG_VERBOSE("io_register[" << this->name() << "]("
54 << m_simpleFileName << ") [ok]");
55 }
56
58
59 return StatusCode::SUCCESS;
60}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
StatusCode reinit()
reinitialize the service when a fork() occurred/was-issued
Gaudi::Property< std::string > m_simpleFileName
use this string for filename, not from the "AgreedFileName"

◆ io_reinit()

StatusCode ByteStreamEventStorageOutputSvc::io_reinit ( )
override

Definition at line 205 of file ByteStreamEventStorageOutputSvc.cxx.

205 {
206 ATH_MSG_INFO("I/O reinitialization...");
207
208 if (!m_ioMgr->io_hasitem(this)) {
209 ATH_MSG_FATAL("IoComponentMgr does not know about myself !");
210 return StatusCode::FAILURE;
211 }
212
213 if (!m_simpleFileName.empty()) {
214 std::string outputFile = m_simpleFileName;
215 ATH_MSG_INFO("I/O reinitialization, file = " << outputFile);
216 std::string &fname = outputFile;
217 if (!m_ioMgr->io_contains(this, fname)) {
218 ATH_MSG_ERROR("IoComponentMgr does not know about [" << fname << "] !");
219 return StatusCode::FAILURE;
220 }
221 ATH_CHECK(m_ioMgr->io_retrieve(this, fname));
222 // all good... copy over.
223 // modify directory
224 m_inputDir.setValue(outputFile.substr(0, outputFile.find_last_of("/")));
225 // FIXME: modify file name, not done for now because of
226 // IoUtils.update_io_registry vs. merge conflict.
227 //m_simpleFileName.setValue(
228 // outputFile.substr(outputFile.find_last_of("/") + 1));
229 }
230 ATH_MSG_DEBUG("Deleting DataWriter");
231 m_dataWriter.reset();
232
233 ATH_CHECK(reinit());
234
235 return StatusCode::SUCCESS;
236}
#define ATH_MSG_FATAL(x)
Gaudi::Property< std::string > m_inputDir
< directory for the data files

◆ putEvent() [1/2]

bool ByteStreamEventStorageOutputSvc::putEvent ( const RawEvent * re)
overridevirtual

Implementation of the IByteStreamOutputSvc interface method putEvent.

Definition at line 151 of file ByteStreamEventStorageOutputSvc.cxx.

151 {
152 // Read the next event.
153 return putEvent(re, Gaudi::Hive::currentContext());
154}
const boost::regex re(r_e)
virtual bool putEvent(const RawEvent *re) override
Implementation of the IByteStreamOutputSvc interface method putEvent.

◆ putEvent() [2/2]

bool ByteStreamEventStorageOutputSvc::putEvent ( const RawEvent * re,
const EventContext & ctx )
overridevirtual

Definition at line 158 of file ByteStreamEventStorageOutputSvc.cxx.

159 {
160 // Read the next event.
163
164 EventCache* cache = m_eventCache.get(ctx);
165 cache->releaseEvent();
166
167 // we need the size and the start of the event to give to the data writer
168 cache->size = re->fragment_size_word();
169 ATH_MSG_DEBUG("event size = " << cache->size << ", start = " << re->start());
170
171 cache->buffer = std::make_unique< DataType[] >(cache->size);
172 std::copy(re->start(), re->start() + cache->size, cache->buffer.get());
173
174 {
175 // multiple data writers concurrently sounds like a bad idea
176 std::lock_guard< std::mutex > lock(m_dataWriterMutex);
177
178 // make sure the data writer is ready
179 ATH_MSG_DEBUG("looking up data writer");
180 if (!m_dataWriter) {
181 if (!initDataWriter(&ctx)) {
182 ATH_MSG_ERROR("Failed to initialize DataWriter");
183 return false;
184 }
185 }
186
187 // write event to disk
188 EventStorage::DWError write_result = m_dataWriter->putData(
189 sizeof(DataType) * cache->size,
190 reinterpret_cast< void* >(cache->buffer.get()));
191
192 // Report success or failure
193 if (write_result != EventStorage::DWOK) {
194 ATH_MSG_ERROR("Failed to write event to DataWriter");
195 return false;
196 }
198 }
199
200 return true;
201}
OFFLINE_FRAGMENTS_NAMESPACE::PointerType DataType
bool initDataWriter(const EventContext *ctx=nullptr)
initialize EventStorage's DataWriter
SG::SlotSpecificObj< EventCache > m_eventCache
Cache of event data for each slot.
const DataType * PointerType
Definition RawEvent.h:25

◆ reinit()

StatusCode ByteStreamEventStorageOutputSvc::reinit ( )
private

reinitialize the service when a fork() occurred/was-issued

Definition at line 64 of file ByteStreamEventStorageOutputSvc.cxx.

64 {
65 ATH_MSG_INFO("Reinitialization...");
66 return StatusCode::SUCCESS;
67}

◆ stop()

StatusCode ByteStreamEventStorageOutputSvc::stop ( )
override

Definition at line 71 of file ByteStreamEventStorageOutputSvc.cxx.

71 {
72 // Check whether anything has been written and whether the user wants metadata
73 // only files
74 if (m_dataWriter == 0 and m_writeEventless) {
75 const ByteStreamMetadata* metaData = getByteStreamMetadata();
76
77 // Try to write metadata to eventless file
78 bool dWok = initDataWriterContents(nullptr, metaData);
79 if (!dWok) ATH_MSG_WARNING("Could not write Metadata for eventless file");
80 }
81
82 return StatusCode::SUCCESS;
83}
Gaudi::Property< bool > m_writeEventless
Compress events.

◆ updateDataWriterParameters() [1/3]

void ByteStreamEventStorageOutputSvc::updateDataWriterParameters ( DataWriterParameters & params) const
private

Create DataWriter parameters from job properties.

Definition at line 273 of file ByteStreamEventStorageOutputSvc.cxx.

274 {
275
276 params.version = 0;
277 params.writingPath = m_inputDir;
278
279 if (m_run != 0) params.rPar.run_number = m_run;
280 ATH_MSG_DEBUG("Run number: " << params.rPar.run_number);
281
282 if (m_lumiBlockNumber != 0) params.lumiBlockNumber = m_lumiBlockNumber;
283 ATH_MSG_DEBUG("LB number: " << params.lumiBlockNumber);
284
285 if (!m_streamType.empty()) params.streamType = m_streamType;
286 if (!m_streamName.empty()) params.streamName = m_streamName;
287
288 if (params.streamType.empty()) params.streamType = "Single";
289 if (params.streamName.empty()) params.streamName = "Stream";
290
291 params.stream = params.streamType + "_" + params.streamName;
292
293 if (!m_projectTag.empty()) params.project = m_projectTag;
294
295 params.applicationName = m_appName;
296
297 if (!m_simpleFileName.empty()) {
298 // set up for simple file name
299 boost::shared_ptr<EventStorage::SimpleFileName> simple_file_name(
300 new EventStorage::SimpleFileName(m_simpleFileName));
301 params.theFNCB = simple_file_name;
302 } else {
303 // set up for production file name
304 daq::RawFileName fileNameObj(
305 params.project,
306 params.rPar.run_number,
307 params.streamType,
308 params.streamName,
309 params.lumiBlockNumber,
310 params.applicationName);
311 params.fileNameCore = fileNameObj.fileNameCore();
312 }
313
314 params.compression = m_compressEvents
315 ? EventStorage::ZLIB
316 : EventStorage::NONE;
317
318 params.maxFileMB = m_maxFileMB;
319 params.maxFileNE = params.rPar.max_events = m_maxFileNE;
320}
Gaudi::Property< unsigned int > m_maxFileMB
number of events per file
Gaudi::Property< std::string > m_projectTag
Application Name.
Gaudi::Property< std::string > m_streamType
stream name
Gaudi::Property< unsigned int > m_maxFileNE
Gaudi::Property< int > m_lumiBlockNumber
run number
Gaudi::Property< int > m_run
Dump fragments.
Gaudi::Property< std::string > m_appName
File Tag.
Gaudi::Property< std::string > m_streamName
EventStorage BS version to produce, "v5" for run1, or "current".
Gaudi::Property< bool > m_compressEvents
number of MB per file

◆ updateDataWriterParameters() [2/3]

void ByteStreamEventStorageOutputSvc::updateDataWriterParameters ( DataWriterParameters & params,
const ByteStreamMetadata & metaData ) const
private

Create DataWriter parameters from MetaData.

Definition at line 402 of file ByteStreamEventStorageOutputSvc.cxx.

403 {
404 ATH_MSG_DEBUG("Parsing run parameters from metadata:\n" << metaData);
405
406 params.rPar.run_number = metaData.getRunNumber();
407 params.lumiBlockNumber = metaData.getLumiBlock();
408
409 const std::string stream = metaData.getStream();
410 const std::string::size_type split = stream.find('_');
411
412 if (split != std::string::npos and params.streamType.empty())
413 params.streamType = stream.substr(0,split);
414
415 if (split != std::string::npos and params.streamName.empty())
416 params.streamName = stream.substr(split+1);
417
418 params.project = metaData.getProject();
419 params.maxFileNE = params.rPar.max_events = metaData.getMaxEvents();
420
421 params.rPar.rec_enable = metaData.getRecEnable();
422 params.rPar.trigger_type = metaData.getTriggerType();
423 params.rPar.beam_type = metaData.getBeamType();
424 if (metaData.getBeamEnergy() != 0)
425 params.rPar.beam_energy = metaData.getBeamEnergy();
426
427 params.rPar.detector_mask_LS = metaData.getDetectorMask();
428 params.rPar.detector_mask_MS = metaData.getDetectorMask2();
429
430 for (const std::string& fmd : metaData.getFreeMetaDataStrings())
431 params.fmdStrings.push_back(fmd);
432 // if(fmd.find("Compression=") == std::string::npos)
433}
uint64_t getDetectorMask() const
unsigned int getBeamType() const
const std::string & getStream() const
unsigned int getMaxEvents() const
unsigned int getRecEnable() const
unsigned int getRunNumber() const
unsigned int getTriggerType() const
unsigned int getBeamEnergy() const
unsigned int getLumiBlock() const
const std::vector< std::string > & getFreeMetaDataStrings() const
const std::string & getProject() const
uint64_t getDetectorMask2() const
std::vector< std::string > split(const std::string &s, const std::string &t=":")
Definition hcg.cxx:177

◆ updateDataWriterParameters() [3/3]

void ByteStreamEventStorageOutputSvc::updateDataWriterParameters ( DataWriterParameters & params,
const xAOD::EventInfo & evtInfo ) const
private

Create DataWriter parameters from EventInfo.

Definition at line 324 of file ByteStreamEventStorageOutputSvc.cxx.

325 {
326 ATH_MSG_DEBUG("Parsing run parameters from EventInfo" << eventInfo);
327
328 params.rPar.run_number = eventInfo.runNumber();
329 params.lumiBlockNumber = eventInfo.lumiBlock();
330
331 for (const xAOD::EventInfo::StreamTag& tag : eventInfo.streamTags())
332 if(!tag.type().empty()) {
333 params.streamType = tag.type();
334 break;
335 }
336
337 for (const xAOD::EventInfo::StreamTag& tag : eventInfo.streamTags())
338 if (!tag.name().empty()) {
339 params.streamName = tag.name();
340 break;
341 }
342
343 for (const auto& tag : eventInfo.detDescrTags())
344 params.fmdStrings.push_back(tag.first + ' ' + tag.second);
345
346 // Get beam metadata from TagInfo
347 std::string beamTypeStr = m_tagInfoMgr->findInputTag("beam_type");
348 if (!beamTypeStr.empty()) {
349 ATH_MSG_DEBUG("Got beam_type from input file metadata: " << beamTypeStr);
350 if (beamTypeStr == "collisions") {
351 params.rPar.beam_type = 1;
352 } else if (beamTypeStr == "cosmics") {
353 params.rPar.beam_type = 0;
354 }
355 }
356
357 std::string beamEnergyStr = m_tagInfoMgr->findInputTag("beam_energy");
358 if (!beamEnergyStr.empty()) {
359 try {
360 params.rPar.beam_energy = std::stoul(beamEnergyStr);
361 ATH_MSG_DEBUG("Got beam_energy from input file metadata: " << params.rPar.beam_energy);
362 } catch (const std::exception& e) {
363 ATH_MSG_WARNING("Could not convert beam_energy '" << beamEnergyStr << "' to number: " << e.what());
364 }
365 }
366
367 // Get IOV metadata strings from MetaDataStore
368 const std::vector<std::string>* iovMetaStrings = m_metaDataStore->tryRetrieve<std::vector<std::string>>("IOVMetaDataStrings");
369 if (iovMetaStrings != nullptr) {
370 ATH_MSG_DEBUG("Retrieved " << iovMetaStrings->size() << " IOV metadata strings from MetaDataStore");
371 for (const std::string& str : *iovMetaStrings) {
372 params.fmdStrings.push_back(str);
373 }
374 } else {
375 ATH_MSG_DEBUG("No IOV metadata strings found in MetaDataStore (this is normal if not configured)");
376 }
377
378 params.rPar.trigger_type = eventInfo.level1TriggerType();
379 params.rPar.detector_mask_LS = eventInfo.detectorMask();
380 params.rPar.detector_mask_MS = eventInfo.detectorMaskExt();
381
382 std::string event_type = "Event type: sim/data - ";
383 if (eventInfo.eventType(xAOD::EventInfo::EventType::IS_SIMULATION))
384 event_type += "is sim";
385 else event_type += "is data";
386
387 event_type += " , testbeam/atlas - ";
388 if (eventInfo.eventType(xAOD::EventInfo::EventType::IS_TESTBEAM))
389 event_type += "is testbeam";
390 else event_type += "is atlas";
391
392 event_type += " , calibration/physics - ";
393 if (eventInfo.eventType(xAOD::EventInfo::EventType::IS_CALIBRATION))
394 event_type += "is calibration";
395 else event_type += "is physics";
396
397 params.fmdStrings.push_back(std::move(event_type));
398}
@ IS_CALIBRATION
true: calibration, false: physics
@ IS_SIMULATION
true: simulation, false: data
@ IS_TESTBEAM
true: testbeam, false: full detector

Member Data Documentation

◆ m_appName

Gaudi::Property<std::string> ByteStreamEventStorageOutputSvc::m_appName
private
Initial value:
{this, "AppName", "",
"part of filename"}

File Tag.

Definition at line 83 of file ByteStreamEventStorageOutputSvc.h.

83 {this, "AppName", "",
84 "part of filename"};

◆ m_bsOutputStreamName

Gaudi::Property<std::string> ByteStreamEventStorageOutputSvc::m_bsOutputStreamName
private
Initial value:
{this, "BSOutputStreamName",
name(), "stream name for multiple output"}

Definition at line 105 of file ByteStreamEventStorageOutputSvc.h.

105 {this, "BSOutputStreamName",
106 name(), "stream name for multiple output"};

◆ m_byteStreamMetadataKey

SG::ReadHandleKey< ByteStreamMetadataContainer > ByteStreamEventStorageOutputSvc::m_byteStreamMetadataKey
private
Initial value:
{this,
"ByteStreamMetadataKey", "MetaDataStore+ByteStreamMetadata",
"Key for bytestream metadata object in metadata store"}

Definition at line 140 of file ByteStreamEventStorageOutputSvc.h.

140 {this,
141 "ByteStreamMetadataKey", "MetaDataStore+ByteStreamMetadata",
142 "Key for bytestream metadata object in metadata store"};

◆ m_compressEvents

Gaudi::Property<bool> ByteStreamEventStorageOutputSvc::m_compressEvents {this, "CompressEvents", false, ""}
private

number of MB per file

Definition at line 127 of file ByteStreamEventStorageOutputSvc.h.

127{this, "CompressEvents", false, ""};

◆ m_dataWriter

std::unique_ptr<ByteStreamDataWriter> ByteStreamEventStorageOutputSvc::m_dataWriter
private

pointer to DataWriter

Definition at line 153 of file ByteStreamEventStorageOutputSvc.h.

◆ m_dataWriterMutex

std::mutex ByteStreamEventStorageOutputSvc::m_dataWriterMutex
private

mutex to lock data writer during initialization or writing

Definition at line 156 of file ByteStreamEventStorageOutputSvc.h.

◆ m_dump

Gaudi::Property<bool> ByteStreamEventStorageOutputSvc::m_dump {this, "DumpFlag", false, "dump fragments"}
private

Write eventless files.

Definition at line 120 of file ByteStreamEventStorageOutputSvc.h.

120{this, "DumpFlag", false, "dump fragments"};

◆ m_eventCache

SG::SlotSpecificObj<EventCache> ByteStreamEventStorageOutputSvc::m_eventCache
private

Cache of event data for each slot.

Definition at line 182 of file ByteStreamEventStorageOutputSvc.h.

◆ m_eventInfoKey

SG::ReadHandleKey< xAOD::EventInfo > ByteStreamEventStorageOutputSvc::m_eventInfoKey
private
Initial value:
{this, "EventInfoKey",
"EventInfo", "Key for EventInfo object in event store"}

Definition at line 137 of file ByteStreamEventStorageOutputSvc.h.

137 {this, "EventInfoKey",
138 "EventInfo", "Key for EventInfo object in event store"};

◆ m_eventStorageVersion

Gaudi::Property<std::string> ByteStreamEventStorageOutputSvc::m_eventStorageVersion
private
Initial value:
{this,
"EventStorageVersion", "current", "Version of the ByteStream file data, "
"use \"v5\" or \"run1\" for run1, \"current\" for most current version "
"(default)."}

stream name for multiple output

Definition at line 99 of file ByteStreamEventStorageOutputSvc.h.

99 {this,
100 "EventStorageVersion", "current", "Version of the ByteStream file data, "
101 "use \"v5\" or \"run1\" for run1, \"current\" for most current version "
102 "(default)."};

◆ m_fileTag

Gaudi::Property<std::string> ByteStreamEventStorageOutputSvc::m_fileTag
private
Initial value:
{this, "FileTag", "",
"part of filename"}

stream type

Definition at line 87 of file ByteStreamEventStorageOutputSvc.h.

87 {this, "FileTag", "",
88 "part of filename"};

◆ m_inputDir

Gaudi::Property<std::string> ByteStreamEventStorageOutputSvc::m_inputDir
private
Initial value:
{this, "OutputDirectory", "",
"directory for the data files"}

< directory for the data files

Project Tag

Definition at line 75 of file ByteStreamEventStorageOutputSvc.h.

75 {this, "OutputDirectory", "",
76 "directory for the data files"};

◆ m_ioMgr

ServiceHandle< IIoComponentMgr > ByteStreamEventStorageOutputSvc::m_ioMgr {"IoComponentMgr", name()}
private

Definition at line 144 of file ByteStreamEventStorageOutputSvc.h.

144{"IoComponentMgr", name()};

◆ m_lumiBlockNumber

Gaudi::Property<int> ByteStreamEventStorageOutputSvc::m_lumiBlockNumber
private
Initial value:
{this, "LumiBlockNumber", 0,
"part of filename"}

run number

Definition at line 113 of file ByteStreamEventStorageOutputSvc.h.

113 {this, "LumiBlockNumber", 0,
114 "part of filename"};

◆ m_maxFileMB

Gaudi::Property<unsigned int> ByteStreamEventStorageOutputSvc::m_maxFileMB
private
Initial value:
{this, "MaxFileMB", 10000,
"MB per file"}

number of events per file

Definition at line 130 of file ByteStreamEventStorageOutputSvc.h.

130 {this, "MaxFileMB", 10000,
131 "MB per file"};

◆ m_maxFileNE

Gaudi::Property<unsigned int> ByteStreamEventStorageOutputSvc::m_maxFileNE
private
Initial value:
{this, "MaxFileNE", 100000,
"evens per file"}

Definition at line 134 of file ByteStreamEventStorageOutputSvc.h.

134 {this, "MaxFileNE", 100000,
135 "evens per file"};

◆ m_metaDataStore

ServiceHandle< StoreGateSvc > ByteStreamEventStorageOutputSvc::m_metaDataStore {"StoreGateSvc/MetaDataStore", name()}
private

Definition at line 146 of file ByteStreamEventStorageOutputSvc.h.

146{"StoreGateSvc/MetaDataStore", name()};

◆ m_projectTag

Gaudi::Property<std::string> ByteStreamEventStorageOutputSvc::m_projectTag
private
Initial value:
{this, "ProjectTag", "",
"part of filename"}

Application Name.

Definition at line 79 of file ByteStreamEventStorageOutputSvc.h.

79 {this, "ProjectTag", "",
80 "part of filename"};

◆ m_run

Gaudi::Property<int> ByteStreamEventStorageOutputSvc::m_run {this, "RunNumber", 0, "part of filename"}
private

Dump fragments.

Definition at line 117 of file ByteStreamEventStorageOutputSvc.h.

117{this, "RunNumber", 0, "part of filename"};

◆ m_simpleFileName

Gaudi::Property<std::string> ByteStreamEventStorageOutputSvc::m_simpleFileName
private
Initial value:
{this, "SimpleFileName", "",
"for filename not from AgreedFileName"}

use this string for filename, not from the "AgreedFileName"

luminosity block number

Definition at line 109 of file ByteStreamEventStorageOutputSvc.h.

109 {this, "SimpleFileName", "",
110 "for filename not from AgreedFileName"};

◆ m_streamName

Gaudi::Property<std::string> ByteStreamEventStorageOutputSvc::m_streamName
private
Initial value:
{this, "StreamName", "",
"part of filename"}

EventStorage BS version to produce, "v5" for run1, or "current".

Definition at line 95 of file ByteStreamEventStorageOutputSvc.h.

95 {this, "StreamName", "",
96 "part of filename"};

◆ m_streamType

Gaudi::Property<std::string> ByteStreamEventStorageOutputSvc::m_streamType
private
Initial value:
{this, "StreamType", "",
"part of filename"}

stream name

Definition at line 91 of file ByteStreamEventStorageOutputSvc.h.

91 {this, "StreamType", "",
92 "part of filename"};

◆ m_tagInfoMgr

ServiceHandle< ITagInfoMgr > ByteStreamEventStorageOutputSvc::m_tagInfoMgr {"TagInfoMgr", name()}
private

Definition at line 145 of file ByteStreamEventStorageOutputSvc.h.

145{"TagInfoMgr", name()};

◆ m_totalEventCounter

int ByteStreamEventStorageOutputSvc::m_totalEventCounter {0}
private

number of event counter

Definition at line 150 of file ByteStreamEventStorageOutputSvc.h.

150{0};

◆ m_writeEventless

Gaudi::Property<bool> ByteStreamEventStorageOutputSvc::m_writeEventless
private
Initial value:
{this, "WriteEventlessFiles", true,
""}

Compress events.

Definition at line 123 of file ByteStreamEventStorageOutputSvc.h.

123 {this, "WriteEventlessFiles", true,
124 ""};

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