77 TTree* rtree = (TTree*)rAddr->
tObj();
80 unsigned long* info = (
unsigned long*)pAddress->
ipar();
82 status =
readData( rtree,
dynamic_cast<INTuple*
>( pObject ), info[1]++ );
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;
144 auto dsc = pReg->
name().substr( 1 );
145 gDirectory = pParentDir;
146 status =
book( dsc,
dynamic_cast<INTuple*
>( pObject ), pTree );
147 if ( !status.
isSuccess() ) {
return status; }
149 if ( !status.
isSuccess() ) {
return status; }
156 TDirectory* pDir = (TDirectory*)pAddr->
ipar()[0];
163 TTree* pTree = (TTree*)rAddr->
tObj();
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 );
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>( const std::string& itemName, const std::string& blockName, \
259 const std::string& index_name, int indexRange, int arraySize, \
260 TYP minimum, TYP maximum, INTuple* tuple, bool hasRange )
266 const std::string& indexName,
int indexRange,
int arraySize, TYP min, TYP max,
267 INTuple* ntup,
bool hasRange ) {
270 if ( blockName !=
"" ) {
271 varName = blockName +
"/" + itemName;
284 if ( indexName ==
"" ) {
286 if ( arraySize == 1 ) {
297 if ( arraySize == 1 ) {
unsigned int CLID
Class ID definition.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
StatusCode initialize() override
Initialize the converter.
SmartIF< ISvcLocator > & serviceLocator() const
Retrieve pointer to service locator.
SmartIF< IMessageSvc > & msgSvc() const
Retrieve pointer to message service.
SmartIF< IDataProviderSvc > & dataProvider() const override
Get Data provider service.
StatusCode finalize() override
Initialize the converter.
A DataObject is the base class of any identifiable object on any data store.
IRegistry * registry() const
Get pointer to Registry.
NTuple interface class definition.
NTuple interface class definition.
Opaque address interface definition.
virtual const unsigned long * ipar() const =0
Access to generic link parameters.
virtual const std::string * par() const =0
Retrieve String parameters.
virtual IRegistry * registry() const =0
Update branch name.
The IRegistry represents the entry door to the environment any data object residing in a transient da...
virtual const name_type & name() const =0
Name of the directory (or key)
virtual const id_type & identifier() const =0
Full identifier (or key)
virtual IOpaqueAddress * address() const =0
Retrieve opaque storage address.
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition of the MsgStream class used to transmit messages.
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.
static _Item * create(INTuple *tup, const std::string &name, const std::type_info &info, TYP min, TYP max, TYP def)
Create instance.
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.
static TYP min()
Minimal number of data.
static TYP max()
Maximal number of data.
void setDirectory(const std::string &loc)
virtual StatusCode readObject(IOpaqueAddress *pAddr, DataObject *&refpObj)
Create the transient representation of an object.
RConverter(const CLID &clid, ISvcLocator *svc)
Standard constructor.
StatusCode createAddress(DataObject *pObject, TDirectory *pDir, TObject *pTObject, IOpaqueAddress *&refpAddr)
Create address of the transient object according to the requested representation.
StatusCode createObj(IOpaqueAddress *pAddr, DataObject *&refpObj) override
Create the transient representation of an object.
StatusCode updateObj(IOpaqueAddress *pAddr, DataObject *refpObj) override
Update the transient object from the other representation.
virtual StatusCode writeData(TTree *rtree, INTuple *pObj)=0
Write N tuple data.
RNTupleCnv(ISvcLocator *svc, const CLID &clid)
Standard constructor.
virtual StatusCode load(TTree *tree, INTuple *&refpObj)=0
Create the transient representation of an object.
StatusCode createRep(DataObject *pObj, IOpaqueAddress *&refpAddr) override
Convert the transient object to the requested representation.
virtual StatusCode book(const std::string &desc, INTuple *pObj, TTree *&tree)=0
Book a new N tuple.
StatusCode initialize() override
Initialize the converter.
virtual StatusCode readData(TTree *rtree, INTuple *pObj, long ievt)=0
Read N tuple data.
virtual std::string rootVarType(int)
Return ROOT type info:
StatusCode updateRep(IOpaqueAddress *pAddr, DataObject *pObj) override
Update the converted representation of a transient object.
SmartIF< INTupleSvc > m_ntupleSvc
Reference to N tuple service.
StatusCode finalize() override
Finalize the converter.
virtual TObject * tObj() const
Retrieve TObject* ptr.
This class is used for returning status codes from appropriate routines.
constexpr static const auto SUCCESS
constexpr static const auto FAILURE
bool parseName(const std::string &full, std::string &blk, std::string &var)
INTupleItem * createNTupleItem(const std::string &itemName, const std::string &blockName, const 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.