BCDataSet Class Reference

#include <BCDataSet.h>

List of all members.


Detailed Description

A class representing a set of data points.

Author:
Daniel Kollar

Kevin Kröninger

Version:
1.0
Date:
08.2008 This class represents a data set containing a set of data points. The data points are organized in a vector. The class provides functions to read in data from a file.

Definition at line 35 of file BCDataSet.h.


Public Member Functions

Member functions (miscellaneous methods)


void AddDataPoint (BCDataPoint *datapoint)
int ReadDataFromFile (const char *filename, std::vector< int > options_int, std::vector< double > options_double, const char *options_char)
int ReadDataFromFile (const char *filename, int nvariables)
int ReadDataFromFile (const char *filename, const char *treename, const char *branchnames)
int ReadDataFromFileTree (const char *filename, const char *treename, const char *branchnames)
int ReadDataFromFileTxt (const char *filename, int nvariables)
virtual int ReadDataFromFileUser (const char *filename, std::vector< int > options_int, std::vector< double > options_double, const char *options_char)
void Reset ()
Constructors and destructors


 BCDataSet ()
virtual ~BCDataSet ()
Member functions (get)


BCDataPointGetDataPoint (int index)
BCDataVectorGetDataVector ()
int GetNDataPoints ()

Private Attributes

BCDataVectorfBCDataVector

Constructor & Destructor Documentation

BCDataSet::BCDataSet (  ) 

Definition at line 19 of file BCDataSet.cxx.

BCDataSet::~BCDataSet (  )  [virtual]

Definition at line 28 of file BCDataSet.cxx.


Member Function Documentation

void BCDataSet::AddDataPoint ( BCDataPoint datapoint  ) 

Adds a data point to the data set.

Parameters:
datapoint The data point to be added

Definition at line 365 of file BCDataSet.cxx.

BCDataPoint * BCDataSet::GetDataPoint ( int  index  ) 

Definition at line 59 of file BCDataSet.cxx.

BCDataVector* BCDataSet::GetDataVector (  ) 

int BCDataSet::GetNDataPoints (  ) 

Definition at line 38 of file BCDataSet.cxx.

int BCDataSet::ReadDataFromFile ( const char *  filename,
std::vector< int >  options_int,
std::vector< double >  options_double,
const char *  options_char 
) [inline]

Definition at line 87 of file BCDataSet.h.

int BCDataSet::ReadDataFromFile ( const char *  filename,
int  nvariables 
) [inline]

Definition at line 85 of file BCDataSet.h.

int BCDataSet::ReadDataFromFile ( const char *  filename,
const char *  treename,
const char *  branchnames 
) [inline]

Reads data from a file. For a description see the following member functions.

Definition at line 83 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.

Parameters:
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
Returns:
An error code.
See also:
ReadDataFromFileTxt(char* filename, int nbranches);

ReadDataFromFileUser(const char * filename, std::vector<int> options_int, std::vector<double> options_double, const char * options_char);

Definition at line 80 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.

Parameters:
filename The name of the .txt file.
nvariables The number of variables.
See also:
ReadDataFromFileTree(char* filename, char* treename, std::vector<char*> branchnames)

ReadDataFromFileUser(const char * filename, std::vector<int> options_int, std::vector<double> options_double, const char * options_char);

Definition at line 258 of file BCDataSet.cxx.

int BCDataSet::ReadDataFromFileUser ( const char *  filename,
std::vector< int >  options_int,
std::vector< double >  options_double,
const char *  options_char 
) [virtual]

Reads data from a user specified file. Opens a user specified file and creates data objects containing the values read from the file. This method needs to be overloaded.

Parameters:
filename The name of the file
options_int A vector of options of type int
options_double A vector of options of type double
options_char A pointer of characters
See also:
ReadDataFromFileTree(char* filename, char* treename, std::vector<char*> branchnames)

ReadDataFromFileTxt(char* filename, int nbranches);

Definition at line 351 of file BCDataSet.cxx.

void BCDataSet::Reset (  ) 

Resets the content of the data set

Definition at line 382 of file BCDataSet.cxx.


Member Data Documentation

Definition at line 146 of file BCDataSet.h.


Generated on Mon Sep 15 17:04:29 2008 for Bayesian Analysis Toolkit by  doxygen 1.5.6