13 #include "w32pragma.h"
24 using namespace hippodraw;
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 );
75 m_releventIndex ( -1 ),
76 m_branch_set ( false )
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 ];
~RootBranch()
The destructor.
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...
Type
The type of data on the branch.
UInt_t m_uint_data
The address of the following variable is given to ROOT TTree as the branch address for this branch if...
bool isUseable() const
Returns true if the branch is usable.
TBranch * getTBranch()
Returns the TBranch which was used to initialize this branch.
UShort_t m_ushort_data
The address of the following variable is given to ROOT TTree as the branch address for this branch if...
hippodraw::Range class interface
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...
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...
int m_number_leaves
The number of TLeaf objects on this TBranch.
int * intArrayAt(unsigned int row)
Returns pointer to a int array type in given row.
unsigned int * uintArrayAt(unsigned int row)
Returns pointer to a unsigned int array type in given row.
Double_t m_double_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.
RootBranch()
The default constructor.
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...
PyArray_TYPES type(numeric::array arr)
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.
double * doubleArrayAt(unsigned int row)
Returns pointer to a double array in given row.
const std::vector< int > & getShape()
Vector of the number of entries in the multidimensional data.
unsigned int size() const
Returns the size of the slice for the next to last dimension.
Long64_t m_long64_data
The address of the following variable is given to ROOT TTree as the branch address for this branch if...
int m_releventIndex
In case the data quantity is vector/matrix we would like just to take one element out of it...
void setBranchAddress() const
Sets the address where the ROOT TBranch will put its data.
bool empty() const
Returns true, if RootBranch is empty, i.e.
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...
ULong64_t m_ulong64_data
The address of the following variable is given to ROOT TTree as the branch address for this branch if...
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...
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...
hippodraw::RootData::Type getType() const
Returns the type of the data in this branch.
bool m_branch_set
Set true when branch address has been set.
float * floatArrayAt(unsigned int row)
Returns pointer to a float array type in given row.
unsigned int getRank() const
Gives the dimensionality of the data stored in each row of 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...
TLeaf * m_leaf
The ROOT TLeaf which described the data in this branch.
Float_t m_float_data
The address of the following variable is given to ROOT TTree as the branch address for this branch if...
void initShape(const char *title)
From the root title, which is of format "name[x][y][z]", gets the sizes of various dimension...
int numberOfElements() const
Number of elements in this branch.
Int_t m_int_data
The address of the following variable is given to ROOT TTree as the branch address for this branch if...
hippodraw::RootBranch class interface.
bool isMultiDimensional() const
Returns true if data sitting in the rows of this branch is and array.
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...
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...
TBranch * m_branch
The ROOT TBranch from which the data will be obtained.
double valueAt(unsigned int row) const
Returns the value of the leaf at index row.