QtRootNTuple.h
Go to the documentation of this file.
1 /* -*- mode: c++ -*- */
2 
14 #ifndef _QtRootNTuple_H_
15 #define _QtRootNTuple_H_
16 
17 #include "RootNTuple.h"
18 
19 namespace boost {
20  namespace python {
21  namespace numeric {
22  class array;
23  }
24  }
25 }
26 
27 namespace hippodraw {
28 
37 class QtRootNTuple : public RootNTuple
38 {
39 private:
40 
46  QtRootNTuple ( );
47 
50  static void sliceRowDimension ( std::vector < int > & shape );
51 
52 public:
53 
56  QtRootNTuple ( TTree * tree );
57 
60  unsigned int columns () const;
61 
64  unsigned int rows () const;
65 
68  const std::vector < double > & getColumn ( const std::string & name ) const;
69 
72  const std::vector < double > &
73  getColumn ( const std::string & name,
74  const std::vector < int> & indexes ) const;
75 
78  const std::vector < double > & getColumn ( unsigned int index ) const;
79 
82  const std::vector < double > & getRow ( unsigned int index ) const;
83 
87  int addColumn ( const std::string &, const std::vector < double > & );
88 
90  const std::vector < std::string > & getLabels () const;
91 
95  bool isMultiDimensional ( const std::string & column ) const;
96 
101  const std::vector < int > getColumnShape ( const std::string & column );
102 
103 
109  boost::python::numeric::array
110  valueAt ( unsigned int row, const std::string & variable );
111 
117  boost::python::numeric::array
118  getColumnAsArray ( const std::string & variable );
119 
120 
121  void expandIfNeeded ( const std::vector < std::string > & labels ) const;
122 
123  std::string
124  createBinding ( const std::string & name,
125  const std::vector < int > & indices ) const;
126 };
127 
128 } // namespace hippodraw
129 
130 #endif // _QtRootNTuple_H_

Generated for HippoDraw Class Library by doxygen