| The Gaudi Framework v32r1 (f65d50dc)

EvtCollectionStream.h
Go to the documentation of this file.
1 // ====================================================================
2 // EvtCollectionStream.h
3 // --------------------------------------------------------------------
4 //
5 // Package : GaudiSvc/PersistencySvc
6 //
7 // Author : Markus Frank
8 //
9 // ====================================================================
10 #ifndef GAUDISVC_PERSISTENCYSVC_EVTCOLLECTIONSTREAM_H
11 #define GAUDISVC_PERSISTENCYSVC_EVTCOLLECTIONSTREAM_H
12
13 // STL include files
14 #include <memory>
15 #include <string>
16 #include <vector>
17
18 // Required for inheritance
19 #include "GaudiKernel/Algorithm.h"
20
25 class EvtCollectionStream : public Algorithm {
26 protected:
27 Gaudi::Property<std::vector<std::string>> m_itemNames{this, "ItemList", {}, "vector of item names"};
28 Gaudi::Property<std::string> m_storeName{this, "EvtDataSvc", "TagCollectionSvc",
29 "name of the service managing the data store"};
30
32 SmartIF<INTupleSvc> m_pTupleSvc;
34 std::vector<std::unique_ptr<DataStoreItem>> m_itemList;
35
36 protected:
38 void clearItems();
40 void addItem( const std::string& descriptor );
41
42 public:
44 using Algorithm::Algorithm;
46 StatusCode initialize() override;
48 StatusCode finalize() override;
50 StatusCode execute() override;
51 };
52
53 #endif // GAUDISVC_PERSISTENCYSVC_EVTCOLLECTIONSTREAM_H
Algorithm.h
EvtCollectionStream::initialize
StatusCode initialize() override
Initialize EvtCollectionStream.
Definition: EvtCollectionStream.cpp:24
SmartIF< INTupleSvc >
EvtCollectionStream::m_itemNames
Gaudi::Property< std::vector< std::string > > m_itemNames
Definition: EvtCollectionStream.h:27
Gaudi::Property
Implementation of property with value of concrete type.
Definition: Property.h:352
EvtCollectionStream::m_pTupleSvc
SmartIF< INTupleSvc > m_pTupleSvc
Reference to Tuple service for event collection (may or may not be NTuple service)
Definition: EvtCollectionStream.h:32
Gaudi::Algorithm::Algorithm
Algorithm(const std::string &name, ISvcLocator *svcloc, const std::string &version=PACKAGE_VERSION)
Constructor.
Definition: Algorithm.cpp:48
EvtCollectionStream::m_storeName
Gaudi::Property< std::string > m_storeName
Definition: EvtCollectionStream.h:28
std::string
STL class.
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
EvtCollectionStream::m_itemList
std::vector< std::unique_ptr< DataStoreItem > > m_itemList
Vector of items to be saved to this stream.
Definition: EvtCollectionStream.h:34
Algorithm
Alias for backward compatibility.
Definition: Algorithm.h:56
std::vector
STL class.
EvtCollectionStream::clearItems
void clearItems()
Clear item list.
Definition: EvtCollectionStream.cpp:61
EvtCollectionStream::addItem
void addItem(const std::string &descriptor)
Add item to output streamer list.
Definition: EvtCollectionStream.cpp:64
EvtCollectionStream::finalize
StatusCode finalize() override
Terminate EvtCollectionStream.
Definition: EvtCollectionStream.cpp:42
EvtCollectionStream::execute
StatusCode execute() override
Working entry point.
Definition: EvtCollectionStream.cpp:49
EvtCollectionStream
A small to stream Data I/O.
Definition: EvtCollectionStream.h:25