export_RootController.cxx
Go to the documentation of this file.
1 
12 #ifdef _MSC_VER
13 // nonstandard extension used 'extern' before...
14 # pragma warning(disable:4231)
15 
16 // needs to have dll-interface used by client
17 # pragma warning(disable:4251)
18 
19 // non dll-interface struct
20 # pragma warning(disable:4275)
21 
22 // 'int' : forcing value to bool 'true' or 'false' (performance warning)
23 # pragma warning(disable:4800)
24 #endif
25 
26 // include first to avoid _POSIX_C_SOURCE warning.
27 #include <boost/python.hpp>
28 
29 #include "root/QtRootController.h"
30 #include "root/RootController.h"
31 #include "root/QtRootNTuple.h"
32 
33 #include "python/PyDataSource.h"
34 
35 using std::vector;
36 using namespace boost::python;
37 
38 namespace hippodraw {
39 namespace Python {
40 
41 void
43 {
44  class_ < QtRootController, bases<>,
45  QtRootController, boost::noncopyable >
46  ( "RootController",
47  "The RootController class provides interface to ROOT ntuple files.",
48  no_init )
49 
50  .def ( "instance", &QtRootController::instance,
51  return_value_policy < reference_existing_object > (),
52  "instance () -> RootController\n"
53  "\n"
54  "Returns the singleton instance of the controller." )
55 
56  .staticmethod( "instance" )
57 
58  .def ( "getNTupleNames",
59  &QtRootController::getNTupleNames,
60  return_value_policy < copy_const_reference > (),
61  "getNTupleNames ( filename ) -> list\n"
62  "\n"
63  "Returns a list of names of the possible DataSource objects in\n"
64  "the ROOT file. That is, the top level TTree names." )
65 
66  .def ( "createNTuple",
67  &QtRootController::createNTuple,
68  return_value_policy < manage_new_object > (),
69  "createNTuple ( filename, treename ) -> RootNTuple\n"
70  "\n"
71  "Creates a RootNTuple from the named file and named tree. Python\n"
72  "take possession of the object.\n"
73  "Consider createDataArray() instead, if the hippo module was \n"
74  "configured with numerical array support." )
75 
76  .def ( "createDataArray",
77  &QtRootController::createDataArray,
78  return_value_policy < manage_new_object > (),
79  "createDataArray ( filename, treename ) -> DataArray\n"
80  "\n"
81  "Creates a DataArray object containing a RootNTuple from the\n"
82  "named ROOT file and named tree. Returns a reference to it." )
83  ;
84 
85 }
86 
87 } // namespace Python
88 } // namespace hippodraw

Generated for HippoDraw Class Library by doxygen