#include <LdfNTuple.h>
Inheritance diagram for RootNTuple:


Paul F. Kunz <Paul_Kunz@slac.stanford.edu>
Definition at line 31 of file LdfNTuple.h.
Public Types | |
| typedef void(hippodraw::Observer::* | Action )(const Observable *) |
| The member function of the Observer that is called. | |
| typedef std::list< hippodraw::Observer * > | ObserverList_t |
| The type of STL container to maintain list of Observer objects. | |
Public Member Functions | |
| int | addColumn (const std::string &label, const std::vector< double > &column) |
| Adds a column to the end of the RootNTuple. | |
| int | addColumn (const std::string &label, const std::vector< double > &column) |
| Adds a column to the end of the RootNTuple. | |
| void | addObserver (hippodraw::Observer *) |
| Adds an Observer to the Observer list. | |
| virtual void | addRow (const std::vector< double > &row) |
| Raises an assertion, as the contained ROOT file should not be changed. | |
| virtual void | addRow (const std::vector< double > &row) |
| Raises an assertion, as the contained ROOT file should not be changed. | |
| virtual void | clear () |
| Removes all the cached data vectors, does not change the contained ROOT file. | |
| virtual void | clear () |
| Removes all the cached data vectors, does not change the contained ROOT file. | |
| unsigned int | columns () const |
| Returns the number of columns or data arrays available from this DataSource. | |
| virtual void | copy (const DataSource &) |
| Raises assertion as contained ROOT NTuple should not be copied. | |
| virtual void | copy (const DataSource &) |
| Raises assertion as contained ROOT NTuple should not be copied. | |
| std::string | createBinding (const std::string &name, const std::vector< int > &indices) const |
| Creates complete binding string from the array variable name and indexes. | |
| std::string | createBinding (const std::string &name, const std::vector< int > &indices) const |
| Creates complete binding string from the array variable name and indexes. | |
| double * | doubleArrayAt (unsigned int row, unsigned int column) const |
| Returns pointer to a double array type in given row. | |
| double * | doubleArrayAt (unsigned int row, unsigned int column) const |
| Returns pointer to a double array type in given row. | |
| virtual bool | empty () const |
Returns true, if RootNTuple is empty, i.e. | |
| virtual bool | empty () const |
Returns true, if RootNTuple is empty, i.e. | |
| void | expandIfNeeded (const std::vector< std::string > &labels) const |
| Expand the labels if needed. | |
| void | expandIfNeeded (const std::vector< std::string > &labels) const |
| Expand the labels if needed. | |
| virtual bool | fillRange (unsigned int column, Range &) const |
| Fills the Range object from data indexed by column. | |
| float * | floatArrayAt (unsigned int row, unsigned int column) const |
| Returns pointer to a float array type in given row. | |
| float * | floatArrayAt (unsigned int row, unsigned int column) const |
| Returns pointer to a float array type in given row. | |
| virtual const std::vector< double > & | getColumn (unsigned int index) const |
| Returns the data in the column with index column. | |
| virtual const std::vector< double > & | getColumn (const std::string &name, const std::vector< int > &indices) const |
| Returns the column with label name. | |
| virtual const std::vector< double > & | getColumn (const std::string &name) const |
| Returns the data in the column with label name. | |
| virtual const std::vector< double > & | getColumn (unsigned int index) const |
| Returns the data in the column with index column. | |
| virtual const std::vector< double > & | getColumn (const std::string &name, const std::vector< int > &indices) const |
| Returns the column with label name. | |
| virtual const std::vector< double > & | getColumn (const std::string &name) const |
| Returns the data in the column with label name. | |
| const std::vector< int > & | getColumnShape (unsigned int column) const |
| Returns the shape of multidimensional array. | |
| const std::vector< int > & | getColumnShape (unsigned int column) const |
| Returns the shape of multidimensional array. | |
| virtual const std::string & | getLabelAt (unsigned int index) const |
| Returns the label for the column at index index. | |
| virtual const std::vector< std::string > & | getLabels () const |
| Returns the list of available labels. | |
| const std::string & | getName () const |
| Returns the name of the ntuple. | |
| const ObserverList_t & | getObservers () const |
| Returns the list of observers. | |
| unsigned int | getRank () const |
| Returns the rank of the data source. | |
| unsigned int | getRank () const |
| Returns the rank of the data source. | |
| virtual const std::vector< double > & | getRow (unsigned int) const =0 |
| Returns a const reference to slice along the axis known as a row. | |
| virtual const std::vector< double > & | getRow (unsigned int i) const |
| Returns a const reference to slice along the axis known as a row. | |
| virtual const std::vector< double > & | getRow (unsigned int i) const |
| Returns a const reference to slice along the axis known as a row. | |
| const std::vector< unsigned int > & | getShape () const |
| Returns the shape of the data elements. | |
| const std::vector< unsigned int > & | getShape () const |
| Returns the shape of the data elements. | |
| TBranch * | getTBranch (const std::string &column) |
| Get the TBranch associated with this column. | |
| TBranch * | getTBranch (const std::string &column) |
| Get the TBranch associated with this column. | |
| hippodraw::RootData::Type | getType (unsigned int column) const |
| Returns the type of data in column. | |
| hippodraw::RootData::Type | getType (unsigned int column) const |
| Returns the type of data in column. | |
| virtual int | indexOf (const std::string &label) const |
| Returns the index of the column whose label is label. | |
| virtual unsigned int | indexOfMaxElement (unsigned int index) const |
| Returns row index of the maximum element in a column for the given column. | |
| virtual unsigned int | indexOfMinElement (unsigned int index) const |
| Returns row index of the minimum element in a column for the given column. | |
| int * | intArrayAt (unsigned int row, unsigned int column) const |
| Returns pointer to a int array type in given row. | |
| int * | intArrayAt (unsigned int row, unsigned int column) const |
| Returns pointer to a int array type in given row. | |
| virtual bool | isMultiDimensional (const std::string &column) const |
| Answers if rows of column are composed of the multidimensional data. | |
| virtual bool | isMultiDimensional (const std::string &column) const |
| Answers if rows of column are composed of the multidimensional data. | |
| bool | isNull () const |
Returns true if the receiving objects is a null object. | |
| bool | isValidLabel (const std::string &label) const |
Returns true if label is a valid label for a column in the DataSource. | |
| virtual void | notifyObservers () const |
| Notifies observers. | |
| virtual void | notifyObservers () const |
| Notifies observers. | |
| virtual double | operator[] (std::vector< unsigned int > &indices) const |
| Raises an assertion, as a ROOT NTuple does not really have shape. | |
| virtual double | operator[] (std::vector< unsigned int > &indices) const |
| Raises an assertion, as a ROOT NTuple does not really have shape. | |
| void | removeObserver (hippodraw::Observer *) |
| Removes an Observer from the Observer list. | |
| void | replaceColumn (const std::string &label, const std::vector< double > &data) |
| Replaces the data in column labeled label. | |
| void | replaceColumn (unsigned int index, const std::vector< double > &data) |
| Replaces the data in column index. | |
| void | replaceColumn (const std::string &label, const std::vector< double > &data) |
| Replaces the data in column labeled label. | |
| void | replaceColumn (unsigned int index, const std::vector< double > &data) |
| Replaces the data in column index. | |
| virtual void | reserve (unsigned int count)=0 |
| For each column, reserves enough space for the NTuple to grow to count rows. | |
| virtual void | reserve (unsigned int) |
| Does nothing as the contained ROOT file controls the size. | |
| virtual void | reserve (unsigned int) |
| Does nothing as the contained ROOT file controls the size. | |
| RootNTuple (TTree *tree) | |
| A constructor taking TTree from ROOT file as argument. | |
| RootNTuple (TTree *tree) | |
| A constructor taking TTree from ROOT file as argument. | |
| const std::vector< int > & | rowDataDimSize (const std::string &column) const |
| Size of the multidimensional matrix in various dimensions. | |
| const std::vector< int > & | rowDataDimSize (const std::string &column) const |
| Size of the multidimensional matrix in various dimensions. | |
| virtual unsigned int | rows () const |
| Returns the size of the slice for the next to last dimension. | |
| virtual unsigned int | rows () const |
| Returns the size of the slice for the next to last dimension. | |
| virtual bool | setLabelAt (const std::string &s, unsigned int index) |
| Changes the label of a data column to s. | |
| virtual void | setLabels (const std::vector< std::string > &v) |
| Assigns the label to each column from the vector of strings @ v. | |
| void | setName (const std::string &name) |
| Sets the name of the ntuple. | |
| virtual bool | setReleventIndex (const std::string &column, const std::vector< unsigned int > &index) |
| In case we are dealing with multidimensional data in rows of this column we would like to deal with on one entry of this multidimensional data. | |
| virtual bool | setReleventIndex (const std::string &column, const std::vector< unsigned int > &index) |
| In case we are dealing with multidimensional data in rows of this column we would like to deal with on one entry of this multidimensional data. | |
| virtual void | setShape (std::vector< unsigned int > &shape) |
| Sets the shape of the data elements. | |
| virtual void | setShape (std::vector< unsigned int > &shape) |
| Sets the shape of the data elements. | |
| void | setTitle (const std::string &title) |
| Sets the title of the ntuple to title. | |
| void | smartExpandRootNTuple (const std::string &column) const |
| Suppose we encounter a RootTuple which has multi-dimensional data sitting in the rows of the concerned column. | |
| void | smartExpandRootNTuple (const std::string &column) const |
| Suppose we encounter a RootTuple which has multi-dimensional data sitting in the rows of the concerned column. | |
| virtual double | sum (unsigned int column) const |
| Returns the sum of all the elements in the sequence of column column. | |
| virtual void | throwIfInvalidLabel (const std::string &label) const |
| Throws a DataSourceException object if label is not a valid label for this DataSource. | |
| void | throwIfInvalidRowSize (const std::vector< double > &row) |
| Throws a DataSourceException if the size of the row is not equal to the number of columns, otherwise does nothing. | |
| const std::string & | title () const |
| Returns a const reference to the title of the ntuple. | |
| virtual double | valueAt (unsigned int row, unsigned int column) const |
| Returns the value in the table in position given by the row and column indexes. | |
| virtual double | valueAt (unsigned int row, unsigned int column) const |
| Returns the value in the table in position given by the row and column indexes. | |
| virtual | ~RootNTuple () |
| The destructor. | |
| virtual | ~RootNTuple () |
| The destructor. | |
Protected Member Functions | |
| virtual void | addLabel (const std::string &label) |
| Adds a new label for a column. | |
| virtual void | copyPrivate (const DataSource &other) |
| Copies the contents of the other DataSource. | |
| bool | isValidColumn (unsigned int index) const |
Returns true if index is valid, otherwise throws a DataSourceException. | |
| void | notifyObservers (Action action) const |
| An internal method to iterate over all observers and to send the message action. | |
| RootNTuple (const RootNTuple &) | |
| The copy constructor. | |
| RootNTuple () | |
| The default constructor. | |
| RootNTuple (const RootNTuple &) | |
| The copy constructor. | |
| RootNTuple () | |
| The default constructor. | |
Protected Attributes | |
| std::vector< double > | m_array |
| A temporary array that can be returned by const reference. | |
| std::vector< unsigned int > | m_shape |
| The shape of the data. | |
Private Member Functions | |
| int | addColumn (const std::string &label, RootBranch *) |
| Adds a column to the end of the RootNTuple. | |
| int | addColumn (const std::string &label, RootBranch *) |
| Adds a column to the end of the RootNTuple. | |
| void | expandIfNeeded (const std::string &label) const |
| void | expandIfNeeded (const std::string &label) const |
| void | fillDataCache (unsigned int column) |
| Fills the data cache for column column. | |
| void | fillDataCache (unsigned int column) |
| Fills the data cache for column column. | |
| void | initBranches () |
| Initializes the columns of the NTuple. | |
| void | initBranches () |
| Initializes the columns of the NTuple. | |
| bool | rotateWheels (std::vector< int > &wheels, const std::vector< int > &sz, unsigned int d) |
| A hack to generate labels. | |
| bool | rotateWheels (std::vector< int > &wheels, const std::vector< int > &sz, unsigned int d) |
| A hack to generate labels. | |
Private Attributes | |
| unsigned int | m_cur_entry |
| Index into the current position in the branches. | |
| std::vector< RootBranch * > | m_data |
| The RootBranch objects that contains the data. | |
| std::vector< std::vector< double > * > | m_data_cache |
| A cache of data already read. | |
| std::vector< std::vector< double > * > | m_data_cache |
| A cache of data already read. | |
| std::vector< bool > | m_multiDimensional |
| Answers if rows of column are composed of the multidimensional data. | |
| TTree * | m_tree |
| The ROOT TTree object which is the source of the data. | |
| TTree * | m_tree |
| The ROOT TTree object which is the source of the data. | |
|
|
The member function of the Observer that is called.
Definition at line 83 of file Observable.h. |
|
|
The type of STL container to maintain list of Observer objects.
Definition at line 46 of file Observable.h. |
|
|
The default constructor.
Definition at line 55 of file LdfNTuple.cxx. |
|
|
The copy constructor.
|
|
|
A constructor taking TTree from ROOT file as argument.
Definition at line 46 of file LdfNTuple.cxx. References initBranches(). |
|
|
The destructor.
Definition at line 62 of file LdfNTuple.cxx. |
|
|
The default constructor.
|
|
|
The copy constructor.
|
|
|
A constructor taking TTree from ROOT file as argument.
|
|
|
The destructor.
|
|
||||||||||||
|
Adds a column to the end of the RootNTuple. If the size of the input array is the same as the size of the existing columns adds input array to then end of the RootNTuple . Gives the column the label label. Returns the index of the newly created column. If the size of the input array differs from the size of existing columns or if the label already exists, then throws a DataSourceException object. Reimplemented in QtRootNTuple. |
|
||||||||||||
|
Adds a column to the end of the RootNTuple. If the size of the input array is the same as the size of the existing columns adds input array to then end of the RootNTuple . Gives the column the label label. Returns the index of the newly created column. If the size of the input array differs from the size of existing columns or if the label already exists, then throws a DataSourceException object.
|
|
||||||||||||
|
Adds a column to the end of the RootNTuple. If the size of the input array is the same as the size of the existing columns adds input array to then end of the RootNTuple . Gives the column the label label. Returns the index of the newly created column. If the size of the input array differs from the size of existing columns or if the label already exists, then throws a DataSourceException object. Reimplemented in QtRootNTuple. Definition at line 294 of file LdfNTuple.cxx. References DataSource::addLabel(), DataSource::indexOf(), m_data, m_data_cache, m_multiDimensional, and rows(). |
|
||||||||||||
|
Adds a column to the end of the RootNTuple. If the size of the input array is the same as the size of the existing columns adds input array to then end of the RootNTuple . Gives the column the label label. Returns the index of the newly created column. If the size of the input array differs from the size of existing columns or if the label already exists, then throws a DataSourceException object.
Definition at line 274 of file LdfNTuple.cxx. References DataSource::addLabel(), DataSource::indexOf(), m_data, and m_data_cache. Referenced by QtRootNTuple::addColumn(), initBranches(), and smartExpandRootNTuple(). |
|
|
Adds a new label for a column.
Definition at line 150 of file DataSource.cxx. References DataSource::m_labels. Referenced by NumArrayTuple::addColumn(), NTuple::addColumn(), ListTuple::addColumn(), addColumn(), and FitsNTuple::addColumn(). |
|
|
Adds an Observer to the Observer list.
Definition at line 49 of file Observable.cxx. References Observable::m_list. Referenced by CutPlotter::addCutTarget(), XyPlotter::addDataRep(), FunctionRep::FunctionRep(), BinningProjector::normalizeTo(), DataRepController::setAxisBindings(), DisplayController::setNTuple(), CutPlotter::setNTuple(), and TextPlotter::setParentDataRep(). |
|
|
Raises an assertion, as the contained ROOT file should not be changed.
Implements DataSource. |
|
|
Raises an assertion, as the contained ROOT file should not be changed.
Implements DataSource. Definition at line 243 of file LdfNTuple.cxx. |
|
|
Removes all the cached data vectors, does not change the contained ROOT file.
Implements DataSource. |
|
|
Removes all the cached data vectors, does not change the contained ROOT file.
Implements DataSource. Definition at line 223 of file LdfNTuple.cxx. References m_data_cache. |
|
|
|
Raises assertion as contained ROOT NTuple should not be copied.
|
|
|
Raises assertion as contained ROOT NTuple should not be copied.
Definition at line 68 of file LdfNTuple.cxx. |
|
|
Copies the contents of the other DataSource. For use by derived classes only. Definition at line 110 of file DataSource.cxx. References DataSource::m_ds_name, DataSource::m_is_null, DataSource::m_labels, DataSource::m_shape, and DataSource::m_title. Referenced by RTuple::copy(), and NTuple::copy(). |
|
||||||||||||
|
Creates complete binding string from the array variable name and indexes.
Reimplemented in QtRootNTuple. |
|
||||||||||||
|
Creates complete binding string from the array variable name and indexes.
Reimplemented in QtRootNTuple. Definition at line 576 of file LdfNTuple.cxx. References num_util::size(). Referenced by QtRootNTuple::createBinding(), and getColumn(). |
|
||||||||||||
|
Returns pointer to a double array type in given row.
|
|
||||||||||||
|
Returns pointer to a double array type in given row.
Definition at line 195 of file LdfNTuple.cxx. References num_util::data(), and m_data. Referenced by QtRootNTuple::valueAt(). |
|
|
Returns has no data. Implements DataSource. |
|
|
Returns has no data. Implements DataSource. Definition at line 164 of file LdfNTuple.cxx. References rows(). |
|
|
|
|
|
Expand the labels if needed. For each label in labels, expand the variable name if it is an array.
Reimplemented in QtRootNTuple. |
|
|
Definition at line 509 of file LdfNTuple.cxx. References isMultiDimensional(), and smartExpandRootNTuple(). |
|
|
Expand the labels if needed. For each label in labels, expand the variable name if it is an array.
Reimplemented in QtRootNTuple. Definition at line 524 of file LdfNTuple.cxx. References num_util::size(). Referenced by QtRootNTuple::expandIfNeeded(), and getColumn(). |
|
|
Fills the data cache for column column.
|
|
|
Fills the data cache for column column.
Definition at line 150 of file LdfNTuple.cxx. References num_util::data(), m_data, m_data_cache, operator[](), rows(), num_util::size(), and valueAt(). Referenced by getColumn(), and valueAt(). |
|
||||||||||||
|
Fills the Range object from data indexed by column.
Returns Reimplemented in NTuple, and FitsNTuple. Definition at line 323 of file DataSource.cxx. References DataSource::columns(), std::max(), std::min(), DataSource::rows(), Range::setRange(), num_util::size(), and DataSource::valueAt(). |
|
||||||||||||
|
Returns pointer to a float array type in given row.
|
|
||||||||||||
|
Returns pointer to a float array type in given row.
Definition at line 204 of file LdfNTuple.cxx. References num_util::data(), and m_data. Referenced by QtRootNTuple::valueAt(). |
|
|
Returns the data in the column with index column.
Reimplemented from DataSource. Reimplemented in QtRootNTuple. |
|
||||||||||||
|
Returns the column with label name. The column should be one that has an array on the TBranch. The vector indexes is used as the indexes into the array. Reimplemented in QtRootNTuple. |
|
|
Returns the data in the column with label name.
Reimplemented from DataSource. Reimplemented in QtRootNTuple. |
|
|
Returns the data in the column with index column.
Reimplemented from DataSource. Reimplemented in QtRootNTuple. Definition at line 558 of file LdfNTuple.cxx. References fillDataCache(), and m_data_cache. |
|
||||||||||||
|
Returns the column with label name. The column should be one that has an array on the TBranch. The vector indexes is used as the indexes into the array. Reimplemented in QtRootNTuple. Definition at line 548 of file LdfNTuple.cxx. References createBinding(), and getColumn(). |
|
|
Returns the data in the column with label name.
Reimplemented from DataSource. Reimplemented in QtRootNTuple. Definition at line 536 of file LdfNTuple.cxx. References expandIfNeeded(), DataSource::indexOf(), and DataSource::throwIfInvalidLabel(). Referenced by QtRootNTuple::getColumn(), and getColumn(). |
|
|
Returns the shape of multidimensional array.
|
|
|
Returns the shape of multidimensional array.
Definition at line 413 of file LdfNTuple.cxx. References m_data, and rowDataDimSize(). Referenced by rowDataDimSize(), and QtRootNTuple::valueAt(). |
|