![]() |
ATLAS Offline Software
|
This is the AthenaRoot version of AthenaServices/AthenaOutputStreamTool. More...
#include <RootOutputStreamTool.h>
Public Types | |
typedef std::pair< std::string, std::string > | TypeKeyPair |
Stream out objects. More... | |
typedef std::vector< TypeKeyPair > | TypeKeyPairs |
typedef std::vector< DataObject * > | DataObjectVec |
Stream out a vector of objects Must convert to DataObject, e.g. More... | |
Public Member Functions | |
RootOutputStreamTool (const std::string &type, const std::string &name, const IInterface *parent) | |
Standard AlgTool Constructor. More... | |
virtual | ~RootOutputStreamTool () |
Destructor. More... | |
StatusCode | initialize () |
Gaudi AlgTool Interface method implementations: More... | |
StatusCode | finalize () |
StatusCode | connectServices (const std::string &dataStore, const std::string &cnvSvc, bool extendProvenenceRecord) |
Specify which data store and conversion service to use and whether to extend provenence Only use if one wants to override jobOptions. More... | |
StatusCode | connectOutput (const std::string &outputName) |
Connect to the output stream Must connectOutput BEFORE streaming Only specify "outputName" if one wants to override jobOptions. More... | |
StatusCode | commitOutput (bool doCommit=false) |
Commit the output stream after having streamed out objects Must commitOutput AFTER streaming. More... | |
StatusCode | finalizeOutput () |
Finalize the output stream after the last commit, e.g. More... | |
StatusCode | streamObjects (const IAthenaOutputStreamTool::TypeKeyPairs &typeKeys, const std::string &outputName="") |
Stream out objects. More... | |
StatusCode | streamObjects (const IAthenaOutputStreamTool::DataObjectVec &dataObjects, const std::string &outputName="") |
Stream out a vector of objects Must convert to DataObject, e.g. More... | |
StatusCode | fillObjectRefs (const IAthenaOutputStreamTool::DataObjectVec &dataObjects) |
Fill refs of an object - done as second iteration over objects, after streamObject. More... | |
StatusCode | getInputItemList (SG::IFolder *m_p2BWrittenFromTool) |
Get ItemList from the OutputStreamTool (e.g. all input objects) More... | |
ServiceHandle< StoreGateSvc > & | evtStore () |
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More... | |
const ServiceHandle< StoreGateSvc > & | evtStore () const |
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More... | |
const ServiceHandle< StoreGateSvc > & | detStore () const |
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More... | |
virtual StatusCode | sysInitialize () override |
Perform system initialization for an algorithm. More... | |
virtual StatusCode | sysStart () override |
Handle START transition. More... | |
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
Return this algorithm's input handles. More... | |
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
Return this algorithm's output handles. More... | |
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
Declare a new Gaudi property. More... | |
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
Declare a new Gaudi property. More... | |
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
Declare a new Gaudi property. More... | |
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
Declare a new Gaudi property. More... | |
void | updateVHKA (Gaudi::Details::PropertyBase &) |
MsgStream & | msg () const |
MsgStream & | msg (const MSG::Level lvl) const |
bool | msgLvl (const MSG::Level lvl) const |
Static Public Member Functions | |
static const InterfaceID & | interfaceID () |
Gaudi boilerplate. More... | |
Protected Member Functions | |
void | renounceArray (SG::VarHandleKeyArray &handlesArray) |
remove all handles from I/O resolution More... | |
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > | renounce (T &h) |
void | extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps) |
Add StoreName to extra input/output deps as needed. More... | |
Private Types | |
typedef ServiceHandle< StoreGateSvc > | StoreGateSvc_t |
Private Member Functions | |
RootOutputStreamTool () | |
Default constructor: More... | |
RootOutputStreamTool (const RootOutputStreamTool &) | |
RootOutputStreamTool & | operator= (const RootOutputStreamTool &) |
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &) |
specialization for handling Gaudi::Property<SG::VarHandleKey> More... | |
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &) |
specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More... | |
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &) |
specialization for handling Gaudi::Property<SG::VarHandleBase> More... | |
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &) |
specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More... | |
Private Attributes | |
ServiceHandle< ::StoreGateSvc > | m_storeSvc |
ServiceHandle to the data store service. More... | |
ServiceHandle< ::IConversionSvc > | m_conversionSvc |
ServiceHandle to the data conversion service. More... | |
ServiceHandle< ::IClassIDSvc > | m_clidSvc |
ServiceHandle to clid service. More... | |
std::string | m_outputName |
Name of the output file. More... | |
std::string | m_treeName |
Name of the output tuple. More... | |
StoreGateSvc_t | m_evtStore |
Pointer to StoreGate (event store by default) More... | |
StoreGateSvc_t | m_detStore |
Pointer to StoreGate (detector store by default) More... | |
std::vector< SG::VarHandleKeyArray * > | m_vhka |
bool | m_varHandleArraysDeclared |
This is the AthenaRoot version of AthenaServices/AthenaOutputStreamTool.
Definition at line 33 of file RootOutputStreamTool.h.
|
inherited |
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 107 of file IAthenaOutputStreamTool.h.
|
privateinherited |
Definition at line 388 of file AthCommonDataStore.h.
|
inherited |
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 98 of file IAthenaOutputStreamTool.h.
|
inherited |
Definition at line 99 of file IAthenaOutputStreamTool.h.
Athena::RootOutputStreamTool::RootOutputStreamTool | ( | const std::string & | type, |
const std::string & | name, | ||
const IInterface * | parent | ||
) |
|
virtual |
|
private |
Default constructor:
|
private |
|
virtual |
Commit the output stream after having streamed out objects Must commitOutput AFTER streaming.
Implements IAthenaOutputStreamTool.
Definition at line 112 of file RootOutputStreamTool.cxx.
|
virtual |
Connect to the output stream Must connectOutput BEFORE streaming Only specify "outputName" if one wants to override jobOptions.
Implements IAthenaOutputStreamTool.
Definition at line 94 of file RootOutputStreamTool.cxx.
|
virtual |
Specify which data store and conversion service to use and whether to extend provenence Only use if one wants to override jobOptions.
Implements IAthenaOutputStreamTool.
Definition at line 80 of file RootOutputStreamTool.cxx.
|
inlineprivateinherited |
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
|
inlineprivateinherited |
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
|
inlineprivateinherited |
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
|
inlineprivateinherited |
specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>
Definition at line 199 of file AthCommonDataStore.h.
|
inlineinherited |
Declare a new Gaudi property.
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
|
inlineinherited |
Declare a new Gaudi property.
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
|
inlineinherited |
Definition at line 259 of file AthCommonDataStore.h.
|
inlineinherited |
Declare a new Gaudi property.
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
|
inlineinherited |
Declare a new Gaudi property.
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
|
inlineinherited |
Definition at line 145 of file AthCommonDataStore.h.
|
inlineinherited |
The standard StoreGateSvc/DetectorStore
Returns (kind of) a pointer to the StoreGateSvc
.
Definition at line 95 of file AthCommonDataStore.h.
|
inlineinherited |
The standard StoreGateSvc
(event store) Returns (kind of) a pointer to the StoreGateSvc
.
Definition at line 85 of file AthCommonDataStore.h.
|
inlineinherited |
The standard StoreGateSvc
(event store) Returns (kind of) a pointer to the StoreGateSvc
.
Definition at line 90 of file AthCommonDataStore.h.
|
protectedinherited |
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
StatusCode Athena::RootOutputStreamTool::fillObjectRefs | ( | const IAthenaOutputStreamTool::DataObjectVec & | dataObjects | ) |
Fill refs of an object - done as second iteration over objects, after streamObject.
Definition at line 223 of file RootOutputStreamTool.cxx.
StatusCode Athena::RootOutputStreamTool::finalize | ( | ) |
Definition at line 62 of file RootOutputStreamTool.cxx.
|
virtual |
Finalize the output stream after the last commit, e.g.
in finalize
Implements IAthenaOutputStreamTool.
Definition at line 129 of file RootOutputStreamTool.cxx.
|
virtual |
Get ItemList from the OutputStreamTool (e.g. all input objects)
Implements IAthenaOutputStreamTool.
Definition at line 228 of file RootOutputStreamTool.cxx.
StatusCode Athena::RootOutputStreamTool::initialize | ( | ) |
Gaudi AlgTool Interface method implementations:
Definition at line 49 of file RootOutputStreamTool.cxx.
|
overridevirtualinherited |
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
|
inlinestaticinherited |
Gaudi boilerplate.
Definition at line 119 of file IAthenaOutputStreamTool.h.
|
inlineinherited |
Definition at line 24 of file AthCommonMsg.h.
|
inlineinherited |
Definition at line 27 of file AthCommonMsg.h.
|
inlineinherited |
Definition at line 30 of file AthCommonMsg.h.
|
private |
|
overridevirtualinherited |
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
|
inlineprotectedinherited |
Definition at line 380 of file AthCommonDataStore.h.
|
inlineprotectedinherited |
remove all handles from I/O resolution
Definition at line 364 of file AthCommonDataStore.h.
|
virtual |
Stream out a vector of objects Must convert to DataObject, e.g.
#include "AthenaKernel/StorableConversions.h" T* obj = xxx; DataObject* dataObject = SG::asStorable(obj);
Implements IAthenaOutputStreamTool.
Definition at line 173 of file RootOutputStreamTool.cxx.
|
virtual |
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
Implements IAthenaOutputStreamTool.
Definition at line 134 of file RootOutputStreamTool.cxx.
|
overridevirtualinherited |
Perform system initialization for an algorithm.
We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.
Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.
|
overridevirtualinherited |
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
|
inlineinherited |
Definition at line 308 of file AthCommonDataStore.h.
|
private |
ServiceHandle to clid service.
Definition at line 93 of file RootOutputStreamTool.h.
|
private |
ServiceHandle to the data conversion service.
Definition at line 91 of file RootOutputStreamTool.h.
|
privateinherited |
Pointer to StoreGate (detector store by default)
Definition at line 393 of file AthCommonDataStore.h.
|
privateinherited |
Pointer to StoreGate (event store by default)
Definition at line 390 of file AthCommonDataStore.h.
|
private |
Name of the output file.
Definition at line 96 of file RootOutputStreamTool.h.
|
private |
ServiceHandle to the data store service.
Definition at line 89 of file RootOutputStreamTool.h.
|
private |
Name of the output tuple.
Definition at line 99 of file RootOutputStreamTool.h.
|
privateinherited |
Definition at line 399 of file AthCommonDataStore.h.
|
privateinherited |
Definition at line 398 of file AthCommonDataStore.h.