21 # pragma warning( disable : 1572 ) 43 m_ntupleSvc = serviceLocator()->service(
"NTupleSvc" );
73 TTree* rtree = (TTree*)rAddr->
tObj();
76 unsigned long* info = (
unsigned long*)pAddress->
ipar();
77 setDirectory( pAddress->
par()[0] );
78 status = readData( rtree, dynamic_cast<INTuple*>( pObject ), info[1]++ );
99 StatusCode status = readObject( pAddress, refpObject );
101 RootObjAddress* rAddr = dynamic_cast<RootObjAddress*>( pAddress );
107 TTree* tobj = (TTree*)rAddr->
tObj();
108 status = load( tobj, nt );
110 refpObject = dynamic_cast<DataObject*>( nt );
133 StatusCode status = dataMgr->objectParent( pReg, pParentReg );
137 TDirectory* pParentDir = (TDirectory*)pParAddr->
ipar()[0];
139 TTree* pTree =
nullptr;
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 ) );
152 TDirectory* pDir = (TDirectory*)pAddr->
ipar()[0];
159 TTree* pTree = (TTree*)rAddr->
tObj();
161 return writeData( pTree, dynamic_cast<INTuple*>( pObject ) );
178 TDirectory* pDir = (TDirectory*)pAddr->
ipar()[0];
184 TTree* pTree = (TTree*)rAddr->
tObj();
185 if ( pDir && pTree ) {
186 gDirectory->cd( pDir->GetPath() );
187 pTree->Write(
"", TObject::kOverwrite );
192 return createRep( pObj, pAddr );
239 if ( (
sp = full.find(
"/" ) ) != -1 ) {
240 blk = full.substr( 0,
sp );
241 var = full.substr(
sp + 1 );
253 #define INSTANTIATE( TYP ) \ 254 template INTupleItem* createNTupleItem<TYP>( std::string itemName, std::string blockName, std::string index_name, \ 255 int indexRange, int arraySize, TYP minimum, TYP maximum, \ 265 if ( blockName !=
"" ) {
266 varName = blockName +
"/" + itemName;
274 if (
min == 0 &&
max == 0 ) {
279 if ( indexName ==
"" ) {
281 if ( arraySize == 1 ) {
292 if ( arraySize == 1 ) {
virtual const std::string * par() const =0
Retrieve String parameters.
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...
IRegistry * registry() const
Get pointer to Registry.
GAUDI_API AIDA::IHistogram1D * book(IHistogramSvc *svc, const std::string &path, const Gaudi::Histo1DDef &hist)
helper function to book 1D-histogram
virtual TObject * tObj() const
Retrieve TObject* ptr.
RNTupleCnv(ISvcLocator *svc, const CLID &clid)
Standard constructor.
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)
EventIDBase min(const EventIDBase &lhs, const EventIDBase &rhs)
StatusCode initialize() override
Initialize the converter.
static TYP min()
Minimal number of data.
constexpr static const auto SUCCESS
StatusCode initialize() override
Initialize the converter.
virtual const name_type & name() const =0
Name of the directory (or key)
EventIDBase max(const EventIDBase &lhs, const EventIDBase &rhs)
StatusCode finalize() override
Finalize the converter.
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.
NTuple interface class definition.
virtual IRegistry * registry() const =0
Update branch name.
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.
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.
virtual IOpaqueAddress * address() const =0
Retrieve opaque storage address.
constexpr static const auto FAILURE
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.
virtual const id_type & identifier() const =0
Full identifier (or key)
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.
A DataObject is the base class of any identifiable object on any data store.
virtual const unsigned long * ipar() const =0
Access to generic link parameters.
StatusCode createRep(DataObject *pObj, IOpaqueAddress *&refpAddr) override
Convert the transient object to the requested representation.
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.
virtual std::string rootVarType(int)
Return ROOT type info: