Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

RootBranch.h

Go to the documentation of this file.
00001 /* -*- c++ -*- */
00002 
00014 #ifndef RootBranch_H
00015 #define RootBranch_H
00016 
00017 #include "RootDataType.h"
00018 
00019 #include "pattern/libhippo.h"
00020 
00021 #include "TLeaf.h"
00022 #include "TObjArray.h"
00023 
00024 #include <iostream>
00025 #include <string>
00026 #include <vector>
00027 #include <boost/tokenizer.hpp>
00028 #include <boost/lexical_cast.hpp>
00029 
00030 class TBranch;
00031 
00037 class MDL_HIPPOPLOT_API RootBranch
00038 {
00039 
00040 private:
00041   
00044   mutable TBranch * m_branch;
00045 
00048   TLeaf * m_leaf;
00049 
00053   hippodraw::RootData::Type m_leaf_type;
00054   
00057   int  m_number_leaves;
00058 
00060   int m_number_elements;
00061   
00066   mutable Double_t m_double_data;
00067   
00072   mutable Float_t m_float_data;
00073   
00078   mutable Int_t m_int_data;
00079   
00084   mutable UInt_t m_uint_data;
00085   
00091   mutable Double_t * m_vector_double_data;
00092 
00098   mutable Float_t * m_vector_float_data;
00099 
00105   mutable Int_t * m_vector_int_data;
00106 
00112   mutable UInt_t * m_vector_uint_data;
00113 
00117   std::vector < int > m_dims;
00118 
00123   int m_releventIndex;
00124   
00127   mutable bool m_branch_set;
00128 
00129  public:
00130 
00133   RootBranch ( TBranch * );
00134   
00137   RootBranch ();
00138 
00141   virtual ~RootBranch();
00142 
00143 
00145   bool isMultiDimensional() const;
00146 
00150   int numberOfElements() const;
00151   
00154   virtual unsigned int size () const;
00155 
00158   virtual bool empty () const;
00159 
00162   double valueAt ( unsigned int row ) const;
00163 
00166   hippodraw::RootData::Type getType () const;
00167 
00170   double * doubleArrayAt ( unsigned int row );
00171 
00174   float * floatArrayAt ( unsigned int row );
00175 
00178   int * intArrayAt ( unsigned int row );
00179 
00180   virtual bool isFilled ( ) const;
00181   
00188   virtual unsigned int rowDataDimension() const;
00189   
00193   virtual void setReleventIndex( const std::vector< unsigned int >& index );
00194 
00198   const std::vector < int > & rowDataDimSize();
00199 
00201   TBranch * getTBranch();
00202   
00203 private:
00204 
00207   void setBranchAddress () const;
00208 
00211   int getDimSize( const char* title );
00212 
00213 };
00214 
00215 #endif // RootBranch_H

Generated for HippoDraw-1.14.8.5 by doxygen 1.4.3