![]() |
ATLAS Offline Software
|
This is the implementation of IAthenaOutputStreamTool. More...
#include <AthenaOutputStreamTool.h>
Public Types | |
| typedef std::pair< std::string, std::string > | TypeKeyPair |
| Stream out objects. | |
| typedef std::vector< TypeKeyPair > | TypeKeyPairs |
| typedef std::vector< DataObject * > | DataObjectVec |
| Stream out a vector of objects Must convert to DataObject, e.g. | |
Public Member Functions | |
| AthenaOutputStreamTool (const std::string &type, const std::string &name, const IInterface *parent) | |
| Standard AlgTool Constructor. | |
| virtual StatusCode | initialize () override |
| AthAlgTool Interface method implementations: | |
| StatusCode | connectServices (const std::string &dataStore, const std::string &cnvSvc, bool extendProvenenceRecord) override |
| Specify which data store and conversion service to use and whether to extend provenance Only use if one wants to override jobOptions. | |
| StatusCode | connectOutput (const std::string &outputName="") override |
| Connect to the output stream Must connectOutput BEFORE streaming Only specify "outputName" if one wants to override jobOptions. | |
| StatusCode | commitOutput (bool doCommit=false) override |
| Commit the output stream after having streamed out objects Must commitOutput AFTER streaming. | |
| StatusCode | finalizeOutput () override |
| Finalize the output stream after the last commit, e.g. | |
| virtual StatusCode | streamObjects (const TypeKeyPairs &typeKeys, const std::string &outputName="") override |
| virtual StatusCode | streamObjects (const DataObjectVec &dataObjects, const std::string &outputName="") override |
| virtual StatusCode | getInputItemList (SG::IFolder *m_p2BWrittenFromTool) override |
Private Member Functions | |
| StatusCode | connectServices () |
| Do the real connection to services. | |
| void | propagateProvenance (const DataHeader &src_dh) |
| copy provenance records when creating new DataHeaders | |
Private Attributes | |
| StringProperty | m_outputName { this, "OutputFile", "", "name of the output db name"} |
| StringProperty | m_dataHeaderKey { this, "DataHeaderKey", "", "name of the data header key: defaults to tool name"} |
| StringProperty | m_processTag { this, "ProcessingTag", "", "tag of processing stage: defaults to SG key of DataHeader (Stream name)"} |
| StringProperty | m_outputCollection { this, "OutputCollection", "", "custom container name prefix for DataHeader: default = "" (will result in \"POOLContainer_\")"} |
| StringProperty | m_containerPrefix { this, "PoolContainerPrefix", "", "prefix for top level POOL container: default = \"CollectionTree\""} |
| StringProperty | m_containerNameHint { this, "TopLevelContainerName", "0", "naming hint policy for top level POOL container: default = \"0\""} |
| StringProperty | m_metaDataOutputCollection { this, "MetaDataOutputCollection", "", "custom container name prefix for MetaDataHeader: default = "" (will result in \"MetaDataHdr\")"} |
| StringProperty | m_metaDataContainerPrefix { this, "MetaDataPoolContainerPrefix", "", "prefix for top level MetaData container: default = "" (will result in \"MetaData\")"} |
| StringProperty | m_branchNameHint { this, "SubLevelBranchName", "0", "naming hint policy for POOL branching: default = \"0\"" } |
| BooleanProperty | m_extend { this, "SaveDecisions", false, "Set to true to add streaming decisions to an attributeList"} |
| std::string | m_outputAttributes |
| std::string | m_metaDataOutputAttributes |
| SG::ReadHandleKey< AthenaAttributeList > | m_attrListKey {this, "AttributeListKey", "", "optional key for AttributeList to be written as part of the DataHeader: default = \"\""} |
| std::string | m_attrListWrite {""} |
| ServiceHandle< StoreGateSvc > | m_store { this, "Store", "StoreGateSvc/DetectorStore", "Pointer to the data store"} |
| ServiceHandle< IConversionSvc > | m_conversionSvc { this, "ConversionService", "AthenaPoolCnvSvc" } |
| Keep reference to the data conversion service. | |
| ServiceHandle< IClassIDSvc > | m_clidSvc |
| Ref to ClassIDSvc to convert type name to clid. | |
| ServiceHandle< IDecisionSvc > | m_decSvc |
| Ref to DecisionSvc. | |
| DataHeader * | m_dataHeader {nullptr} |
| Current DataHeader for streamed objects. | |
| bool | m_connectionOpen {false} |
| Flag to tell whether connectOutput has been called. | |
| bool | m_extendProvenanceRecord {false} |
| Flag as to whether to extend provenance via the DataHeader. | |
| std::string | m_keepProvenancesStr |
| RegEx string to match provenance tags to keep in the output DataHeader. Retrieved from an OutputStream property. | |
| std::regex | m_keepProvenancesRE |
| RegEx pattern created from m_keepProvenancesStr. | |
| std::map< std::string, bool > | m_keepProvenanceMatch |
| Cache provenance RegEx matching result in a map. | |
| std::set< std::string > | m_skippedItems |
| set of skipped item keys, because of missing CLID | |
This is the implementation of IAthenaOutputStreamTool.
Definition at line 34 of file AthenaOutputStreamTool.h.
| typedef std::vector<DataObject*> AthenaOutputStreamTool::DataObjectVec |
Stream out a vector of objects Must convert to DataObject, e.g.
#include "AthenaKernel/StorableConversions.h" T* obj = xxx; DataObject* dataObject = SG::asStorable(obj);
Definition at line 76 of file AthenaOutputStreamTool.h.
| typedef std::pair<std::string, std::string> AthenaOutputStreamTool::TypeKeyPair |
Stream out objects.
Provide vector of typeName/key pairs. If key is empty, assumes only one object and this will fail if there is more than one
Definition at line 67 of file AthenaOutputStreamTool.h.
| typedef std::vector<TypeKeyPair> AthenaOutputStreamTool::TypeKeyPairs |
Definition at line 68 of file AthenaOutputStreamTool.h.
| AthenaOutputStreamTool::AthenaOutputStreamTool | ( | const std::string & | type, |
| const std::string & | name, | ||
| const IInterface * | parent ) |
Standard AlgTool Constructor.
Constructor.
Definition at line 43 of file AthenaOutputStreamTool.cxx.
|
override |
Commit the output stream after having streamed out objects Must commitOutput AFTER streaming.
Definition at line 338 of file AthenaOutputStreamTool.cxx.
|
override |
Connect to the output stream Must connectOutput BEFORE streaming Only specify "outputName" if one wants to override jobOptions.
Definition at line 159 of file AthenaOutputStreamTool.cxx.
|
private |
Do the real connection to services.
Definition at line 150 of file AthenaOutputStreamTool.cxx.
|
override |
Specify which data store and conversion service to use and whether to extend provenance Only use if one wants to override jobOptions.
Definition at line 116 of file AthenaOutputStreamTool.cxx.
|
override |
Finalize the output stream after the last commit, e.g.
in finalize
Definition at line 350 of file AthenaOutputStreamTool.cxx.
|
overridevirtual |
Definition at line 533 of file AthenaOutputStreamTool.cxx.
|
overridevirtual |
AthAlgTool Interface method implementations:
Definition at line 50 of file AthenaOutputStreamTool.cxx.
|
private |
copy provenance records when creating new DataHeaders
Definition at line 283 of file AthenaOutputStreamTool.cxx.
|
overridevirtual |
Definition at line 422 of file AthenaOutputStreamTool.cxx.
|
overridevirtual |
Definition at line 361 of file AthenaOutputStreamTool.cxx.
|
private |
Definition at line 101 of file AthenaOutputStreamTool.h.
|
private |
Definition at line 103 of file AthenaOutputStreamTool.h.
|
private |
Definition at line 96 of file AthenaOutputStreamTool.h.
|
private |
Ref to ClassIDSvc to convert type name to clid.
Definition at line 109 of file AthenaOutputStreamTool.h.
|
private |
Flag to tell whether connectOutput has been called.
Definition at line 115 of file AthenaOutputStreamTool.h.
|
private |
Definition at line 93 of file AthenaOutputStreamTool.h.
|
private |
Definition at line 92 of file AthenaOutputStreamTool.h.
|
private |
Keep reference to the data conversion service.
Definition at line 107 of file AthenaOutputStreamTool.h.
|
private |
Current DataHeader for streamed objects.
Definition at line 113 of file AthenaOutputStreamTool.h.
|
private |
Definition at line 89 of file AthenaOutputStreamTool.h.
|
private |
Ref to DecisionSvc.
Definition at line 111 of file AthenaOutputStreamTool.h.
|
private |
Definition at line 97 of file AthenaOutputStreamTool.h.
|
private |
Flag as to whether to extend provenance via the DataHeader.
Definition at line 118 of file AthenaOutputStreamTool.h.
|
private |
Cache provenance RegEx matching result in a map.
Definition at line 124 of file AthenaOutputStreamTool.h.
|
private |
RegEx pattern created from m_keepProvenancesStr.
Definition at line 122 of file AthenaOutputStreamTool.h.
|
private |
RegEx string to match provenance tags to keep in the output DataHeader. Retrieved from an OutputStream property.
Definition at line 120 of file AthenaOutputStreamTool.h.
|
private |
Definition at line 95 of file AthenaOutputStreamTool.h.
|
private |
Definition at line 100 of file AthenaOutputStreamTool.h.
|
private |
Definition at line 94 of file AthenaOutputStreamTool.h.
|
private |
Definition at line 99 of file AthenaOutputStreamTool.h.
|
private |
Definition at line 91 of file AthenaOutputStreamTool.h.
|
private |
Definition at line 88 of file AthenaOutputStreamTool.h.
|
private |
Definition at line 90 of file AthenaOutputStreamTool.h.
|
private |
set of skipped item keys, because of missing CLID
Definition at line 127 of file AthenaOutputStreamTool.h.
|
private |
Definition at line 105 of file AthenaOutputStreamTool.h.