| The Gaudi Framework v27r1

- 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 "OutputStream.h"
6 #include "GaudiKernel/NTuple.h"
7
8 // forward declarations
9 class GenericAddress;
10
11
62 class TagCollectionStream : public OutputStream {
63 protected:
64
66 std::string m_addrLeaf = "/Event" ;
68 std::string m_addrColName = "Address" ;
70 std::string m_tagName;
72 std::string m_collSvcName = "NTupleSvc";
74 bool m_objectsFirst = true;
76 INTupleItem* m_addrColumn = nullptr;
78 std::string m_topLeafName;
80 bool m_isTopLeaf = false;
82 SmartIF<INTupleSvc> m_collectionSvc;
84 std::unique_ptr<GenericAddress> m_addr;
86 NTuple::Item<IOpaqueAddress*> m_item;
88 StatusCode writeObjects() override;
90 virtual StatusCode connectAddress();
92 StatusCode writeData();
94 StatusCode writeTuple();
96 StatusCode writeRecord();
97
98 public:
100 TagCollectionStream(const std::string& name, ISvcLocator* pSvcLocator);
102 ~TagCollectionStream() override = default;
104 StatusCode initialize() override;
106 StatusCode finalize() override;
107 };
108
109 #endif // GAUDISVC_PERSISTENCYSVC_TAGCOLLECTIONSTREAM_H
TagCollectionStream::m_addrColName
std::string m_addrColName
Property: Name of the address column of the tag collection.
Definition: TagCollectionStream.h:68
TagCollectionStream::m_tagName
std::string m_tagName
Property: Name of the tag collection in the transient store.
Definition: TagCollectionStream.h:70
SmartIF< INTupleSvc >
TagCollectionStream::connectAddress
virtual StatusCode connectAddress()
Connect address column, if not already connected.
Definition: TagCollectionStream.cpp:29
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:50
TagCollectionStream::m_addr
std::unique_ptr< GenericAddress > m_addr
Address buffer.
Definition: TagCollectionStream.h:84
TagCollectionStream
Specialized output stream class for event tag collections, where the basic Event entry point should b...
Definition: TagCollectionStream.h:62
NTuple.h
TagCollectionStream::writeData
StatusCode writeData()
Write data objects.
Definition: TagCollectionStream.cpp:115
TagCollectionStream::m_addrColumn
INTupleItem * m_addrColumn
NTuple column to hold the opaque address of the address leaf.
Definition: TagCollectionStream.h:76
GenericAddress
Generic Transient Address.
Definition: GenericAddress.h:20
TagCollectionStream::m_collectionSvc
SmartIF< INTupleSvc > m_collectionSvc
Keep reference to the tuple service.
Definition: TagCollectionStream.h:82
TagCollectionStream::writeTuple
StatusCode writeTuple()
Write tuple data.
Definition: TagCollectionStream.cpp:105
TagCollectionStream::m_objectsFirst
bool m_objectsFirst
Property: Flag to indicate that the objects should be written first.
Definition: TagCollectionStream.h:74
OutputStream
A small to stream Data I/O.
Definition: OutputStream.h:29
std::string
STL class.
Algorithm::name
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:820
TagCollectionStream::m_addrLeaf
std::string m_addrLeaf
Property: Name of the address leaf in the transient event store.
Definition: TagCollectionStream.h:66
TagCollectionStream::writeRecord
StatusCode writeRecord()
Write full event record.
Definition: TagCollectionStream.cpp:125
INTupleItem
NTuple interface class definition.
Definition: INTuple.h:26
TagCollectionStream::finalize
StatusCode finalize() override
Terminate TagCollectionStream.
Definition: TagCollectionStream.cpp:97
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
TagCollectionStream::m_collSvcName
std::string m_collSvcName
Property: Name of the collection service.
Definition: TagCollectionStream.h:72
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:86
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:80
TagCollectionStream::m_topLeafName
std::string m_topLeafName
Name of the top leaf (performance cache)
Definition: TagCollectionStream.h:78
TagCollectionStream::writeObjects
StatusCode writeObjects() override
OutputStream override: Select the different objects and write them to file.
Definition: TagCollectionStream.cpp:133