export_QtCut.cxx
Go to the documentation of this file.
1 
12 // For truncation warning
13 #ifdef _MSC_VER
14 #include "msdevstudio/MSconfig.h"
15 #endif
16 
17 #ifdef HAVE_CONFIG_H
18 #include "config.h"
19 #endif
20 
21 // include first to avoid _POSIX_C_SOURCE warning.
22 #include <boost/python.hpp>
23 
24 #include "QtCut.h"
25 
26 #include "PyDataSource.h"
27 
28 #include "datasrcs/NTuple.h"
29 
30 using std::vector;
31 using namespace boost::python;
32 
33 namespace hippodraw {
34 namespace Python {
35 
36 void
38 {
39  class_ <QtCut, bases<QtDisplay> >
40  ( "Cut",
41  "An object of this class applies a cut or filter on the data that is\n"
42  "used as input to its target displays.",
43  init < const DataSource&,
44  const std::vector < std::string > & >
45  ( "Cut ( DataSource, sequence ) -> Cut\n"
46  "Cut ( DataArray, sequence ) -> Cut\n"
47  "Cut ( DataSource, sequence, Display, value, value ) -> Cut\n"
48  "Cut ( DataArray, sequence, Display, value, value ) -> Cut\n"
49  "\n"
50  "Creates a Cut bound to DataSource. For each form, the first\n"
51  "argument is the DataSource and the second argument is sequence of\n"
52  "strings specifying the binding. The latter two forms apply the\n"
53  "Cut to a Display with low and high values for the Cut range." ) )
54 
55  .def ( init < const DataSource &,
56  const std::vector < std::string > &,
57  QtDisplay *, double, double > () )
58 
59  .def ( init < const PyDataSource&,
60  const std::vector < std::string > & > () )
61 
62  .def ( init < const PyDataSource &,
63  const std::vector < std::string > &,
64  QtDisplay *, double, double > () )
65 
66 #ifdef HAVE_NUMARRAY
67  .def ( init < PyDataSource &,
68  std::string ,
69  boost::python::numeric::array,
70  QtDisplay * > () )
71 #endif // HAVE_NUMARRAY
72 
73  .def ( "addTarget", &QtCut::addTarget,
74  "addTarget ( Display ) -> None\n"
75  "\n"
76  "Adds a Display to the list of targets." )
77 
78  .def ( "addTargets", &QtCut::addTargets,
79  "addTargets ( sequence ) -> None\n"
80  "\n"
81  "Adds Display objects in the sequence to the list targets" )
82 
83  .def ( "setCutRange", &QtCut::setCutRange,
84  "setCutRange ( value, value, string ) -> None\n"
85  "\n"
86  "Sets the range of the Cut. Arguments are low and high values,\n"
87  "and the axis." )
88 
89  .def ( "cutRange", &QtCut::cutRange,
90  "cutRange () -> tuple\n"
91  "\n"
92  "Returns a pair of values of the range of each Cut." )
93 
94  .def ( "setEnabled", &QtCut::setEnabled,
95  "setEnabled ( Boolean ) -> None\n"
96  "\n"
97  "Sets the cut to be enabled or not" )
98 
99  .def ( "toggleInverted", &QtCut::toggleInverted,
100  "toggleInverted () -> None\n"
101  "\n"
102  "Toggles the inversion status" )
103 
104  .def ( "createNTuple", &QtCut::createNTuple,
105  return_value_policy < manage_new_object > (),
106  "createNTuple ( sequence, sequence, DataSource ) -> NTuple\n"
107  "\n"
108  "Create a new NTuple using cut list and column list." )
109 
110  .staticmethod("createNTuple")
111 
112  .def ( "createTnt", &QtCut::createTnt,
113  "createTnt ( sequence, sequence, DataSource, string, string )"
114  "-> None\n"
115  "\n"
116  "Create a new TNT file using cut list and column list." )
117 
118  .staticmethod("createTnt")
119 
120  .def ( "createFits", &QtCut::createFits,
121  "createFits ( sequence, sequence, DataSource, string, string )"
122  "->None\n"
123  "\n"
124  "Create a new FITS file using cut list and column list.\n"
125  "This method is deprecated, use the FitsController instead.")
126 
127  .staticmethod("createFits")
128 
129  ;
130 
131 }
132 
133 } // namespace Python
134 } // namespace hippodraw

Generated for HippoDraw Class Library by doxygen