14 #include "msdevstudio/MSconfig.h"
22 #include <boost/python.hpp>
38 using namespace hippodraw;
43 const std::vector < std::string > & binding )
52 const std::vector< std::string > & binding,
53 QtDisplay * target,
double low,
double high )
66 const std::vector< std::string > & binding,
67 QtDisplay * target,
double low,
double high )
80 const std::string & label,
81 boost::python::numeric::array array,
88 vector < string > binding;
89 binding.push_back ( label );
96 std::runtime_error e (
"HippoDraw was not built with "
97 "numeric Python support" );
100 #endif // HAVE_NUMARRAY
105 const std::vector< std::string > & binding )
115 const std::vector< std::string > & binding )
128 assert ( cut_plotter != 0 );
142 controller -> addCut ( cp, target ->
display () );
152 unsigned int size = targets.size ();
154 for (
unsigned int i = 0; i <
size; i++ ) {
156 controller -> addCut ( cp, target ->
display () );
171 assert ( cut_plotter != 0 );
173 const Range range ( low, high );
175 cut_plotter -> setCutRangeAt ( range, type );
178 catch (
const std::out_of_range & ) {
180 string what (
"Cut range axis `" );
182 what +=
"' is invalid";
183 throw std::runtime_error ( what );
192 std::vector<double> myCutRange;
193 vector < const TupleCut * > cuts;
196 for (
unsigned int i = 0; i < cuts.size(); i++ ) {
199 myCutRange.push_back ( range.
low () );
200 myCutRange.push_back ( range.
high () );
230 const std::vector < QtCut * > & cut_list,
236 std::vector < const TupleCut * > tuple_cut_list;
237 std::vector < QtCut * >::const_iterator it = cut_list.begin();
240 for ( ; it !=cut_list.end(); ++it )
257 createTnt (
const std::vector < std::string > & column_list,
258 const std::vector < QtCut * > & cut_list,
260 const std::string & filename,
261 const std::string & dsname )
266 std::vector < const TupleCut * > tuple_cut_list;
267 std::vector < QtCut * >::const_iterator it = cut_list.begin();
270 for ( ; it !=cut_list.end(); ++it )
288 createFits (
const std::vector < std::string > & column_list,
289 const std::vector < QtCut * > & cut_list,
291 const std::string & filename,
292 const std::string & dsname )
297 std::vector < const TupleCut * > tuple_cut_list;
298 std::vector < QtCut * >::const_iterator it = cut_list.begin();
301 for ( ; it !=cut_list.end(); ++it )
311 fc -> writeNTupleToFile(ds, filename, dsname, column_list, tuple_cut_list );
315 std::string what (
"Sorry, can not create FITS file. hippo module was not "
316 "built with optional FITS support" );
317 throw std::runtime_error ( what );
325 const std::vector < QtCut * > & cut_list )
327 std::vector < QtCut * >::const_iterator it = cut_list.begin();
328 for ( ; it !=cut_list.end(); ++it )