Go to the documentation of this file.
47 m_ntupleSvc = serviceLocator()->service(
"NTupleSvc" );
77 TTree* rtree = (TTree*)rAddr->
tObj();
80 unsigned long* info = (
unsigned long*)pAddress->
ipar();
81 setDirectory( pAddress->
par()[0] );
82 status = readData( rtree,
dynamic_cast<INTuple*
>( pObject ), info[1]++ );
103 StatusCode status = readObject( pAddress, refpObject );
111 TTree* tobj = (TTree*)rAddr->
tObj();
112 status = load( tobj, nt );
137 StatusCode status = dataMgr->objectParent( pReg, pParentReg );
141 TDirectory* pParentDir = (TDirectory*)pParAddr->
ipar()[0];
143 TTree* pTree =
nullptr;
145 gDirectory = pParentDir;
146 status =
book( dsc,
dynamic_cast<INTuple*
>( pObject ), pTree );
147 if ( !status.
isSuccess() ) {
return status; }
148 status = createAddress( pObject, gDirectory, pTree, pAddr );
149 if ( !status.
isSuccess() ) {
return status; }
150 return writeData( pTree,
dynamic_cast<INTuple*
>( pObject ) );
156 TDirectory* pDir = (TDirectory*)pAddr->
ipar()[0];
163 TTree* pTree = (TTree*)rAddr->
tObj();
165 return writeData( pTree,
dynamic_cast<INTuple*
>( pObject ) );
182 TDirectory* pDir = (TDirectory*)pAddr->
ipar()[0];
188 TTree* pTree = (TTree*)rAddr->
tObj();
189 if ( pDir && pTree ) {
190 gDirectory->cd( pDir->GetPath() );
191 pTree->Write(
"", TObject::kOverwrite );
196 return createRep( pObj, pAddr );
243 if ( (
sp = full.find(
"/" ) ) != -1 ) {
244 blk = full.substr( 0,
sp );
245 var = full.substr(
sp + 1 );
257 #define INSTANTIATE( TYP ) \
258 template INTupleItem* createNTupleItem<TYP>( std::string itemName, std::string blockName, std::string index_name, \
259 int indexRange, int arraySize, TYP minimum, TYP maximum, \
260 INTuple* tuple, bool hasRange )
266 int arraySize, TYP
min, TYP
max,
INTuple* ntup,
bool hasRange ) {
269 if ( blockName !=
"" ) {
270 varName = blockName +
"/" + itemName;
283 if ( indexName ==
"" ) {
285 if ( arraySize == 1 ) {
296 if ( arraySize == 1 ) {
virtual TObject * tObj() const
Retrieve TObject* ptr.
virtual const std::string * par() const =0
Retrieve String parameters.
StatusCode createRep(DataObject *pObj, IOpaqueAddress *&refpAddr) override
Convert the transient object to the requested representation.
def book(*args, **kwargs)
StatusCode createObj(IOpaqueAddress *pAddr, DataObject *&refpObj) override
Create the transient representation of an object.
EventIDBase max(const EventIDBase &lhs, const EventIDBase &rhs)
virtual const name_type & name() const =0
Name of the directory (or key)
static _Item * create(INTuple *tup, const std::string &name, const std::type_info &info, TYP min, TYP max, TYP def)
Create instance.
StatusCode updateObj(IOpaqueAddress *pAddr, DataObject *refpObj) override
Update the transient object from the other representation.
StatusCode finalize() override
Finalize the converter.
bool parseName(const std::string &full, std::string &blk, std::string &var)
unsigned int CLID
Class ID definition.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
static _Matrix * create(INTuple *tup, const std::string &name, const std::type_info &info, const std::string &index, long ncol, long nrow, TYP min, TYP max, TYP def)
Create instance.
EventIDBase min(const EventIDBase &lhs, const EventIDBase &rhs)
virtual IRegistry * registry() const =0
Update branch name.
static TYP max()
Maximal number of data.
StatusCode initialize() override
Initialize the converter.
virtual IOpaqueAddress * address() const =0
Retrieve opaque storage address.
constexpr static const auto SUCCESS
virtual const id_type & identifier() const =0
Full identifier (or key)
static _Array * create(INTuple *tup, const std::string &name, const std::type_info &info, const std::string &index, long len, TYP min, TYP max, TYP def)
Create instance.
INTupleItem * createNTupleItem(std::string itemName, std::string blockName, std::string indexName, int indexRange, int arraySize, TYP min, TYP max, INTuple *ntup, bool hasRange)
Add an item of a given type to the N tuple.
StatusCode updateRep(IOpaqueAddress *pAddr, DataObject *pObj) override
Update the converted representation of a transient object.
StatusCode initialize() override
Initialize the converter.
constexpr static const auto FAILURE
virtual std::string rootVarType(int)
Return ROOT type info:
RNTupleCnv(ISvcLocator *svc, const CLID &clid)
Standard constructor.
IRegistry * registry() const
Get pointer to Registry.
static TYP min()
Minimal number of data.
StatusCode finalize() override
Initialize the converter.
virtual const unsigned long * ipar() const =0
Access to generic link parameters.