QtRootController Class Reference

#include <QtRootController.h>

Collaboration diagram for QtRootController:

Collaboration graph
RootControllerObserver
[legend]
List of all members.

Detailed Description

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.

Author:
Paul F. Kunz <Paul_Kunz@slac.stanford.edu>

Definition at line 33 of file QtRootController.h.

Public Member Functions

PyDataSourcecreateDataArray (const std::string &filename, const std::string &treename)
 Creates a PyDataSource wrapper to the RootNTuple object.
DataSourcecreateNTuple (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 QtRootControllerinstance ()
 The singleton instance method.

Private Member Functions

 QtRootController (const QtRootController &)
 The copy constructor, protected from being used.
 QtRootController ()
 The default constructor, protected from being used.

Static Private Attributes

static RootControllerm_instance = 0
 The singleton RootController object.
static QtRootControllers_instance = 0
 The singleton QtRootController instance.


Constructor & Destructor Documentation

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.


Member Function Documentation

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().

Referenced by hippodraw::Python::export_RootController().

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(), and hippodraw::Python::export_RootController().

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().

Referenced by hippodraw::Python::export_RootController().

QtRootController * instance (  )  [static]

The singleton instance method.

Definition at line 38 of file QtRootController.cxx.

References RootController::instance(), QtRootController::m_instance, QtRootController::QtRootController(), and QtRootController::s_instance.

Referenced by hippodraw::Python::export_RootController().


Member Data Documentation

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().


The documentation for this class was generated from the following files:
Generated for HippoDraw Class Library by doxygen