20 #define GAUDISVC_PERSISTENCYSVC_EVTCOLLECTIONSTREAM_CPP 36 if (
auto sc = setProperties(); !sc )
return sc;
39 m_pTupleSvc = serviceLocator()->
service( m_storeName );
41 fatal() <<
"Unable to locate IDataManagerSvc interface" <<
endmsg;
47 for (
const auto& i : m_itemNames ) addItem( i );
48 info() <<
"Data source: " << m_storeName.value() <<
endmsg;
76 auto sep = descriptor.
rfind(
"#" );
79 if ( sep != std::string::npos ) {
81 if ( slevel ==
"*" ) {
89 info() <<
"Adding OutputStream item " << item->path() <<
" with " << item->depth() <<
" level(s)." <<
endmsg;
SmartIF< INTupleSvc > m_pTupleSvc
Reference to Tuple service for event collection (may or may not be NTuple service)
constexpr static const auto SUCCESS
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
Description of the DataStoreItem class.
#define DECLARE_COMPONENT(type)
This class is used for returning status codes from appropriate routines.
StatusCode service(std::string_view name, T *&psvc, bool createIf=true) const
Access a service by name, creating it if it doesn't already exist.
virtual StatusCode writeRecord(NTuple::Tuple *tuple)=0
Write single record to N tuple.
std::vector< std::unique_ptr< DataStoreItem > > m_itemList
Vector of items to be saved to this stream.
void clearItems()
Clear item list.
void addItem(const std::string &descriptor)
Add item to output streamer list.
StatusCode finalize() override
Terminate EvtCollectionStream.
constexpr static const auto FAILURE
StatusCode execute() override
Working entry point.
A small to stream Data I/O.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
T emplace_back(T... args)