Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Attributes
PyNTupleController Class Reference

A wrapper for NTupleController for use from Python. More...

#include <PyNTupleController.h>

Collaboration diagram for PyNTupleController:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void changeName (DataSource *source, const std::string &new_name)
 Changes the name of the DataSource.
CircularBuffercreateCircularBuffer (unsigned int n)
 Creates an empty CircularBuffer object with n columns.
PyDataSourcecreateDataArray (const std::string &filename)
 Creates a DataArray Python object from the file filename.
DataSourcecreateNTuple (const std::string &filename)
 Creates a NTuple object from file filename.
NTuplecreateNTuple ()
 Creates an empty NTuple object.
DataSourcefindDataSource (const std::string &name) const
 Finds the DataSource by name.
void registerNTuple (const std::string &name, DataSource *source)
 Registers the DataSource object as name.
std::string registerNTuple (DataSource *source)
 Registers the DataSource object and returns its assigned name.
int writeNTupleToFile (DataSource *source, const std::string &filename)
 Writes the DataSource to the file filename.

Static Public Member Functions

static PyNTupleControllerinstance ()
 The singleton instance method.

Private Member Functions

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

Static Private Attributes

static NTupleControllerm_instance = 0
 The singleton NTupleController object.
static PyNTupleControllers_instance = 0
 The singleton PyNTupleController instance.

Detailed Description

A wrapper for NTupleController for use from Python.

Note:
This wrapper was used instead of the export_ pattern so that this class could generate the PyDataSource object without have circular dependency between sub-directories.
Author:
Paul F. Kunz <Paul_Kunz@slac.stanford.edu>

Definition at line 35 of file PyNTupleController.h.


Constructor & Destructor Documentation

PyNTupleController ( ) [private]

The default constructor, protected from being used.

Definition at line 44 of file PyNTupleController.cxx.

Referenced by PyNTupleController::instance().

PyNTupleController ( const PyNTupleController ) [private]

The copy constructor, protected from being used.


Member Function Documentation

void changeName ( DataSource source,
const std::string &  new_name 
)

Changes the name of the DataSource.

Definition at line 156 of file PyNTupleController.cxx.

CircularBuffer * createCircularBuffer ( unsigned int  n)

Creates an empty CircularBuffer object with n columns.

Definition at line 94 of file PyNTupleController.cxx.

References PyNTupleController::m_instance.

PyDataSource * createDataArray ( const std::string &  filename)

Creates a DataArray Python object from the file filename.

Definition at line 101 of file PyNTupleController.cxx.

References PyNTupleController::createNTuple().

NTuple * createNTuple ( )

Creates an empty NTuple object.

Definition at line 62 of file PyNTupleController.cxx.

References PyNTupleController::instance(), and PyNTupleController::registerNTuple().

Referenced by PyNTupleController::createDataArray().

DataSource * createNTuple ( const std::string &  filename)

Creates a NTuple object from file filename.

Definition at line 73 of file PyNTupleController.cxx.

References PyApp::lock(), PyNTupleController::m_instance, and PyApp::unlock().

DataSource * findDataSource ( const std::string &  name) const

Finds the DataSource by name.

Definition at line 117 of file PyNTupleController.cxx.

References PyNTupleController::instance().

PyNTupleController * instance ( ) [static]
void registerNTuple ( const std::string &  name,
DataSource source 
)

Registers the DataSource object as name.

Definition at line 139 of file PyNTupleController.cxx.

References PyNTupleController::instance(), and PyNTupleController::registerNTuple().

std::string registerNTuple ( DataSource source)

Registers the DataSource object and returns its assigned name.

Definition at line 126 of file PyNTupleController.cxx.

References PyNTupleController::instance(), PyApp::lock(), and PyApp::unlock().

Referenced by PyNTupleController::createNTuple(), and PyNTupleController::registerNTuple().

int writeNTupleToFile ( DataSource source,
const std::string &  filename 
)

Writes the DataSource to the file filename.

Returns 0 if successful, otherwise returns a yet to be determined return code.

Definition at line 148 of file PyNTupleController.cxx.

References PyNTupleController::m_instance.


Member Data Documentation

NTupleController * m_instance = 0 [static, private]
PyNTupleController * s_instance = 0 [static, private]

The singleton PyNTupleController instance.

Definition at line 42 of file PyNTupleController.h.

Referenced by PyNTupleController::instance().


The documentation for this class was generated from the following files:

Generated for HippoDraw Class Library by doxygen