| The Gaudi Framework v32r1 (f65d50dc)

Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
RootHistCnv::RNTupleCnv Class Referenceabstract

NTuple converter class definition. More...

`#include <src/RNTupleCnv.h>`

Inheritance diagram for RootHistCnv::RNTupleCnv:
[legend]
Collaboration diagram for RootHistCnv::RNTupleCnv:
[legend]

## Public Member Functions
StatusCode | initialize () override
| Initialize the converter. More...
StatusCode | finalize () override
| Finalize the converter. More...
StatusCode | createObj (IOpaqueAddress *pAddr, DataObject *&refpObj) override
| Create the transient representation of an object. More...
StatusCode | updateObj (IOpaqueAddress *pAddr, DataObject *refpObj) override
| Update the transient object from the other representation. More...
StatusCode | createRep (DataObject *pObj, IOpaqueAddress *&refpAddr) override
| Convert the transient object to the requested representation. More...
StatusCode | updateRep (IOpaqueAddress *pAddr, DataObject *pObj) override
| Update the converted representation of a transient object. More...
Public Member Functions inherited from RootHistCnv::RConverter
StatusCode | createRep (DataObject *pObj, IOpaqueAddress *&refpAddr) override
| Convert the transient object to the requested representation. More...
long | repSvcType () const override
StatusCode | error (const std::string &msg)
StatusCode | regTFile (const std::string, const TFile *)
StatusCode | findTFile (const std::string, TFile *&)
std::string | diskDirectory (const std::string &loc)
std::string | directory (const std::string &loc)
void | setDirectory (const std::string &loc)
void | setDiskDirectory (const std::string &loc)
StatusCode | createDirectory (const std::string &loc)
StatusCode | createDiskDirectory (const std::string &loc)
std::string | getDirectory ()
std::string | convertId (const std::string &) const
Public Member Functions inherited from Converter
StatusCode | initialize () override
| Initialize the converter. More...
StatusCode | finalize () override
| Initialize the converter. More...
StatusCode | setDataProvider (IDataProviderSvc *svc) override
| Set Data provider service. More...
SmartIF< IDataProviderSvc > & | dataProvider () const override
| Get Data provider service. More...
StatusCode | setConversionSvc (IConversionSvc *svc) override
| Set conversion service the converter is connected to. More...
SmartIF< IConversionSvc > & | conversionSvc () const override
| Get conversion service the converter is connected to. More...
StatusCode | setAddressCreator (IAddressCreator *creator) override
| Set address creator facility. More...
SmartIF< IAddressCreator > & | addressCreator () const override
| Retrieve address creator facility. More...
const CLID & | objType () const override
| Retrieve the class type of objects the converter produces. More...
virtual long | i_repSvcType () const
| Retrieve the class type of the data store the converter uses. More...
StatusCode | createObj (IOpaqueAddress *pAddress, DataObject *&refpObject) override
| Create the transient representation of an object. More...
StatusCode | fillObjRefs (IOpaqueAddress *pAddress, DataObject *pObject) override
| Resolve the references of the created transient object. More...
StatusCode | updateObj (IOpaqueAddress *pAddress, DataObject *refpObject) override
| Update the transient object from the other representation. More...
StatusCode | updateObjRefs (IOpaqueAddress *pAddress, DataObject *pObject) override
| Update the references of an updated transient object. More...
StatusCode | createRep (DataObject *pObject, IOpaqueAddress *&refpAddress) override
| Convert the transient object to the requested representation. More...
StatusCode | fillRepRefs (IOpaqueAddress *pAddress, DataObject *pObject) override
| Resolve the references of the converted object. More...
StatusCode | updateRep (IOpaqueAddress *pAddress, DataObject *pObject) override
| Update the converted representation of a transient object. More...
StatusCode | updateRepRefs (IOpaqueAddress *pAddress, DataObject *pObject) override
| Update the references of an already converted object. More...
| Converter (long storage_type, const CLID &class_type, ISvcLocator *svc=0)
| Standard Constructor. More...
template<class T >
StatusCode | service (const std::string &name, T *&psvc, bool createIf=false) const
| Access a service by name, creating it if it doesn't already exist. More...
template<class T >
StatusCode | service (const std::string &type, const std::string &name, T *&psvc) const
| Access a service by name, type creating it if it doesn't already exist. More...
SmartIF< IService > | service (const std::string &name, const bool createIf=true) const
| Return a pointer to the service identified by name (or "type/name") More...
Public Member Functions inherited from implements< IConverter >
void * | i_cast (const InterfaceID &tid) const override
| Implementation of IInterface::i_cast. More...
StatusCode | queryInterface (const InterfaceID &ti, void **pp) override
| Implementation of IInterface::queryInterface. More...
std::vector< std::string > | getInterfaceNames () const override
| Implementation of IInterface::getInterfaceNames. More...
| implements ()=default
| Default constructor. More...
| implements (const implements &)
| Copy constructor (zero the reference count) More...
implements & | operator= (const implements &)
| Assignment operator (do not touch the reference count). More...
unsigned long | addRef () override
| Reference Interface instance. More...
unsigned long | release () override
| Release Interface instance. More...
unsigned long | refCount () const override
| Current reference count. More...

