Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Attributes | List of all members
PyNTupleController Class Reference

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

#include <PyNTupleController.h>

Collaboration diagram for PyNTupleController:
Collaboration graph
[legend]

Public Member Functions

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

Static Public Member Functions

static PyNTupleController * instance ()
 The singleton instance method. More...
 

Private Member Functions

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

Static Private Attributes

static NTupleController * m_instance = 0
 The singleton NTupleController object. More...
 
static PyNTupleController * s_instance = 0
 The singleton PyNTupleController instance. More...
 

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_.nosp@m.Kunz.nosp@m.@slac.nosp@m..sta.nosp@m.nford.nosp@m..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 DataSourceController::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 DataSourceController::instance().

PyNTupleController * instance ( )
static
std::string registerNTuple ( DataSource *  source)

Registers the DataSource object and returns its assigned name.

Definition at line 126 of file PyNTupleController.cxx.

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

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

void registerNTuple ( const std::string &  name,
DataSource *  source 
)

Registers the DataSource object as name.

Definition at line 139 of file PyNTupleController.cxx.

References DataSourceController::instance(), 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
staticprivate
PyNTupleController * s_instance = 0
staticprivate

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