| The Gaudi Framework v29r0 (ff2e7097)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

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 {
63 protected:
64 Gaudi::Property<std::string> m_addrLeaf{this, "AddressLeaf", "/Event",
65 "name of the address leaf in the transient event store"};
66 Gaudi::Property<std::string> m_addrColName{this, "AddressColumn", "Address",
67 "name of the address column of the tag collection"};
68 Gaudi::Property<std::string> m_collSvcName{this, "TagCollectionSvc", "NTupleSvc", "name of the collection service"};
69 Gaudi::Property<bool> m_objectsFirst{this, "ObjectsFirst", true,
70 "flag to indicate that the objects should be written first"};
71 Gaudi::Property<std::string> m_tagName{this, "Collection", "", "name of the tag collection in the transient store"};
72
74 INTupleItem* m_addrColumn = nullptr;
76 std::string m_topLeafName;
78 bool m_isTopLeaf = false;
80 SmartIF<INTupleSvc> m_collectionSvc;
82 std::unique_ptr<GenericAddress> m_addr;
84 NTuple::Item<IOpaqueAddress*> m_item;
86 StatusCode writeObjects() override;
88 virtual StatusCode connectAddress();
90 StatusCode writeData();
92 StatusCode writeTuple();
94 StatusCode writeRecord();
95
96 public:
98 TagCollectionStream( const std::string& name, ISvcLocator* pSvcLocator );
100 ~TagCollectionStream() override = default;
102 StatusCode initialize() override;
104 StatusCode finalize() override;
105 };
106
107 #endif // GAUDISVC_PERSISTENCYSVC_TAGCOLLECTIONSTREAM_H
SmartIF< INTupleSvc >
TagCollectionStream::connectAddress
virtual StatusCode connectAddress()
Connect address column, if not already connected.
Definition: TagCollectionStream.cpp:23
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:42
TagCollectionStream::m_addr
std::unique_ptr< GenericAddress > m_addr
Address buffer.
Definition: TagCollectionStream.h:82
Algorithm::name
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:731
Gaudi::Property
Implementation of property with value of concrete type.
Definition: Property.h:319
TagCollectionStream::m_addrLeaf
Gaudi::Property< std::string > m_addrLeaf
Definition: TagCollectionStream.h:64
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:69
TagCollectionStream::writeData
StatusCode writeData()
Write data objects.
Definition: TagCollectionStream.cpp:114
TagCollectionStream::m_addrColName
Gaudi::Property< std::string > m_addrColName
Definition: TagCollectionStream.h:66
TagCollectionStream::m_addrColumn
INTupleItem * m_addrColumn
NTuple column to hold the opaque address of the address leaf.
Definition: TagCollectionStream.h:74
GenericAddress
Generic Transient Address.
Definition: GenericAddress.h:20
TagCollectionStream::m_collectionSvc
SmartIF< INTupleSvc > m_collectionSvc
Keep reference to the tuple service.
Definition: TagCollectionStream.h:80
TagCollectionStream::writeTuple
StatusCode writeTuple()
Write tuple data.
Definition: TagCollectionStream.cpp:103
TagCollectionStream::m_tagName
Gaudi::Property< std::string > m_tagName
Definition: TagCollectionStream.h:71
OutputStream
A small to stream Data I/O.
Definition: OutputStream.h:29
std::string
STL class.
TagCollectionStream::writeRecord
StatusCode writeRecord()
Write full event record.
Definition: TagCollectionStream.cpp:125
INTupleItem
NTuple interface class definition.
Definition: INTuple.h:27
TagCollectionStream::m_collSvcName
Gaudi::Property< std::string > m_collSvcName
Definition: TagCollectionStream.h:68
TagCollectionStream::finalize
StatusCode finalize() override
Terminate TagCollectionStream.
Definition: TagCollectionStream.cpp:94
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:28
TagCollectionStream::~TagCollectionStream
~TagCollectionStream() override=default
Standard Destructor.
std::unique_ptr< GenericAddress >
NTuple::Item< IOpaqueAddress * >
TagCollectionStream::m_item
NTuple::Item< IOpaqueAddress * > m_item
Address item buffer.
Definition: TagCollectionStream.h:84
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:78
TagCollectionStream::m_topLeafName
std::string m_topLeafName
Name of the top leaf (performance cache)
Definition: TagCollectionStream.h:76
TagCollectionStream::writeObjects
StatusCode writeObjects() override
OutputStream override: Select the different objects and write them to file.
Definition: TagCollectionStream.cpp:134