## Protected Member Functions
| RNTupleCnv (ISvcLocator *svc, const CLID &clid)
| Standard constructor. More...
virtual StatusCode | load (TTree *tree, INTuple *&refpObj)=0
| Create the transient representation of an object. More...
virtual StatusCode | book (const std::string &desc, INTuple *pObj, TTree *&tree)=0
| Book a new N tuple. More...
virtual StatusCode | writeData (TTree *rtree, INTuple *pObj)=0
| Write N tuple data. More...
virtual StatusCode | readData (TTree *rtree, INTuple *pObj, long ievt)=0
| Read N tuple data. More...
virtual std::string | rootVarType (int)
| Return ROOT type info: More...
Protected Member Functions inherited from RootHistCnv::RConverter
| RConverter (const CLID &clid, ISvcLocator *svc)
| Standard constructor. More...
virtual StatusCode | readObject (IOpaqueAddress *pAddr, DataObject *&refpObj)
| Create the transient representation of an object. More...
virtual TObject * | createPersistent (DataObject *pObj)
| Create the persistent representation of an object. More...
StatusCode | createAddress (DataObject *pObject, TDirectory *pDir, TObject *pTObject, IOpaqueAddress *&refpAddr)
| Create address of the transient object according to the requested representation. More...
StatusCode | createAddress (const std::string &rzdir, const CLID &clid, long id, TObject *pTobj, IOpaqueAddress *&refpAddress)
StatusCode | createAddress (const std::string &rzdir, const CLID &clid, const std::string &title, TObject *pTobj, IOpaqueAddress *&refpAddress)
TDirectory * | changeDirectory (DataObject *pObject)
| Switch to object directory (=Parent directory) More...
Protected Member Functions inherited from Converter
SmartIF< ISvcLocator > & | serviceLocator () const
| Retrieve pointer to service locator. More...
SmartIF< IMessageSvc > & | msgSvc () const
| Retrieve pointer to message service. More...
SmartIF< IDataManagerSvc > & | dataManager () const
| Get Data Manager service. More...

## Protected Attributes
SmartIF< INTupleSvc > | m_ntupleSvc
| Reference to N tuple service. More...
Protected Attributes inherited from implements< IConverter >
std::atomic_ulong | m_refCount
| Reference counter. More...

## Additional Inherited Members
Public Types inherited from Converter
using | Factory = Gaudi::PluginService::Factory< IConverter *(ISvcLocator *)>
Public Types inherited from implements< IConverter >
using | base_class = implements< Interfaces... >
| Typedef to this class. More...
using | extend_interfaces_base = extend_interfaces< Interfaces... >
| Typedef to the base of this class. More...
using | iids = typename extend_interfaces_base::ext_iids
Public Types inherited from extend_interfaces< Interfaces... >
using | ext_iids = typename Gaudi::interface_list_cat< typename Interfaces::ext_iids... >::type
| take union of the ext_iids of all Interfaces... More...
Static Public Member Functions inherited from RootHistCnv::RConverter
static long | storageType ()
| Inquire storage type. More...

## Detailed Description

NTuple converter class definition.

Package : RootHistCnv Author : Charles Leggett

Definition at line 23 of file RNTupleCnv.h.

## Constructor & Destructor Documentation

## ◆ RNTupleCnv()

RootHistCnv::RNTupleCnv::RNTupleCnv | ( | ISvcLocator * | svc,
|  | const CLID & | clid
| ) |  |
| protected

Standard constructor.

Definition at line 34 of file RNTupleCnv.cpp.

34 : RConverter( clid, svc ) {}
RootHistCnv::RConverter::RConverter
RConverter(const CLID &clid, ISvcLocator *svc)
Standard constructor.
Definition: RConverter.h:55

