QtCut.h
Go to the documentation of this file.
1 /* -*- mode: c++ -*- */
2 
14 #ifndef _QtCut_H_
15 #define _QtCut_H_
16 
17 #include "QtDisplay.h"
18 
19 namespace boost {
20  namespace python {
21  namespace numeric {
22  class array;
23  }
24  }
25 }
26 
27 namespace hippodraw {
28 
29  class Cut1DPlotter;
30  class Cut2DPlotter;
31  class TupleCut;
32 
42 class QtCut : public QtDisplay
43 {
44 
45 public:
46 
48  QtCut( const DataSource & nt,
49  const std::vector < std::string > & binding );
50 
52  QtCut( const PyDataSource & nt,
53  const std::vector < std::string > & binding );
54 
59  QtCut ( const DataSource & source,
60  const std::vector < std::string > & binding,
61  QtDisplay * target, double low, double high );
62 
67  QtCut ( const PyDataSource & nt,
68  const std::vector < std::string > & binding,
69  QtDisplay * target, double low, double high );
70 
74  QtCut ( PyDataSource & source,
75  const std::string & label,
76  boost::python::numeric::array array,
77  QtDisplay * target );
78 
81  QtCut( PlotterBase * plotter );
82 
84  void addTarget ( QtDisplay * );
85 
88  void addTargets ( const std::vector < QtDisplay * > & targets );
89 
92  void setCutRange ( double low, double high,
93  const std::string & axis = "x" );
94 
98  std::vector<double> cutRange();
99 
104  void setEnabled ( bool yes );
105 
108  void toggleInverted ();
109 
110  static void
111  fillCutList ( std::vector < const TupleCut * > & tuple_cut_list,
112  const std::vector < QtCut * > & cut_list );
113 
118  static NTuple *
119  createNTuple ( const std::vector < std::string > & column_list,
120  const std::vector < QtCut * > & cut_list,
121  DataSource * ds );
122 
126  static void
127  createTnt ( const std::vector < std::string > & column_list,
128  const std::vector < QtCut * > & cut_list,
129  DataSource * ds,
130  const std::string & filename,
131  const std::string & dsname );
132 
136  static void
137  createFits ( const std::vector < std::string > & column_list,
138  const std::vector < QtCut * > & cut_list,
139  DataSource * ds,
140  const std::string & filename,
141  const std::string & dsname );
142 
143 private:
144 
147  void createCut ( const DataSource & ds,
148  const std::vector < std::string > & binding );
149 
150 };
151 
152 } // namespace hippodraw
153 
154 #endif // _QtCut_H_
PyNTuple * createNTuple() const
Creates and returns an PyNTuple representing the display.
Definition: QtDisplay.cxx:1147
Qt Displays wraps a derived class of Cut1DPlotter.
Definition: QtCut.h:42
void setEnabled(bool yes)
Sets the enabled status.
Definition: QtCut.cxx:209
return yes
Definition: CanvasView.cxx:883
std::vector< double > cutRange()
Return the range of the cut.
Definition: QtCut.cxx:188
QtCut(const DataSource &nt, const std::vector< std::string > &binding)
Create a cut.
Definition: QtCut.cxx:104
The base class for the PlotterBase hierarchy.
Definition: PlotterBase.h:55
static void createFits(const std::vector< std::string > &column_list, const std::vector< QtCut * > &cut_list, DataSource *ds, const std::string &filename, const std::string &dsname)
Static method.
Definition: QtCut.cxx:288
hippodraw::QtDisplay class interface.
static void fillCutList(std::vector< const TupleCut * > &tuple_cut_list, const std::vector< QtCut * > &cut_list)
Definition: QtCut.cxx:324
void createCut(const DataSource &ds, const std::vector< std::string > &binding)
Creates an uninitialized cut.
Definition: QtCut.cxx:42
This class is the public interface to a DataSource object that the user sees as the DataArray object ...
Definition: PyDataSource.h:43
A DataSource class implemented with std::vector&lt;double&gt; to store the column data. ...
Definition: NTuple.h:33
Qt Displays wraps a derived class of PlotterBase.
Definition: QtDisplay.h:71
void addTarget(QtDisplay *)
Adds a display as a target of the cut.
Definition: QtCut.cxx:136
static void createTnt(const std::vector< std::string > &column_list, const std::vector< QtCut * > &cut_list, DataSource *ds, const std::string &filename, const std::string &dsname)
Static method.
Definition: QtCut.cxx:257
void setCutRange(double low, double high, const std::string &axis="x")
Sets the range of the cut on the chosen axis.
Definition: QtCut.cxx:164
void toggleInverted()
Toggles the inversion status.
Definition: QtCut.cxx:219
void addTargets(const std::vector< QtDisplay * > &targets)
Adds the displays as targets of the cut.
Definition: QtCut.cxx:147
Base class for DataSource.
Definition: DataSource.h:55

Generated for HippoDraw Class Library by doxygen