00001
00002
00014 #ifndef _QtRootNTuple_H_
00015 #define _QtRootNTuple_H_
00016
00017 #ifdef HAVE_CONFIG_H
00018 #include "config.h"
00019 #endif
00020
00021 #include "RootNTuple.h"
00022
00023 #ifdef HAVE_NUMARRAY
00024 #include <boost/python.hpp>
00025 #endif
00026
00027 #include <string>
00028 #include <vector>
00029
00030
00031
00040 class QtRootNTuple : public RootNTuple
00041 {
00042 private:
00043
00049 QtRootNTuple ( );
00050
00051 public:
00052
00055 QtRootNTuple ( TTree * tree );
00056
00059 unsigned int columns ();
00060
00063 unsigned int rows ();
00064
00067 const std::vector < double > & getColumn ( const std::string & name ) const;
00068
00071 const std::vector < double > &
00072 getColumn ( const std::string & name,
00073 const std::vector < int> & indexes ) const;
00074
00077 const std::vector < double > & getColumn ( unsigned int index ) const;
00078
00082 int addColumn ( const std::string &, const std::vector < double > & );
00083
00085 const std::vector < std::string > & getLabels () const;
00086
00090 bool isMultiDimensional ( const std::string & column ) const;
00091
00097 const std::vector < int > & rowDataDimSize ( const std::string &
00098 column );
00099
00100
00101 #ifdef HAVE_NUMARRAY
00102
00104 boost::python::numeric::array
00105 valueAt ( unsigned int row, const std::string & variable );
00106 #endif
00107
00108 void expandIfNeeded ( const std::vector < std::string > & labels ) const;
00109
00110 std::string
00111 createBinding ( const std::string & name,
00112 const std::vector < int > & indices ) const;
00113 };
00114
00115 #endif // _QtRootNTuple_H_