13 #include "w32pragma.h" 31 : m_branch ( branch ),
32 m_vector_double_data ( 0 ),
33 m_vector_float_data ( 0 ),
34 m_vector_int_data ( 0 ),
35 m_vector_uint_data ( 0 ),
36 m_vector_ulong64_data ( 0 ),
37 m_releventIndex ( -1 ),
38 m_branch_set ( false ),
41 TObjArray * leaves = branch -> GetListOfLeaves ();
46 TObject *
object = leaves -> At ( 0 );
47 m_leaf = dynamic_cast < TLeaf * > ( object );
140 boost::char_separator< char > sep(
"][" );
143 typedef boost::tokenizer< boost::char_separator< char > > tokenizer;
144 tokenizer tok( s, sep );
147 for( tokenizer::iterator tok_iter = tok.begin();
148 tok_iter != tok.end();
150 if( tok_iter != tok.begin() ) {
151 unsigned int value = boost::lexical_cast<
unsigned int >( *tok_iter );
249 const vector < int > &
265 assert(
getRank () == index.size() );
269 for (
unsigned int d = 1; d <
getRank (); d++ ) {
270 m_releventIndex = m_releventIndex *
m_shape [ d ] + index[ d ];
UInt_t m_uint_data
The address of the following variable is given to ROOT TTree as the branch address for this branch if...
ULong64_t * m_vector_ulong64_data
The address of the following variable is given to ROOT TTree as the branch address for this branch if...
const std::vector< int > & getShape()
Vector of the number of entries in the multidimensional data.
~RootBranch()
The destructor.
Long64_t m_long64_data
The address of the following variable is given to ROOT TTree as the branch address for this branch if...
RootBranch()
The default constructor.
double * doubleArrayAt(unsigned int row)
Returns pointer to a double array in given row.
Int_t m_int_data
The address of the following variable is given to ROOT TTree as the branch address for this branch if...
bool empty() const
Returns true, if RootBranch is empty, i.e.
double valueAt(unsigned int row) const
Returns the value of the leaf at index row.
UShort_t * m_vector_ushort_data
The address of the following variable is given to ROOT TTree as the branch address for this branch if...
unsigned int getRank() const
Gives the dimensionality of the data stored in each row of this branch.
hippodraw::RootBranch class interface.
void setBranchAddress() const
Sets the address where the ROOT TBranch will put its data.
Float_t * m_vector_float_data
The address of the following variable is given to ROOT TTree as the branch address for this branch if...
Double_t * m_vector_double_data
The address of the following variable is given to ROOT TTree as the branch address for this branch if...
int m_number_leaves
The number of TLeaf objects on this TBranch.
bool isMultiDimensional() const
Returns true if data sitting in the rows of this branch is and array.
TLeaf * m_leaf
The ROOT TLeaf which described the data in this branch.
Short_t m_short_data
The address of the following variable is given to ROOT TTree as the branch address for this branch if...
UShort_t m_ushort_data
The address of the following variable is given to ROOT TTree as the branch address for this branch if...
Double_t m_double_data
The address of the following variable is given to ROOT TTree as the branch address for this branch if...
UInt_t * m_vector_uint_data
The address of the following variable is given to ROOT TTree as the branch address for this branch if...
Short_t * m_vector_short_data
The address of the following variable is given to ROOT TTree as the branch address for this branch if...
float * floatArrayAt(unsigned int row)
Returns pointer to a float array type in given row.
std::vector< int > m_shape
In case the data quantity we are dealing with is a vector/matrix store its dimensions of each axis in...
int * intArrayAt(unsigned int row)
Returns pointer to a int array type in given row.
int m_releventIndex
In case the data quantity is vector/matrix we would like just to take one element out of it...
Int_t * m_vector_int_data
The address of the following variable is given to ROOT TTree as the branch address for this branch if...
PyArray_TYPES type(numeric::array arr)
void setReleventIndex(const std::vector< unsigned int > &index)
In case we are dealing with multidimensional data in rows of this branch we would like to deal with o...
TBranch * m_branch
The ROOT TBranch from which the data will be obtained.
TBranch * getTBranch()
Returns the TBranch which was used to initialize this branch.
int numberOfElements() const
Number of elements in this branch.
Type
The type of data on the branch.
unsigned int * uintArrayAt(unsigned int row)
Returns pointer to a unsigned int array type in given row.
bool isUseable() const
Returns true if the branch is usable.
Float_t m_float_data
The address of the following variable is given to ROOT TTree as the branch address for this branch if...
hippodraw::RootData::Type m_leaf_type
The ROOT type name for this branch if single TLeaf is on this branch.
hippodraw::RootData::Type getType() const
Returns the type of the data in this branch.
void initShape(const char *title)
From the root title, which is of format "name[x][y][z]", gets the sizes of various dimension...
unsigned int size() const
Returns the size of the slice for the next to last dimension.
Long64_t * m_vector_long64_data
The address of the following variable is given to ROOT TTree as the branch address for this branch if...
bool m_useable
Set to false if the branch is not usable.
int m_number_elements
The number of elements in the Leaf array or 0 if not an array.
bool m_branch_set
Set true when branch address has been set.
hippodraw::Range class interface
ULong64_t m_ulong64_data
The address of the following variable is given to ROOT TTree as the branch address for this branch if...