## Member Function Documentation

## ◆ book()

virtual StatusCode RootHistCnv::RNTupleCnv::book | ( | const std::string & | desc,
|  | INTuple * | pObj,
|  | TTree *& | tree
| ) |  |
| protected pure virtual

Book a new N tuple.

Implemented in RootHistCnv::RCWNTupleCnv, and RootHistCnv::RRWNTupleCnv.

## ◆ createObj()

StatusCode RootHistCnv::RNTupleCnv::createObj | ( | IOpaqueAddress * | pAddr,
|  | DataObject *& | refpObj
| ) |  |
| override

Create the transient representation of an object.

Definition at line 85 of file RNTupleCnv.cpp.

87 {
88 MsgStream log( msgSvc(), "RNTupleCnv" );
89
90 IRegistry* pReg = pAddress->registry();
91
92 // log << MSG::WARNING << "adr: " << pAddress->par()[0] << " <> "
93 // << pAddress->par()[1] << " <> " << pAddress->ipar()[0] << " <> "
94 // << pAddress->ipar()[1] << " <> " << hex << rAddr->tObj()
95 // << dec << " <> " << pReg->identifier() << endmsg;
96
97 std::string ident = pReg->identifier();
98
99 StatusCode status = readObject( pAddress, refpObject ); // Doesn't do anything
100 if ( status.isSuccess() ) {
101 RootObjAddress* rAddr = dynamic_cast<RootObjAddress*>( pAddress );
102 if ( !rAddr ) {
103 log << MSG::ERROR << "Could not cast to RootObjAddress" << endmsg;
104 return StatusCode::FAILURE;
105 }
106 INTuple* nt = nullptr;
107 TTree* tobj = (TTree*)rAddr->tObj();
108 status = load( tobj, nt );
109 if ( status.isSuccess() ) {
110 refpObject = dynamic_cast<DataObject*>( nt );
111 } else {
112 log << MSG::ERROR << "Problems loading ntuple id: " << pReg->identifier() << endmsg;
113 }
114 }
115 return status;
116 }
MsgStream
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
std::string
STL class.
INTuple
NTuple interface class definition.
Definition: INTuple.h:81
Converter::msgSvc
SmartIF< IMessageSvc > & msgSvc() const
Retrieve pointer to message service.
Definition: Converter.cpp:95
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
IRegistry
The IRegistry represents the entry door to the environment any data object residing in a transient da...
Definition: IRegistry.h:22
StatusCode::isSuccess
bool isSuccess() const
Definition: StatusCode.h:267
RootHistCnv::RNTupleCnv::load
virtual StatusCode load(TTree *tree, INTuple *&refpObj)=0
Create the transient representation of an object.
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:86
RootHistCnv::RConverter::readObject
virtual StatusCode readObject(IOpaqueAddress *pAddr, DataObject *&refpObj)
Create the transient representation of an object.
Definition: RConverter.cpp:250
MSG::ERROR
Definition: IMessageSvc.h:15
IRegistry::identifier
virtual const id_type & identifier() const =0
Full identifier (or key)
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192
Gaudi.Configuration.log
log
Definition: Configuration.py:13

## ◆ createRep()

StatusCode RootHistCnv::RNTupleCnv::createRep | ( | DataObject * | pObj,
|  | IOpaqueAddress *& | refpAddr
| ) |  |
| override

Convert the transient object to the requested representation.

Definition at line 120 of file RNTupleCnv.cpp.

