|
BAT
0.9.4
The Bayesian analysis toolkit
|
A class representing a set of data points. More...
#include <BCDataSet.h>
Public Member Functions | |
Constructors and destructors | |
| BCDataSet () | |
| BCDataSet (const BCDataSet &bcdataset) | |
| virtual | ~BCDataSet () |
Assignment operators | |
| BCDataSet & | operator= (const BCDataSet &bcdataset) |
Member functions (get) | |
| unsigned int | GetNDataPoints () |
| unsigned int | GetNValuesPerPoint () |
| BCDataPoint * | GetDataPoint (unsigned int index) |
| std::vector< double > | GetDataComponents (int index) |
Member functions (miscellaneous methods) | |
| int | ReadDataFromFile (const char *filename, const char *treename, const char *branchnames) |
| int | ReadDataFromFile (const char *filename, int nvariables) |
| int | ReadDataFromFileTree (const char *filename, const char *treename, const char *branchnames) |
| int | ReadDataFromFileTxt (const char *filename, int nvariables) |
| void | AddDataPoint (BCDataPoint *datapoint) |
| void | Reset () |
| void | Dump () |
A class representing a set of data points.
Definition at line 37 of file BCDataSet.h.
| BCDataSet::BCDataSet | ( | ) |
Default constructor
Definition at line 24 of file BCDataSet.cxx.
| BCDataSet::BCDataSet | ( | const BCDataSet & | bcdataset | ) |
The copy constructor
Definition at line 43 of file BCDataSet.cxx.
|
virtual |
Default destructor
Definition at line 31 of file BCDataSet.cxx.
| void BCDataSet::AddDataPoint | ( | BCDataPoint * | datapoint | ) |
Adds a data point to the data set.
| datapoint | The data point to be added |
Definition at line 358 of file BCDataSet.cxx.
| void BCDataSet::Dump | ( | ) |
Dump the data to the standard output
Definition at line 385 of file BCDataSet.cxx.
| std::vector< double > BCDataSet::GetDataComponents | ( | int | index | ) |
Viewing the data set as a table with one row per point, this method returns a specified column.
| index | The index of the component to be returned. |
Definition at line 116 of file BCDataSet.cxx.
| BCDataPoint * BCDataSet::GetDataPoint | ( | unsigned int | index | ) |
| index | The index of the data point to be returned. |
Definition at line 98 of file BCDataSet.cxx.
| unsigned int BCDataSet::GetNDataPoints | ( | ) |
Definition at line 79 of file BCDataSet.cxx.
| unsigned int BCDataSet::GetNValuesPerPoint | ( | ) |
Definition at line 86 of file BCDataSet.cxx.
Defaut assignment operator
Definition at line 59 of file BCDataSet.cxx.
|
inline |
Reads data from a file. For a description see the following member functions.
Definition at line 96 of file BCDataSet.h.
| int BCDataSet::ReadDataFromFileTree | ( | const char * | filename, |
| const char * | treename, | ||
| const char * | branchnames | ||
| ) |
Reads a TTree from a .root file. Opens a .root file and gets a TTree. It creates data points containing the values read from the file.
| filename | The name of the .root file. |
| treename | The name of the TTree. |
| branchnames | A list of the names of the branches separated by a comma |
Definition at line 135 of file BCDataSet.cxx.
| int BCDataSet::ReadDataFromFileTxt | ( | const char * | filename, |
| int | nvariables | ||
| ) |
Reads data from a .txt file. Opens a .txt file and creates data objects containing the values read from the file.
| filename | The name of the .txt file. |
| nvariables | The number of variables. |
Definition at line 277 of file BCDataSet.cxx.
| void BCDataSet::Reset | ( | ) |
Resets the content of the data set
Definition at line 373 of file BCDataSet.cxx.