QtRootNTuple.h

Go to the documentation of this file.
00001 /* -*- mode: c++ -*- */
00002 
00014 #ifndef _QtRootNTuple_H_
00015 #define _QtRootNTuple_H_
00016 
00017 #include "RootNTuple.h"
00018 
00019 namespace boost {
00020   namespace python {
00021     namespace numeric {
00022       class array;
00023     }
00024   }
00025 }
00026 
00027 namespace hippodraw {
00028 
00037 class QtRootNTuple : public RootNTuple
00038 {
00039 private:
00040 
00046   QtRootNTuple ( );
00047 
00050   static void sliceRowDimension ( std::vector < int > & shape );
00051 
00052 public:
00053 
00056   QtRootNTuple ( TTree * tree );
00057 
00060   unsigned int columns () const;
00061 
00064   unsigned int rows () const;
00065 
00068   const std::vector < double > & getColumn ( const std::string & name ) const;
00069 
00072   const std::vector < double > & 
00073   getColumn ( const std::string & name,
00074               const std::vector < int> & indexes ) const;
00075 
00078   const std::vector < double > & getColumn ( unsigned int index ) const;
00079 
00082   const std::vector < double > & getRow ( unsigned int index ) const;
00083 
00087   int addColumn ( const std::string &, const std::vector < double > & );
00088 
00090   const std::vector < std::string > & getLabels () const;
00091 
00095   bool isMultiDimensional ( const std::string & column ) const;
00096 
00101   const std::vector < int > getColumnShape ( const std::string & column );
00102 
00103 
00109   boost::python::numeric::array
00110   valueAt ( unsigned int row, const std::string & variable );
00111 
00117   boost::python::numeric::array
00118   getColumnAsArray ( const std::string & variable );
00119 
00120 
00121   void expandIfNeeded ( const std::vector < std::string > & labels ) const;
00122 
00123   std::string 
00124   createBinding ( const std::string & name, 
00125                   const std::vector < int > & indices ) const;
00126 };
00127 
00128 } // namespace hippodraw
00129 
00130 #endif // _QtRootNTuple_H_

Generated for HippoDraw Class Library by doxygen