122 {
123 GlobalDirectoryRestore restore;
124 pAddr = nullptr;
125 try {
126 IRegistry* pReg = pObject->registry();
127 if ( pReg ) {
128 pAddr = pReg->address();
129 if ( !pAddr ) {
130 auto dataMgr = dataProvider().as<IDataManagerSvc>();
131 if ( dataMgr ) {
132 IRegistry* pParentReg = nullptr;
133 StatusCode status = dataMgr->objectParent( pReg, pParentReg );
134 if ( status.isSuccess() ) {
135 IOpaqueAddress* pParAddr = pParentReg->address();
136 if ( pParAddr ) {
137 TDirectory* pParentDir = (TDirectory*)pParAddr->ipar()[0];
138 if ( pParentDir ) {
139 TTree* pTree = nullptr;
140 auto dsc = pReg->name().substr( 1 );
141 gDirectory = pParentDir;
142 status = book( dsc, dynamic_cast<INTuple*>( pObject ), pTree );
143 if ( !status.isSuccess() ) { return status; }
144 status = createAddress( pObject, gDirectory, pTree, pAddr );
145 if ( !status.isSuccess() ) { return status; }
146 return writeData( pTree, dynamic_cast<INTuple*>( pObject ) );
147 }
148 }
149 }
150 }
151 } else {
152 TDirectory* pDir = (TDirectory*)pAddr->ipar()[0];
153 RootObjAddress* rAddr = dynamic_cast<RootObjAddress*>( pAddr );
154 if ( !rAddr ) {
155 MsgStream log( msgSvc(), "RNTupleCnv" );
156 log << MSG::ERROR << "Could not cast to RootObjAddress" << endmsg;
157 return StatusCode::FAILURE;
158 }
159 TTree* pTree = (TTree*)rAddr->tObj();
160 gDirectory = pDir;
161 return writeData( pTree, dynamic_cast<INTuple*>( pObject ) );
162 }
163 }
164 } catch ( ... ) {}
165 MsgStream log( msgSvc(), "RNTupleCnv" );
166 log << MSG::ERROR << "Failed to create persistent N-tuple!" << endmsg;
167 return StatusCode::FAILURE;
168 }
MsgStream
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
RootHistCnv::RNTupleCnv::book
virtual StatusCode book(const std::string &desc, INTuple *pObj, TTree *&tree)=0
Book a new N tuple.
IDataManagerSvc
Definition: IDataManagerSvc.h:45
SmartIF::as
SmartIF< IFace > as() const
return a new SmartIF instance to another interface
Definition: SmartIF.h:107
IRegistry::name
virtual const name_type & name() const =0
Name of the directory (or key)
Converter::msgSvc
SmartIF< IMessageSvc > & msgSvc() const
Retrieve pointer to message service.
Definition: Converter.cpp:95
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
IRegistry
The IRegistry represents the entry door to the environment any data object residing in a transient da...
Definition: IRegistry.h:22
StatusCode::isSuccess
bool isSuccess() const
Definition: StatusCode.h:267
IRegistry::address
virtual IOpaqueAddress * address() const =0
Retrieve opaque storage address.
Converter::dataProvider
SmartIF< IDataProviderSvc > & dataProvider() const override
Get Data provider service.
Definition: Converter.cpp:68
GlobalDirectoryRestore
Definition: RConverter.h:16
RootHistCnv::RNTupleCnv::writeData
virtual StatusCode writeData(TTree *rtree, INTuple *pObj)=0
Write N tuple data.
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:86
MSG::ERROR
Definition: IMessageSvc.h:15
std::string::substr
T substr(T... args)
IOpaqueAddress
Opaque address interface definition.
Definition: IOpaqueAddress.h:23
IOpaqueAddress::ipar
virtual const unsigned long * ipar() const =0
Access to generic link parameters.
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192
RootHistCnv::RConverter::createAddress
StatusCode createAddress(DataObject *pObject, TDirectory *pDir, TObject *pTObject, IOpaqueAddress *&refpAddr)
Create address of the transient object according to the requested representation.
Definition: RConverter.cpp:155
Gaudi.Configuration.log
log
Definition: Configuration.py:13

## ◆ finalize()

StatusCode RootHistCnv::RNTupleCnv::finalize | ( |  | ) |
| override

Finalize the converter.

Definition at line 51 of file RNTupleCnv.cpp.

51 {
52 //-----------------------------------------------------------------------------
53 m_ntupleSvc.reset();
54 return Converter::finalize();
55 }
Converter::finalize
StatusCode finalize() override
Initialize the converter.
Definition: Converter.cpp:50
SmartIF::reset
void reset(TYPE *ptr=nullptr)
Set the internal pointer to the passed one disposing of the old one.
Definition: SmartIF.h:86
RootHistCnv::RNTupleCnv::m_ntupleSvc
SmartIF< INTupleSvc > m_ntupleSvc
Reference to N tuple service.
Definition: RNTupleCnv.h:54

## ◆ initialize()

StatusCode RootHistCnv::RNTupleCnv::initialize | ( |  | ) |
| override

Initialize the converter.

Definition at line 39 of file RNTupleCnv.cpp.

