10 #define GAUDISVC_PERSISTENCYSVC_EVTCOLLECTIONSTREAM_CPP
13 #include "GaudiKernel/MsgStream.h"
14 #include "GaudiKernel/INTupleSvc.h"
15 #include "GaudiKernel/IDataProviderSvc.h"
17 #include "GaudiKernel/DataStoreItem.h"
27 m_storeName =
"TagCollectionSvc";
28 declareProperty(
"ItemList", m_itemNames);
29 declareProperty(
"EvtDataSvc", m_storeName);
78 auto sep = descriptor.rfind(
"#");
80 std::string obj_path = descriptor.substr(0,sep);
81 if ( sep != std::string::npos ) {
82 std::string slevel = descriptor.substr(sep+1) ;
83 if ( slevel ==
"*" ) {
87 level = std::stoi(slevel);
92 log <<
MSG::INFO <<
"Adding OutputStream item " <<
item->path()
93 <<
" with " <<
item->depth()
Definition of the MsgStream class used to transmit messages.
StatusCode initialize() override
Initialize EvtCollectionStream.
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
SmartIF< ISvcLocator > & serviceLocator() const
The standard service locator.
SmartIF< INTupleSvc > m_pTupleSvc
Reference to Tuple service for event collection (may or may not be NTuple service) ...
StatusCode setProperties()
Set the algorithm's properties.
bool isSuccess() const
Test for a status code of SUCCESS.
Description of the DataStoreItem class.
const std::string & name() const override
The identifying name of the algorithm object.
std::vector< std::string > m_itemNames
Vector of item names.
StatusCode service(const Gaudi::Utils::TypeNameString &name, T *&svc, bool createIf=true)
Templated method to access a service by name.
This class is used for returning status codes from appropriate routines.
virtual StatusCode writeRecord(NTuple::Tuple *tuple)=0
Write single record to N tuple.
#define DECLARE_COMPONENT(type)
std::vector< std::unique_ptr< DataStoreItem > > m_itemList
Vector of items to be saved to this stream.
Base class from which all concrete algorithm classes should be derived.
std::string m_storeName
Name of the service managing the data store.
void clearItems()
Clear item list.
void addItem(const std::string &descriptor)
Add item to output streamer list.
StatusCode finalize() override
Terminate EvtCollectionStream.
StatusCode execute() override
Working entry point.
A small to stream Data I/O.
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.