NTupleSorter.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 
14 #ifndef NTUPLESORTER_H
15 #define NTUPLESORTER_H
16 
17 #include "pattern/libhippo.h"
18 
19 #include <vector>
20 
21 namespace hippodraw {
22 
23 class NTuple;
24 
33 {
34 
35 private:
36 
39  NTupleSorter & operator = ( const NTupleSorter & );
40 
43  int m_column;
44 
48 
52 
57  void rowwiseCopy ( std::vector < std::vector < double > * > & row_copy );
58 
59 public:
60 
66  NTupleSorter ( const NTupleSorter & );
67 
72  NTupleSorter ( NTuple * ntuple );
73 
77  virtual ~NTupleSorter () {}
78 
81  NTuple * getNTuple () const;
82 
89  void setSorting ( int column );
90 
92  void sort ( );
93 
95  void clear ();
96 
106  void addRow ( const std::vector < double > & row );
107 
111  virtual void eraseRow ( unsigned int index );
112 
115  unsigned int columns ( ) const;
116 
119  unsigned int rows ( ) const;
120 
123  const std::vector < double > & getRow ( unsigned int index ) const;
124 
129  bool operator () ( std::vector < double > * x,
130  std::vector < double > * y ) const;
131 
132 };
133 
134 } // namespace hippodraw
135 
136 #endif // NTUPLESORTER_H

Generated for HippoDraw Class Library by doxygen