39 {
40 //-----------------------------------------------------------------------------
41 StatusCode status = Converter::initialize();
42 if ( status.isSuccess() ) {
43 m_ntupleSvc = serviceLocator()->service( "NTupleSvc" );
44 if ( !m_ntupleSvc ) status = StatusCode::FAILURE;
45 }
46 return status;
47 }
Converter::initialize
StatusCode initialize() override
Initialize the converter.
Definition: Converter.cpp:43
ISvcLocator::service
StatusCode service(const Gaudi::Utils::TypeNameString &name, T *&svc, bool createIf=true)
Templated method to access a service by name.
Definition: ISvcLocator.h:76
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
StatusCode::isSuccess
bool isSuccess() const
Definition: StatusCode.h:267
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:86
RootHistCnv::RNTupleCnv::m_ntupleSvc
SmartIF< INTupleSvc > m_ntupleSvc
Reference to N tuple service.
Definition: RNTupleCnv.h:54
Converter::serviceLocator
SmartIF< ISvcLocator > & serviceLocator() const
Retrieve pointer to service locator.
Definition: Converter.cpp:92

## ◆ load()

virtual StatusCode RootHistCnv::RNTupleCnv::load | ( | TTree * | tree,
|  | INTuple *& | refpObj
| ) |  |
| protected pure virtual

Create the transient representation of an object.

Implemented in RootHistCnv::RCWNTupleCnv, and RootHistCnv::RRWNTupleCnv.

## ◆ readData()

virtual StatusCode RootHistCnv::RNTupleCnv::readData | ( | TTree * | rtree,
|  | INTuple * | pObj,
|  | long | ievt
| ) |  |
| protected pure virtual

Read N tuple data.

Implemented in RootHistCnv::RCWNTupleCnv, and RootHistCnv::RRWNTupleCnv.

## ◆ rootVarType()

std::string RootHistCnv::RNTupleCnv::rootVarType | ( | int | type | ) |
| protected virtual

Return ROOT type info:

Definition at line 200 of file RNTupleCnv.cpp.

200 {
201 //-----------------------------------------------------------------------------
202 switch ( type ) {
203 case DataTypeInfo::BOOL:
204 return "/O"; // bool
205 case DataTypeInfo::SHORT:
206 return "/S"; // short
207 case DataTypeInfo::INT:
208 return "/I"; // int
209 case DataTypeInfo::LONG:
210 return "/I"; // long
211 case DataTypeInfo::LONGLONG:
212 return "/L"; // long long
213 case DataTypeInfo::USHORT:
214 return "/s"; // ushort
215 case DataTypeInfo::UINT:
216 return "/i"; // uint
217 case DataTypeInfo::ULONG:
218 return "/i"; // ulong
219 case DataTypeInfo::ULONGLONG:
220 return "/l"; // unsigned long long
221 case DataTypeInfo::FLOAT:
222 return "/F"; // float
223 case DataTypeInfo::DOUBLE:
224 return "/D"; // double
225 case DataTypeInfo::CHAR:
226 return "/B"; // char
227 case DataTypeInfo::UCHAR:
228 return "/b"; // char
229 default:
230 return "";
231 }
232 // cannot reach this point
233 }
DataTypeInfo::INT
Definition: DataTypeInfo.h:31
DataTypeInfo::CHAR
Definition: DataTypeInfo.h:29
DataTypeInfo::SHORT
Definition: DataTypeInfo.h:30
DataTypeInfo::UINT
Definition: DataTypeInfo.h:27
DataTypeInfo::USHORT
Definition: DataTypeInfo.h:26
gaudirun.type
type
Definition: gaudirun.py:142
DataTypeInfo::BOOL
Definition: DataTypeInfo.h:33
DataTypeInfo::UCHAR
Definition: DataTypeInfo.h:25
DataTypeInfo::ULONG
Definition: DataTypeInfo.h:28
DataTypeInfo::LONG
Definition: DataTypeInfo.h:32
DataTypeInfo::DOUBLE
Definition: DataTypeInfo.h:35
DataTypeInfo::ULONGLONG
Definition: DataTypeInfo.h:45
DataTypeInfo::LONGLONG
Definition: DataTypeInfo.h:44
DataTypeInfo::FLOAT
Definition: DataTypeInfo.h:34

## ◆ updateObj()

StatusCode RootHistCnv::RNTupleCnv::updateObj | ( | IOpaqueAddress * | pAddr,
|  | DataObject * | refpObj
| ) |  |
| override

Update the transient object from the other representation.

Definition at line 59 of file RNTupleCnv.cpp.

