A wrapper for RootController, so that when RootController is used in Qt based application, the application object can be locked and unlocked before calling any ROOT functions. More...
#include <QtRootController.h>
Public Member Functions | |
PyDataSource * | createDataArray (const std::string &filename, const std::string &treename) |
Creates a PyDataSource wrapper to the RootNTuple object. | |
DataSource * | createNTuple (const std::string &filename, const std::string &treename) |
Creates a QtRootNTuple wrapper for RootNTuple object. | |
const std::vector< std::string > & | getNTupleNames (const std::string &filename) |
Returns the names of the top level tree in the Root file. | |
Static Public Member Functions | |
static QtRootController * | instance () |
The singleton instance method. | |
Private Member Functions | |
QtRootController () | |
The default constructor, protected from being used. | |
QtRootController (const QtRootController &) | |
The copy constructor, protected from being used. | |
Static Private Attributes | |
static RootController * | m_instance = 0 |
The singleton RootController object. | |
static QtRootController * | s_instance = 0 |
The singleton QtRootController instance. |
A wrapper for RootController, so that when RootController is used in Qt based application, the application object can be locked and unlocked before calling any ROOT functions.
ROOT is not thread safe, so this is necessary to avoid the application thread and Python thread from clashing.
Definition at line 33 of file QtRootController.h.
QtRootController | ( | ) | [private] |
The default constructor, protected from being used.
Definition at line 32 of file QtRootController.cxx.
Referenced by QtRootController::instance().
QtRootController | ( | const QtRootController & | ) | [private] |
The copy constructor, protected from being used.
PyDataSource * createDataArray | ( | const std::string & | filename, | |
const std::string & | treename | |||
) |
Creates a PyDataSource wrapper to the RootNTuple object.
Definition at line 65 of file QtRootController.cxx.
References QtRootController::createNTuple().
DataSource * createNTuple | ( | const std::string & | filename, | |
const std::string & | treename | |||
) |
Creates a QtRootNTuple wrapper for RootNTuple object.
Definition at line 50 of file QtRootController.cxx.
References PyApp::lock(), QtRootController::m_instance, and PyApp::unlock().
Referenced by QtRootController::createDataArray().
const std::vector< std::string > & getNTupleNames | ( | const std::string & | filename | ) |
Returns the names of the top level tree in the Root file.
Definition at line 81 of file QtRootController.cxx.
References PyApp::lock(), QtRootController::m_instance, and PyApp::unlock().
QtRootController * instance | ( | ) | [static] |
The singleton instance method.
Definition at line 38 of file QtRootController.cxx.
References QtRootController::m_instance, QtRootController::QtRootController(), and QtRootController::s_instance.
RootController * m_instance = 0 [static, private] |
The singleton RootController object.
Definition at line 42 of file QtRootController.h.
Referenced by QtRootController::createNTuple(), QtRootController::getNTupleNames(), and QtRootController::instance().
QtRootController * s_instance = 0 [static, private] |
The singleton QtRootController instance.
Definition at line 39 of file QtRootController.h.
Referenced by QtRootController::instance().