| The Gaudi Framework v32r1 (f65d50dc)

TagCollectionStream.h
Go to the documentation of this file.
1 #ifndef GAUDISVC_PERSISTENCYSVC_TAGCOLLECTIONSTREAM_H
2 #define GAUDISVC_PERSISTENCYSVC_TAGCOLLECTIONSTREAM_H
3
4 // Required for inheritance
5 #include "GaudiKernel/NTuple.h"
6 #include "OutputStream.h"
7
8 // forward declarations
9 class GenericAddress;
10
61 class TagCollectionStream : public OutputStream {
62 protected:
63 Gaudi::Property<std::string> m_addrLeaf{this, "AddressLeaf", "/Event",
64 "name of the address leaf in the transient event store"};
65 Gaudi::Property<std::string> m_addrColName{this, "AddressColumn", "Address",
66 "name of the address column of the tag collection"};
67 Gaudi::Property<std::string> m_collSvcName{this, "TagCollectionSvc", "NTupleSvc", "name of the collection service"};
68 Gaudi::Property<bool> m_objectsFirst{this, "ObjectsFirst", true,
69 "flag to indicate that the objects should be written first"};
70 Gaudi::Property<std::string> m_tagName{this, "Collection", "", "name of the tag collection in the transient store"};
71
73 INTupleItem* m_addrColumn = nullptr;
75 std::string m_topLeafName;
77 bool m_isTopLeaf = false;
79 SmartIF<INTupleSvc> m_collectionSvc;
81 std::unique_ptr<GenericAddress> m_addr;
83 NTuple::Item<IOpaqueAddress*> m_item;
85 StatusCode writeObjects() override;
87 virtual StatusCode connectAddress();
89 StatusCode writeData();
91 StatusCode writeTuple();
93 StatusCode writeRecord();
94
95 public:
97 TagCollectionStream( const std::string& name, ISvcLocator* pSvcLocator );
99 StatusCode initialize() override;
101 StatusCode finalize() override;
102 };
103
104 #endif // GAUDISVC_PERSISTENCYSVC_TAGCOLLECTIONSTREAM_H
SmartIF< INTupleSvc >
TagCollectionStream::connectAddress
virtual StatusCode connectAddress()
Connect address column, if not already connected.
Definition: TagCollectionStream.cpp:21
TagCollectionStream::TagCollectionStream
TagCollectionStream(const std::string &name, ISvcLocator *pSvcLocator)
Standard algorithm Constructor.
Definition: TagCollectionStream.cpp:17
ISvcLocator
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
TagCollectionStream::initialize
StatusCode initialize() override
Initialize TagCollectionStream.
Definition: TagCollectionStream.cpp:39
TagCollectionStream::m_addr
std::unique_ptr< GenericAddress > m_addr
Address buffer.
Definition: TagCollectionStream.h:81
Gaudi::Property
Implementation of property with value of concrete type.
Definition: Property.h:352
TagCollectionStream::m_addrLeaf
Gaudi::Property< std::string > m_addrLeaf
Definition: TagCollectionStream.h:63
TagCollectionStream
Specialized output stream class for event tag collections, where the basic Event entry point should b...
Definition: TagCollectionStream.h:61
NTuple.h
TagCollectionStream::m_objectsFirst
Gaudi::Property< bool > m_objectsFirst
Definition: TagCollectionStream.h:68
TagCollectionStream::writeData
StatusCode writeData()
Write data objects.
Definition: TagCollectionStream.cpp:108
TagCollectionStream::m_addrColName
Gaudi::Property< std::string > m_addrColName
Definition: TagCollectionStream.h:65
TagCollectionStream::m_addrColumn
INTupleItem * m_addrColumn
NTuple column to hold the opaque address of the address leaf.
Definition: TagCollectionStream.h:73
GenericAddress
Generic Transient Address.
Definition: GenericAddress.h:20
TagCollectionStream::m_collectionSvc
SmartIF< INTupleSvc > m_collectionSvc
Keep reference to the tuple service.
Definition: TagCollectionStream.h:79
TagCollectionStream::writeTuple
StatusCode writeTuple()
Write tuple data.
Definition: TagCollectionStream.cpp:98
TagCollectionStream::m_tagName
Gaudi::Property< std::string > m_tagName
Definition: TagCollectionStream.h:70
OutputStream
A small to stream Data I/O.
Definition: OutputStream.h:28
std::string
STL class.
TagCollectionStream::writeRecord
StatusCode writeRecord()
Write full event record.
Definition: TagCollectionStream.cpp:118
INTupleItem
NTuple interface class definition.
Definition: INTuple.h:27
TagCollectionStream::m_collSvcName
Gaudi::Property< std::string > m_collSvcName
Definition: TagCollectionStream.h:67
TagCollectionStream::finalize
StatusCode finalize() override
Terminate TagCollectionStream.
Definition: TagCollectionStream.cpp:90
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
std::unique_ptr< GenericAddress >
NTuple::Item< IOpaqueAddress * >
TagCollectionStream::m_item
NTuple::Item< IOpaqueAddress * > m_item
Address item buffer.
Definition: TagCollectionStream.h:83
OutputStream.h
TagCollectionStream::m_isTopLeaf
bool m_isTopLeaf
Short cut flag to indicate if the address leaf is the top leaf (performace cache)
Definition: TagCollectionStream.h:77
Gaudi::Algorithm::name
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:645
TagCollectionStream::m_topLeafName
std::string m_topLeafName
Name of the top leaf (performance cache)
Definition: TagCollectionStream.h:75
TagCollectionStream::writeObjects
StatusCode writeObjects() override
OutputStream override: Select the different objects and write them to file.
Definition: TagCollectionStream.cpp:124