61 {
62 MsgStream log( msgSvc(), "RNTupleCnv" );
63
64 StatusCode status = StatusCode::FAILURE;
65
66 RootObjAddress* rAddr = dynamic_cast<RootObjAddress*>( pAddress );
67
68 if ( !rAddr ) {
69 log << MSG::ERROR << "Could not dynamic cast to RootObjAddress" << endmsg;
70 return StatusCode::FAILURE;
71 }
72
73 TTree* rtree = (TTree*)rAddr->tObj();
74
75 try {
76 unsigned long* info = (unsigned long*)pAddress->ipar();
77 setDirectory( pAddress->par()[0] );
78 status = readData( rtree, dynamic_cast<INTuple*>( pObject ), info[1]++ );
79 } catch ( ... ) {}
80 return status;
81 }
MsgStream
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
RootHistCnv::RConverter::setDirectory
void setDirectory(const std::string &loc)
Definition: RConverter.cpp:108
Converter::msgSvc
SmartIF< IMessageSvc > & msgSvc() const
Retrieve pointer to message service.
Definition: Converter.cpp:95
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:86
MSG::ERROR
Definition: IMessageSvc.h:15
RootHistCnv::RNTupleCnv::readData
virtual StatusCode readData(TTree *rtree, INTuple *pObj, long ievt)=0
Read N tuple data.
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192
Gaudi.Configuration.log
log
Definition: Configuration.py:13

## ◆ updateRep()

StatusCode RootHistCnv::RNTupleCnv::updateRep | ( | IOpaqueAddress * | pAddr,
|  | DataObject * | pObj
| ) |  |
| override

Update the converted representation of a transient object.

Definition at line 172 of file RNTupleCnv.cpp.

174 {
175 MsgStream log( msgSvc(), "RNTupleCnv" );
176 if ( pAddr ) {
177 GlobalDirectoryRestore restore;
178 TDirectory* pDir = (TDirectory*)pAddr->ipar()[0];
179 RootObjAddress* rAddr = dynamic_cast<RootObjAddress*>( pAddr );
180 if ( !rAddr ) {
181 log << MSG::ERROR << "Could not cast to RootObjAddress" << endmsg;
182 return StatusCode::FAILURE;
183 }
184 TTree* pTree = (TTree*)rAddr->tObj();
185 if ( pDir && pTree ) {
186 gDirectory->cd( pDir->GetPath() );
187 pTree->Write( "", TObject::kOverwrite );
188 return StatusCode::SUCCESS;
189 }
190 } else {
191 log << MSG::WARNING << "empty ntuple: " << pObj->registry()->identifier() << endmsg;
192 return createRep( pObj, pAddr );
193 }
194 return StatusCode::FAILURE;
195 }
MsgStream
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
DataObject::registry
IRegistry * registry() const
Get pointer to Registry.
Definition: DataObject.h:72
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
Converter::msgSvc
SmartIF< IMessageSvc > & msgSvc() const
Retrieve pointer to message service.
Definition: Converter.cpp:95
GlobalDirectoryRestore
Definition: RConverter.h:16
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:86
MSG::ERROR
Definition: IMessageSvc.h:15
MSG::WARNING
Definition: IMessageSvc.h:15
IRegistry::identifier
virtual const id_type & identifier() const =0
Full identifier (or key)
IOpaqueAddress::ipar
virtual const unsigned long * ipar() const =0
Access to generic link parameters.
RootHistCnv::RNTupleCnv::createRep
StatusCode createRep(DataObject *pObj, IOpaqueAddress *&refpAddr) override
Convert the transient object to the requested representation.
Definition: RNTupleCnv.cpp:120
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192
Gaudi.Configuration.log
log
Definition: Configuration.py:13

## ◆ writeData()

virtual StatusCode RootHistCnv::RNTupleCnv::writeData | ( | TTree * | rtree,
|  | INTuple * | pObj
| ) |  |
| protected pure virtual

Write N tuple data.

Implemented in RootHistCnv::RCWNTupleCnv, and RootHistCnv::RRWNTupleCnv.

## Member Data Documentation

## ◆ m_ntupleSvc

SmartIF<INTupleSvc> RootHistCnv::RNTupleCnv::m_ntupleSvc
| protected

Reference to N tuple service.

Definition at line 54 of file RNTupleCnv.h.

The documentation for this class was generated from the following files:

- RootHistCnv/src/RNTupleCnv.h
- RootHistCnv/src/RNTupleCnv.cpp