3#ifndef BYTESTREAMCNVSVC_BYTESTREAMEVENTSTORAGEOUTPUTSVC_H
4#define BYTESTREAMCNVSVC_BYTESTREAMEVENTSTORAGEOUTPUTSVC_H
27#include "EventStorage/EventStorageRecords.h"
32#include "GaudiKernel/extends.h"
33#include "GaudiKernel/IIoComponent.h"
34#include "GaudiKernel/IIoComponentMgr.h"
35#include "GaudiKernel/ServiceHandle.h"
50 public extends< AthService, IByteStreamOutputSvc, IIoComponent > {
55 const std::string& name, ISvcLocator* pSvcLocator);
62 StatusCode
stop()
override;
75 Gaudi::Property<std::string>
m_inputDir{
this,
"OutputDirectory",
"",
76 "directory for the data files"};
83 Gaudi::Property<std::string>
m_appName{
this,
"AppName",
"",
87 Gaudi::Property<std::string>
m_fileTag{
this,
"FileTag",
"",
100 "current",
"Version of the event format data, use \"v40\" or \"run1\" "
101 "for run1, \"current\" for most current version (default)."};
105 "EventStorageVersion",
"current",
"Version of the ByteStream file data, "
106 "use \"v5\" or \"run1\" for run1, \"current\" for most current version "
111 name(),
"stream name for multiple output"};
115 "for filename not from AgreedFileName"};
122 Gaudi::Property<int>
m_run{
this,
"RunNumber", 0,
"part of filename"};
125 Gaudi::Property<bool>
m_dump{
this,
"DumpFlag",
false,
"dump fragments"};
135 Gaudi::Property<unsigned int>
m_maxFileMB{
this,
"MaxFileMB", 10000,
139 Gaudi::Property<unsigned int>
m_maxFileNE{
this,
"MaxFileNE", 100000,
143 "EventInfo",
"Key for EventInfo object in event store"};
146 "ByteStreamMetadataKey",
"MetaDataStore+ByteStreamMetadata",
147 "Key for bytestream metadata object in metadata store"};
183 std::unique_ptr< uint32_t[] >
buffer{
nullptr};
const boost::regex re(r_e)
Maintain a set of objects, one per slot.
This file contains the class definition for the ByteStreamDataWriter class.
This file contains the interface for the ByteStreamOutputSvc classes.
OFFLINE_FRAGMENTS_NAMESPACE::FullEventFragment RawEvent
data type for reading raw event
Property holding a SG store/key/clid from which a ReadHandle is made.
Gaudi::Property< unsigned int > m_maxFileMB
number of events per file
ServiceHandle< IIoComponentMgr > m_ioMgr
virtual ~ByteStreamEventStorageOutputSvc()=default
Destructor.
StatusCode reinit()
reinitialize the service when a fork() occurred/was-issued
Gaudi::Property< std::string > m_projectTag
Application Name.
Gaudi::Property< bool > m_writeEventless
Compress events.
Gaudi::Property< std::string > m_streamType
stream name
StatusCode finalize() override
StatusCode initialize() override
Required of all Gaudi Services.
Gaudi::Property< unsigned int > m_maxFileNE
Gaudi::Property< std::string > m_eventStorageVersion
stream name for multiple output
std::mutex m_dataWriterMutex
mutex to lock data writer during initialization or writing
Gaudi::Property< std::string > m_simpleFileName
use this string for filename, not from the "AgreedFileName"
StatusCode io_reinit() override
bool initDataWriter(const EventContext *ctx=nullptr)
initialize EventStorage's DataWriter
int m_totalEventCounter
number of event counter
Gaudi::Property< int > m_lumiBlockNumber
run number
virtual bool putEvent(const RawEvent *re) override
Implementation of the IByteStreamOutputSvc interface method putEvent.
Gaudi::Property< std::string > m_fileTag
stream type
SG::SlotSpecificObj< EventCache > m_eventCache
Cache of event data for each slot.
SG::ReadHandleKey< ByteStreamMetadataContainer > m_byteStreamMetadataKey
ServiceHandle< ITagInfoMgr > m_tagInfoMgr
Gaudi::Property< std::string > m_eformatVersion
EventStorage BS version to produce, "v5" for run1, or "current".
ByteStreamEventStorageOutputSvc(const std::string &name, ISvcLocator *pSvcLocator)
Constructors:
Gaudi::Property< int > m_run
Dump fragments.
ServiceHandle< StoreGateSvc > m_metaDataStore
Gaudi::Property< std::string > m_appName
File Tag.
void updateDataWriterParameters(DataWriterParameters &) const
Create DataWriter parameters from job properties.
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
StatusCode stop() override
Gaudi::Property< std::string > m_streamName
eformat event version to produce, "v40" for run1, or "current"
Gaudi::Property< std::string > m_bsOutputStreamName
Gaudi::Property< bool > m_dump
Write eventless files.
Gaudi::Property< bool > m_compressEvents
number of MB per file
std::unique_ptr< ByteStreamDataWriter > m_dataWriter
pointer to DataWriter
const ByteStreamMetadata * getByteStreamMetadata()
Gaudi::Property< std::string > m_inputDir
< directory for the data files
bool initDataWriterContents(const xAOD::EventInfo *, const ByteStreamMetadata *)
Property holding a SG store/key/clid from which a ReadHandle is made.
Maintain a set of objects, one per slot.
EventInfo_v1 EventInfo
Definition of the latest event info version.
std::unique_ptr< uint32_t[] > buffer
Underlying data structure.
Class containing parameters needed to initiate DataWriter.