Dear PyROOT-experts,
I am currently working with an algorithm based up on the ROOT framework. It’s implemented in C++ and involves different classes. I want to use this algorithm through PyROOT, but running into following problem:
There is the class TGNGUnit, which holds a member fPrototype beeing a pointer to TGNGDataElement.
TGNGDataElement is an abstract class. TGNGVectorData inherits from (and implements) TGNGVectorData and has the member fVector of type TVectorD. I need to acces to fVector, but what happen is the following…
[code]In [11]: unit
Out[11]: <ROOT.TGNGUnit object (“TGNGUnit”) at 0x7fa0c6e0a690>
In [12]: prototype = unit.fPrototype
In [13]: prototype
Out[13]: <ROOT.TGNGDataElement* object (“TGNGVectorData”) at 0x7fa0c6e0a890>
In [14]: prototype.fVector
AttributeError Traceback (most recent call last)
in ()
----> 1 prototype.fVector
AttributeError: ‘TGNGDataElement’ object has no attribute ‘fVector’
In [15]: # but this gives me…
In [16]: prototype.Print()
OBJ: TGNGVectorData TGNGVectorData
In [17]: # and also…
In [18]: prototype.Dump()
==> Dumping object at: 0x00007fa0c6e0a890, name=TGNGVectorData, class=TGNGVectorData
fVector ->7fa0c6e0a8b0 || vector data
fVector.fNrows 128 number of rows
fVector.fRowLwb 0 lower bound of the row index
fVector.*fElements 53.7456 [fNrows] elements themselves
fVector.fDataStack[5] 0 ! data container
fVector.fIsOwner true !default kTRUE, when Use array kFALSE
fVector.fUniqueID 0 object unique identifier
fVector.fBits 0x03000000 bit field status word
*fPayload ->0 || some space to put a user defined payload (owned)
fUniqueID 0 object unique identifier
fBits 0x03000000 bit field status word
fFillColor 19 fill area color
fFillStyle 1001 fill area style[/code]
How could I acces fVector?
My machine is a MacBook Pro OS X 10.10.2; ROOT: 6.03/2; Python 2.7 .
I am thankful for any suggestions!
Kind Regards,
Marc