BCDataSet.h
197 bool ReadDataFromFile(const std::string& filename, const std::string& treename, const std::string& branchnames, char delim = ',')
217 bool ReadDataFromFileTree(const std::string& filename, const std::string& treename, const std::string& branchnames, char delim = ',');
289 TGraphAsymmErrors* GetGraph(unsigned x, unsigned y, int ex_below, int ex_above, int ey_below, int ey_above) const;
306 TH2* CreateH2(const char* name, const char* title, unsigned x, unsigned y, unsigned nbins_x = 100, unsigned nbins_y = 100, double x_padding = 0.10, double y_padding = 0.10) const;
void SetBounds(unsigned index, double lower_bound, double upper_bound, bool fixed=false)
Set bounds for data values.
Definition: BCDataSet.cxx:267
bool AddDataPoint(const BCDataPoint &datapoint)
Adds a data point to the data set.
Definition: BCDataSet.cxx:209
bool ReadDataFromFileTxt(const std::string &filename, int nvariables)
Reads data from a .txt file.
Definition: BCDataSet.cxx:157
const BCDataPoint & operator[](unsigned index) const
Raw and fast access.
Definition: BCDataSet.h:66
std::vector< double > GetDataComponents(unsigned index) const
Viewing the data set as a table with one row per point, this method returns a specified column...
Definition: BCDataSet.cxx:37
bool ReadDataFromFileTree(const std::string &filename, const std::string &treename, const std::string &branchnames, char delim= ',')
Reads a TTree from a .root file.
Definition: BCDataSet.cxx:88
const BCDataPoint & GetDataPoint(unsigned index) const
Safer, but slower, access to data points.
Definition: BCDataSet.h:94
TH2 * CreateH2(const char *name, const char *title, unsigned x, unsigned y, unsigned nbins_x=100, unsigned nbins_y=100, double x_padding=0.10, double y_padding=0.10) const
Get ROOT TH2 with ranges set to data bounds.
Definition: BCDataSet.cxx:353
void SetNValuesPerPoint(unsigned n)
Set number of values inside each data point.
Definition: BCDataSet.cxx:256
double GetLowerBound(unsigned index) const
Return user-set lower bound on data, if set, otherwise actual lower bound.
Definition: BCDataSet.cxx:64
bool ReadDataFromFile(const std::string &filename, int nvariables)
Reads data from a file.
Definition: BCDataSet.h:205
void AdjustBoundForUncertainties(unsigned i, double nSigma, unsigned i_err1, int i_err2=-1)
Recalculate a data axis bound accounting for uncertainties specified by other data axes...
Definition: BCDataSet.cxx:232
double GetRangeWidth(unsigned index) const
Return upper-bound minus lower-bound for data axis, using user-set bounds, if provided, other actual bounds.
Definition: BCDataSet.h:149
BCDataPoint & GetDataPoint(unsigned index)
Safer, but slower, access to data points.
Definition: BCDataSet.h:87
void PrintSummary(void(*output)(const std::string &)=BCLog::OutSummary) const
Print summary to string handler.
Definition: BCDataSet.cxx:283
bool ReadDataFromFile(const std::string &filename, const std::string &treename, const std::string &branchnames, char delim= ',')
Reads data from a TTree in file.
Definition: BCDataSet.h:197
double GetUpperBound(unsigned index) const
Return user-set upper bound on data, if set, otherwise actual upper bound.
Definition: BCDataSet.cxx:76
TGraph * GetGraph(unsigned x, unsigned y) const
Get data set as ROOT TGraph object,.
Definition: BCDataSet.cxx:295