 |
ATLAS Offline Software
|
Go to the documentation of this file.
7 #ifndef ATHENASERVICES_ATHENAOUTPUTSTREAM_H
8 #define ATHENASERVICES_ATHENAOUTPUTSTREAM_H
19 #include "Gaudi/Property.h"
20 #include "GaudiKernel/IDataSelector.h"
21 #include "GaudiKernel/ServiceHandle.h"
22 #include "GaudiKernel/ToolHandle.h"
31 #include "GaudiKernel/IClassIDSvc.h"
32 #include "GaudiKernel/IIncidentListener.h"
33 #include "GaudiKernel/IIoComponent.h"
55 IIncidentListener, IIoComponent> {
59 typedef std::vector<SG::DataProxy*>
Items;
60 typedef std::vector<std::pair<std::string, std::string> >
TypeKeyPairs;
91 virtual void handle(
const Incident& incident)
override;
114 StringProperty
m_streamName{
this,
"StreamName",
"",
"Name of the output stream"};
117 StringArrayProperty
m_itemList{
this,
"ItemList", {},
"List of items to write",
"OutputStreamItemList"};
120 StringArrayProperty
m_metadataItemList{
this,
"MetadataItemList", {},
"List of metadata items to write",
"OutputStreamItemList"};
124 "RegEx pattern to select processing tags for which DataHeader should retain provenances"};
130 StringArrayProperty
m_compressionListLow{
this,
"CompressionListLow", {},
"Lossy float compression list (low)"};
133 UnsignedIntegerProperty
m_compressionBitsHigh{
this,
"CompressionBitsHigh", 7,
"Lossy float compression bits (high)"};
136 UnsignedIntegerProperty
m_compressionBitsLow{
this,
"CompressionBitsLow", 15,
"Lossy float compression bits (low)"};
143 StringProperty
m_outputName{
this,
"OutputFile",
"DidNotNameOutput.root",
"Name of the output file"};
146 StringProperty
m_persName{
this,
"EvtConversionSvc",
"EventPersistencySvc",
"Name of the persistency service writing data"};
149 BooleanProperty
m_forceRead{
this,
"ForceRead",
true,
"Force read data objects in ItemList"};
156 BooleanProperty
m_itemListFromTool{
this,
"TakeItemsFromInput",
false,
"Write everything in input DataHeader to output"};
188 ToolHandleArray<IAthenaOutputTool>
m_helperTools{
this,
"HelperTools", {},
"List of AlgTools used by this stream"};
204 std::map< std::string, std::unique_ptr<IAthenaOutputStreamTool> >
m_streamerMap;
225 {
this,
"SelVetoesKey",
"" };
230 {
this,
"CompInfoKey",
"" };
240 const std::string& tns,
241 const std::string& aux_attr,
250 const std::string& item_key)
const;
266 #endif // ATHENASERVICES_OUTPUTSTREAM_H
virtual StatusCode finalize() override
std::map< std::string, std::string > m_rangeIDforRangeFN
map of RangeIDs (as used by the Sequencer) for each Range filename generated
void writeMetaData(const std::string &outputFN="")
Write MetaData for this stream (by default) or for a substream outputFN (in ES mode)
std::string m_outputAttributes
Output attributes.
StatusCode addItemObjects(const SG::FolderItem &, SG::SelectionVetoes &vetoes, SG::CompressionInfo &compInfo)
Add item data objects to output streamer list.
std::multimap< CLID, std::string > m_CLIDKeyPairs
Map of (clid,key) pairs to be excluded (comes from m_excludeList)
StringArrayProperty m_itemList
Vector of item names.
std::set< std::string > buildCompressionSet(const ToolHandle< SG::IFolder > &handle, const CLID &item_id, const std::string &item_key) const
Helper function for building the compression lists.
ServiceHandle< StoreGateSvc > m_dataStore
Handle to the StoreGateSvc store where the data we want to write out resides.
StringArrayProperty m_compressionListLow
Vector of item names.
std::recursive_mutex mutex_t
std::unordered_map< std::string, SG::auxid_set_t > SelectionVetoes
Map of vetoed variables.
This file contains the class definition for the OutputStreamSequencerSvc class.
virtual StatusCode initialize() override
BooleanProperty m_forceRead
set to true to force read of data objects in item list
std::vector< SG::DataProxy * > Items
typedefs
IDataSelector * selectedObjects()
Return the list of selected objects.
void loadDict(CLID clid)
Helper function to load dictionaries (both transient and persistent) for a given type.
StringArrayProperty m_transientItems
List of items that are known to be present in the transient store (and hence we can make input depend...
IDataSelector m_objects
Collection of objects being selected.
StringArrayProperty m_metadataItemList
Vector of item names.
ServiceHandle< StoreGateSvc > * m_currentStore
StatusCode collectAllObjects()
Collect data objects for output streamer list.
StringArrayProperty m_compressionListHigh
Vector of item names.
ToolHandle< IAthenaOutputStreamTool > m_streamer
pointer to AthenaOutputStreamTool
ServiceHandle< OutputStreamSequencerSvc > m_outSeqSvc
AthenaOutputStream(const std::string &name, ISvcLocator *pSvcLocator)
Standard algorithm Constructor.
UnsignedIntegerProperty m_compressionBitsHigh
Number of mantissa bits in the float compression.
ServiceHandle< IItemListSvc > m_itemSvc
Handles to all the necessary services.
std::map< unsigned, std::string > m_slotRangeMap
map of filenames assigned to active slots
::StatusCode StatusCode
StatusCode definition for legacy code.
StringProperty m_outputName
Name of the output file.
void compressionListHandlerLow(Gaudi::Details::PropertyBase &)
Handler for ItemNames Property.
DataProxy provides the registry services for StoreGate.
ToolHandleArray< IAthenaOutputTool > m_helperTools
vector of AlgTools that that are executed by this stream
std::vector< std::unique_ptr< DataObject > > m_ownedObjects
Collection of DataObject instances owned by this service.
void excludeListHandler(Gaudi::Details::PropertyBase &)
Handler for ItemNames Property.
void compressionListHandlerHigh(Gaudi::Details::PropertyBase &)
Handler for ItemNames Property.
void handleVariableSelection(const SG::IConstAuxStore &auxstore, SG::DataProxy &itemProxy, const std::string &tns, const std::string &aux_attr, SG::SelectionVetoes &vetoes) const
Here we build the vetoed AuxIDs.
uint32_t CLID
The Class ID type.
virtual StatusCode io_finalize() override
StringProperty m_persName
Name of the persistency service capable to write data from the store.
bool m_writeMetadataAndDisconnect
BooleanProperty m_extendProvenanceRecord
Set to false to omit adding the current DataHeader into the DataHeader history This will cause the in...
BooleanProperty m_itemListFromTool
Set to write out everything in input DataHeader.
ToolHandle< SG::IFolder > m_transient
Decoded list of transient ids.
void finalizeRange(const std::string &rangeFN)
ServiceHandle< IIncidentSvc > m_incidentSvc
std::unordered_map< std::string, SG::ThinningInfo::compression_map_t > CompressionInfo
Map of compressed variables and their compression levels.
void itemListHandler(Gaudi::Details::PropertyBase &)
Handler for ItemNames Property.
std::vector< std::pair< std::string, std::string > > TypeKeyPairs
Property holding a SG store/key/clid from which a WriteHandle is made.
ServiceHandle< StoreGateSvc > m_metadataStore
virtual StatusCode io_reinit() override
Callback method to reinitialize the internal state of the component for I/O purposes (e....
ServiceHandle< ITPCnvSvc > m_tpCnvSvc
StringProperty m_streamName
Stream name (defaults to algorithm name)
UnsignedIntegerProperty m_compressionBitsLow
Number of mantissa bits in the float compression.
IDataSelector m_altObjects
Objects overridden by ‘exact’ handling.
ServiceHandle< IDictLoaderSvc > m_dictLoader
ServiceHandle< MetaDataSvc > m_metaDataSvc
std::atomic< int > m_events
Number of events written to this output stream.
bool simpleMatch(const std::string &pattern, const std::string &text)
Glob-style matcher, where the only meta-character is '*'.
ToolHandle< SG::IFolder > m_compressionDecoderHigh
The top-level folder with items to be compressed high.
mutex_t m_mutex
mutex for this Stream write() and handle() methods
algorithm that marks for write data objects in SG
virtual StatusCode execute() override
std::map< std::string, std::unique_ptr< IAthenaOutputStreamTool > > m_streamerMap
map of streamerTools handling event ranges in MT
StringProperty m_keepProvenances
Provenance record selection.
virtual StatusCode write()
Stream the data.
ServiceHandle< IClassIDSvc > m_pCLIDSvc
SG::WriteHandleKey< SG::SelectionVetoes > m_selVetoesKey
Key used for recording selected dynamic variable information to the event store.
Interface for const operations on an auxiliary store.
a Folder item (data object) is identified by the clid/key pair
virtual void handle(const Incident &incident) override
Incident service handle listening for MetaDataStop.
ToolHandle< SG::IFolder > m_p2BWritten
The top-level folder with items to be written.
void clearSelection()
Clear list of selected objects.
ToolHandle< SG::IFolder > m_compressionDecoderLow
The top-level folder with items to be compressed low.
virtual ~AthenaOutputStream()
Standard Destructor.
SG::WriteHandleKey< SG::CompressionInfo > m_compInfoKey
Key used for recording lossy float compressed variable information to the event store.