11#define ALLOW_ALL_TYPES
44 rtree =
new TTree( desc.c_str(), nt->title().c_str() );
46 for (
const auto& i : nt->items() ) {
47 std::string tag = i->name() +
rootVarType( i->type() );
49 log <<
MSG::INFO <<
"ID " << desc <<
": added branch: " << i->name() <<
" / " << tag <<
endmsg;
50 rtree->Branch( i->name().c_str(),
const_cast<void*
>( i->buffer() ), tag.c_str() );
52 log <<
MSG::INFO <<
"Booked TTree with ID:" << desc <<
" \"" << nt->title() <<
"\"" <<
endmsg;
68 log <<
MSG::ERROR <<
"Attempt to write invalid N-tuple.";
69 if ( nt ) log << nt->
title();
#define DECLARE_CONVERTER(x)
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
SmartIF< IMessageSvc > & msgSvc() const
Retrieve pointer to message service.
NTuple interface class definition.
virtual void reset()=0
Reset all entries to their default values.
virtual const std::string & title() const =0
Object title.
Definition of the MsgStream class used to transmit messages.
virtual std::string rootVarType(int)
Return ROOT type info:
Row wise NTuple converter class definition.
StatusCode book(const std::string &desc, INTuple *pObject, TTree *&tree) override
Book the N tuple.
StatusCode readData(TTree *rtree, INTuple *pObject, long ievt) override
Read N tuple data.
RRWNTupleCnv(ISvcLocator *svc)
Standard constructor.
StatusCode writeData(TTree *rtree, INTuple *pObject) override
Write N tuple data.
StatusCode load(TTree *tree, INTuple *&refpObject) override
Create the transient representation of an object.
This class is used for returning status codes from appropriate routines.
constexpr static const auto SUCCESS
constexpr static const auto FAILURE