Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

export_RootController.cxx

Go to the documentation of this file.
00001 
00012 #ifdef _MSC_VER
00013 // nonstandard extension used 'extern' before...
00014 # pragma warning(disable:4231)  
00015 
00016 // needs to have dll-interface used by client
00017 # pragma warning(disable:4251)  
00018 
00019 // non dll-interface struct
00020 # pragma warning(disable:4275)  
00021 
00022 // 'int' : forcing value to bool 'true' or 'false' (performance warning)
00023 # pragma warning(disable:4800)  
00024 #endif
00025 
00026 #include "root/QtRootController.h"
00027 #include "root/RootController.h"
00028 #include "root/QtRootNTuple.h"
00029 
00030 #include "datasrcs/DataSourceException.h"
00031 #include "python/PyDataSource.h"
00032 
00033 // Must include after boost/python.hpp to avoid conflict with slots
00034 #include <qapplication.h>
00035 
00036 
00037 using std::vector;
00038 using namespace boost::python;
00039 
00040 namespace hippodraw {
00041 namespace Python {
00042 
00043 void 
00044 export_RootController()
00045 {
00046   class_ < QtRootController, bases<>,
00047     QtRootController, boost::noncopyable >
00048     ( "RootController", 
00049       "The RootController class provides interface to ROOT ntuple files.",
00050       no_init )
00051 
00052     .def ( "instance",  &QtRootController::instance,
00053            return_value_policy < reference_existing_object >  (),
00054            "instance () -> RootController\n"
00055            "\n"
00056            "Returns the singleton instance of the controller." )
00057 
00058     .staticmethod( "instance" )
00059 
00060     .def ( "getNTupleNames",
00061            &QtRootController::getNTupleNames,
00062            return_value_policy < copy_const_reference > (),
00063            "getNTupleNames ( filename ) -> list\n"
00064            "\n"
00065            "Returns a list of names of the possible NTuple objects in the\n"
00066            "file.   That is, the top level TTree names." )
00067 
00068     .def ( "createNTuple",
00069            &QtRootController::createNTuple,
00070            return_value_policy < manage_new_object >  (),
00071            "createNTuple ( filename, treename ) -> RootNTuple\n"
00072            "\n"
00073            "Creates a RootNTuple from the named file and named tree.\n"
00074            "Consider createDataArray instead, if the hippo module was \n"
00075            "configured with numerical array support." )
00076 
00077 #ifdef HAVE_NUMARRAY
00078     .def ( "createDataArray",
00079            &QtRootController::createDataArray,
00080            return_value_policy < reference_existing_object >  (),
00081            "createDataArray ( filename, treename ) -> DataArray\n"
00082            "\n"
00083            "Creates a DataArray from the named file and named tree.\n"
00084            "This method is only available if the hippo module was configured\n"
00085            "with numerical array support." )
00086 #endif
00087     ;
00088 
00089 }
00090 
00091 } // namespace Python
00092 } // namespace hippodraw

Generated for HippoDraw-1.14.8.5 by doxygen 1.4.3