|
ATLAS Offline Software
|
Go to the documentation of this file.
7 #ifndef ATHENASERVICES_ATHENAOUTPUTSTREAM_H
8 #define ATHENASERVICES_ATHENAOUTPUTSTREAM_H
19 #include "GaudiKernel/IDataSelector.h"
20 #include "Gaudi/Property.h"
21 #include "GaudiKernel/ServiceHandle.h"
22 #include "GaudiKernel/ToolHandle.h"
24 #include "GaudiKernel/IIncidentListener.h"
27 #include "GaudiKernel/IIoComponent.h"
55 IIncidentListener, IIoComponent> {
58 typedef std::vector<SG::DataProxy*>
Items;
88 StringProperty
m_streamName{
this,
"StreamName",
"",
"name of the output stream"};
90 StringArrayProperty
m_itemList{
this,
"ItemList",{},
"List of items to write",
"OutputStreamItemList"};
92 StringArrayProperty
m_metadataItemList{
this,
"MetadataItemList",{},
"List of metadata items to write",
"OutputStreamItemList"};
94 StringArrayProperty
m_excludeList{
this,
"ExcludeList",{},
"List of metadata items to write",
"OrderedSet<std::string>"};
161 std::map< std::string, std::unique_ptr<IAthenaOutputStreamTool> >
m_streamerMap;
170 {
this,
"SelVetoesKey",
"" };
175 {
this,
"CompInfoKey",
"" };
188 typedef std::vector<std::pair<std::string, std::string> >
TypeKeyPairs;
213 virtual void handle(
const Incident& incident)
override;
224 const std::string& tns,
225 const std::string& aux_attr,
229 void tokenizeAtSep( std::vector<std::string>&,
const std::string&,
const std::string& )
const;
232 bool matchKey(
const std::vector<std::string>&
key,
const std::string& proxyName)
const;
240 const std::string& item_key)
const;
253 #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
StatusCode addItemObjects(const SG::FolderItem &, SG::SelectionVetoes &vetoes, SG::CompressionInfo &compInfo)
Add item data objects to output streamer list.
unsigned int m_compressionBitsHigh
Number of mantissa bits in the float compression.
std::multimap< CLID, std::string > m_CLIDKeyPairs
map of (clid,key) pairs to be excluded (comes from m_excludeList)
void tokenizeAtSep(std::vector< std::string > &, const std::string &, const std::string &) const
tokenize a string based on a substring
ToolHandle< SG::IFolder > m_decoder
the top-level folder with items to be written
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.
StringProperty m_writingTool
Name of the OutputStreamTool used for writing.
std::recursive_mutex mutex_t
mutex for this Stream write() and handle() methods
ServiceHandle< IClassIDSvc > IClassIDSvc_t
std::unordered_map< std::string, SG::auxid_set_t > SelectionVetoes
Map of vetoed variables.
std::string m_persName
Name of the persistency service capable to write data from the store.
bool matchKey(const std::vector< std::string > &key, const std::string &proxyName) const
Try to match a DataProxy name to a vector of strings.
virtual StatusCode initialize() override
std::vector< SG::DataProxy * > Items
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.
This class defines a protocol to register boolean decisions and.
bool m_checkNumberOfWrites
set to true to check for number of times each object is written
StringArrayProperty m_compressionListHigh
Vector of item names.
bool m_forceRead
set to true to force read of data objects in item list
bool m_writeOnExecute
set to true to trigger streaming of data on execute()
ToolHandle< IAthenaOutputStreamTool > m_streamer
pointer to AthenaOutputStreamTool
ServiceHandle< OutputStreamSequencerSvc > m_outSeqSvc
unsigned int m_compressionBitsLow
Number of mantissa bits in the float compression.
The Athena Transient Store API.
bool m_extendProvenanceRecord
set to false to omit adding the current DataHeader into the DataHeader history this will cause the in...
AthenaOutputStream(const std::string &name, ISvcLocator *pSvcLocator)
Standard algorithm Constructor.
ServiceHandle< IItemListSvc > m_itemSvc
std::map< unsigned, std::string > m_slotRangeMap
map of filenames assigned to active slots
::StatusCode StatusCode
StatusCode definition for legacy code.
void compressionListHandlerLow(Gaudi::Details::PropertyBase &)
Handler for ItemNames Property.
DataProxy provides the registry services for StoreGate.
bool m_itemListFromTool
set to write out everything in input DataHeader
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
uint32_t CLID
The Class ID type.
virtual StatusCode io_finalize() override
bool m_writeMetadataAndDisconnect
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.
std::string m_outputName
Name of the output file.
void itemListHandler(Gaudi::Details::PropertyBase &)
Handler for ItemNames Property.
std::vector< std::pair< std::string, std::string > > TypeKeyPairs
virtual StatusCode stop() override
Property holding a SG store/key/clid from which a WriteHandle is made.
This class provides configuration properties to enable OutputStream file sequences.
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)
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.
ToolHandle< SG::IFolder > m_compressionDecoderHigh
the top-level folder with items to be compressed high
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
CounterMapType m_objectWriteCounter
virtual StatusCode write()
Stream the data.
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.
bool m_writeOnFinalize
set to true to trigger streaming of data on finalize()
a Folder item (data object) is identified by the clid/key pair
StringArrayProperty m_excludeList
Vector of item names.
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
std::map< std::string, unsigned int > CounterMapType
map to record number of writes per object
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.