21 #pragma warning( disable : 1572 ) 75 TTree* rtree = (TTree*)rAddr->
tObj();
78 unsigned long* info = (
unsigned long*)pAddress->
ipar();
80 status =
readData( rtree, dynamic_cast<INTuple*>( pObject ), info[1]++ );
110 TTree* tobj = (TTree*)rAddr->
tObj();
111 status =
load( tobj, nt );
136 StatusCode status = dataMgr->objectParent( pReg, pParentReg );
140 TDirectory* pParentDir = (TDirectory*)pParAddr->
ipar()[0];
142 TTree* pTree =
nullptr;
144 gDirectory = pParentDir;
145 status =
book( dsc, dynamic_cast<INTuple*>( pObject ), pTree );
153 return writeData( pTree, dynamic_cast<INTuple*>( pObject ) );
159 TDirectory* pDir = (TDirectory*)pAddr->
ipar()[0];
166 TTree* pTree = (TTree*)rAddr->
tObj();
168 return writeData( pTree, dynamic_cast<INTuple*>( pObject ) );
186 TDirectory* pDir = (TDirectory*)pAddr->
ipar()[0];
192 TTree* pTree = (TTree*)rAddr->
tObj();
193 if ( pDir && pTree ) {
194 gDirectory->cd( pDir->GetPath() );
195 pTree->Write(
"", TObject::kOverwrite );
249 if ( ( sp = full.
find(
"/" ) ) != -1 ) {
250 blk = full.
substr( 0, sp );
251 var = full.
substr( sp + 1 );
263 #define INSTANTIATE( TYP ) \ 264 template INTupleItem* createNTupleItem<TYP>( std::string itemName, std::string blockName, std::string index_name, \ 265 int indexRange, int arraySize, TYP minimum, TYP maximum, \ 273 int arraySize, TYP min, TYP max,
INTuple* ntup )
277 if ( blockName !=
"" ) {
278 varName = blockName +
"/" + itemName;
286 if ( min == 0 && max == 0 ) {
291 if ( indexName ==
"" ) {
293 if ( arraySize == 1 ) {
304 if ( arraySize == 1 ) {
constexpr static const auto FAILURE
Definition of the MsgStream class used to transmit messages.
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
void setDirectory(const std::string &loc)
RNTupleCnv(ISvcLocator *svc, const CLID &clid)
Standard constructor.
virtual StatusCode book(const std::string &desc, INTuple *pObj, TTree *&tree)=0
Book a new N tuple.
StatusCode updateRep(IOpaqueAddress *pAddr, DataObject *pObj) override
Update the converted representation of a transient object.
bool parseName(const std::string &full, std::string &blk, std::string &var)
StatusCode initialize() override
Initialize the converter.
virtual IRegistry * registry() const =0
Update branch name.
static TYP min()
Minimal number of data.
SmartIF< IMessageSvc > & msgSvc() const
Retrieve pointer to message service.
StatusCode initialize() override
Initialize the converter.
virtual const name_type & name() const =0
Name of the directory (or key)
virtual const std::string * par() const =0
Retrieve String parameters.
StatusCode finalize() override
Finalize the converter.
IRegistry * registry() const
Get pointer to Registry.
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.
NTuple interface class definition.
StatusCode finalize() override
Initialize the converter.
StatusCode service(const Gaudi::Utils::TypeNameString &name, T *&svc, bool createIf=true)
Templated method to access a service by name.
SmartIF< IFace > as() const
return a new SmartIF instance to another interface
NTuple interface class definition.
virtual const unsigned long * ipar() const =0
Access to generic link parameters.
virtual const id_type & identifier() const =0
Full identifier (or key)
StatusCode updateObj(IOpaqueAddress *pAddr, DataObject *refpObj) override
Update the transient object from the other representation.
This class is used for returning status codes from appropriate routines.
virtual TObject * tObj() const
Retrieve TObject* ptr.
static TYP max()
Maximal number of data.
The IRegistry represents the entry door to the environment any data object residing in a transient da...
unsigned int CLID
Class ID definition.
constexpr static const auto SUCCESS
SmartIF< ISvcLocator > & serviceLocator() const
Retrieve pointer to service locator.
virtual StatusCode load(TTree *tree, INTuple *&refpObj)=0
Create the transient representation of an object.
SmartIF< IDataProviderSvc > & dataProvider() const override
Get Data provider service.
virtual StatusCode writeData(TTree *rtree, INTuple *pObj)=0
Write N tuple data.
virtual StatusCode readObject(IOpaqueAddress *pAddr, DataObject *&refpObj)
Create the transient representation of an object.
INTupleItem * createNTupleItem(std::string itemName, std::string blockName, std::string indexName, int indexRange, int arraySize, TYP min, TYP max, INTuple *ntup)
Add an item of a given type to the N tuple.
void reset(TYPE *ptr=nullptr)
Set the internal pointer to the passed one disposing of the old one.
static _Item * create(INTuple *tup, const std::string &name, const std::type_info &info, TYP min, TYP max, TYP def)
Create instance.
Opaque address interface definition.
SmartIF< INTupleSvc > m_ntupleSvc
Reference to N tuple service.
virtual IOpaqueAddress * address() const =0
Retrieve opaque storage address.
A DataObject is the base class of any identifiable object on any data store.
StatusCode createRep(DataObject *pObj, IOpaqueAddress *&refpAddr) override
Convert the transient object to the requested representation.
virtual StatusCode readData(TTree *rtree, INTuple *pObj, long ievt)=0
Read N tuple data.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
StatusCode createObj(IOpaqueAddress *pAddr, DataObject *&refpObj) override
Create the transient representation of an object.
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.
StatusCode createAddress(DataObject *pObject, TDirectory *pDir, TObject *pTObject, IOpaqueAddress *&refpAddr)
Create address of the transient object according to the requested representation. ...
virtual std::string rootVarType(int)
Return ROOT type info: