Logo ROOT   6.13/01
Reference Guide
List of all members | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Attributes | List of all members
ROOT::Fit::FitData Class Reference

Base class for all the fit data types: Stores the coordinates and the DataOptions.

class holding the fit data points. It is template on the type of point, which can be for example a binned or unbinned point. It is basicaly a wrapper on an std::vector

Definition at line 66 of file FitData.h.

Public Member Functions

 FitData (unsigned int maxpoints=0, unsigned int dim=1)
 construct with default option and data range More...
 
 FitData (const DataOptions &opt, unsigned int maxpoints=0, unsigned int dim=1)
 construct passing options and default data range More...
 
 FitData (const DataRange &range, unsigned int maxpoints=0, unsigned int dim=1)
 construct passing range and default options More...
 
 FitData (const DataOptions &opt, const DataRange &range, unsigned int maxpoints=0, unsigned int dim=1)
 construct passing options and data range More...
 
 FitData (unsigned int n, const double *dataX)
 constructor from external data for 1D data More...
 
 FitData (unsigned int n, const double *dataX, const double *dataY)
 constructor from external data for 2D data More...
 
 FitData (unsigned int n, const double *dataX, const double *dataY, const double *dataZ)
 constructor from external data for 3D data More...
 
 FitData (const DataRange &range, unsigned int maxpoints, const double *dataX)
 constructor for multi-dim external data and a range (data are copied inside according to the range) Uses as argument an iterator of a list (or vector) containing the const double * of the data An example could be the std::vector<const double *>::begin More...
 
 FitData (const DataRange &range, unsigned int maxpoints, const double *dataX, const double *dataY)
 constructor for multi-dim external data and a range (data are copied inside according to the range) Uses as argument an iterator of a list (or vector) containing the const double * of the data An example could be the std::vector<const double *>::begin More...
 
 FitData (const DataRange &range, unsigned int maxpoints, const double *dataX, const double *dataY, const double *dataZ)
 constructor for multi-dim external data and a range (data are copied inside according to the range) Uses as argument an iterator of a list (or vector) containing the const double * of the data An example could be the std::vector<const double *>::begin More...
 
template<class Iterator >
 FitData (unsigned int n, unsigned int dim, Iterator dataItr)
 constructor for multi-dim external data (data are not copied inside) Uses as argument an iterator of a list (or vector) containing the const double * of the data An example could be the std::vector<const double *>::begin In case of weighted data, the external data must have a dim+1 lists of data The apssed dim refers just to the coordinate size More...
 
template<class Iterator >
 FitData (const DataRange &range, unsigned int maxpoints, unsigned int dim, Iterator dataItr)
 constructor for multi-dim external data and a range (data are copied inside according to the range) Uses as argument an iterator of a list (or vector) containing the const double * of the data An example could be the std::vector<const double *>::begin More...
 
 FitData (const FitData &rhs)
 
virtual ~FitData ()
 dummy virtual destructor More...
 
void Add (double x)
 add one dim data with only coordinate and values More...
 
void Add (const double *x)
 add multi-dim coordinate data with only value More...
 
void Append (unsigned int newPoints, unsigned int dim=1)
 
const double * Coords (unsigned int ipoint) const
 return a pointer to the coordinates data for the given fit point More...
 
const double * GetCoordComponent (unsigned int ipoint, unsigned int icoord) const
 returns a single coordinate component of a point. More...
 
const std::vector< const double *> & GetCoordDataPtrs () const
 direct access to coord data ptrs More...
 
unsigned int NDim () const
 return coordinate data dimension More...
 
unsigned int NPoints () const
 return number of fit points More...
 
FitDataoperator= (const FitData &rhs)
 
const DataOptionsOpt () const
 access to options More...
 
DataOptionsOpt ()
 
const DataRangeRange () const
 access to range More...
 
unsigned int Size () const
 return number of fit points More...
 

Protected Member Functions

void InitCoordsVector ()
 initializer routines to set the corresponding pointers right The vectors must NOT be resized after this initialization without setting the corresponding pointers in the same moment ( has to be an atomic operation in case of multithreading ). More...
 
template<class Iterator >
void InitFromRange (Iterator dataItr)
 
void UnWrap ()
 

Static Protected Member Functions

static constexpr unsigned VectorPadding (const unsigned)
 If VecCore is not defined, there is no vectorization available and the SIMD vector size will always be one. More...
 

Protected Attributes

unsigned int fDim
 
unsigned int fMaxPoints
 
unsigned int fNPoints
 
bool fWrapped
 

Private Attributes

std::vector< std::vector< double > > fCoords
 This vector stores the vectorizable data: The inner vectors contain the coordinates data fCoords[0] is the vector for the x-coords fCoords[1] is the vector for the y-coords etc. More...
 
std::vector< const double *> fCoordsPtr
 
DataOptions fOptions
 
double * fpTmpCoordVector
 
DataRange fRange
 

#include <Fit/FitData.h>

Inheritance diagram for ROOT::Fit::FitData:
[legend]

Constructor & Destructor Documentation

◆ FitData() [1/13]

ROOT::Fit::FitData::FitData ( unsigned int  maxpoints = 0,
unsigned int  dim = 1 
)
explicit

construct with default option and data range

Definition at line 20 of file FitData.cxx.

◆ FitData() [2/13]

ROOT::Fit::FitData::FitData ( const DataOptions opt,
unsigned int  maxpoints = 0,
unsigned int  dim = 1 
)
explicit

construct passing options and default data range

Definition at line 32 of file FitData.cxx.

◆ FitData() [3/13]

ROOT::Fit::FitData::FitData ( const DataRange range,
unsigned int  maxpoints = 0,
unsigned int  dim = 1 
)
explicit

construct passing range and default options

Definition at line 46 of file FitData.cxx.

◆ FitData() [4/13]

ROOT::Fit::FitData::FitData ( const DataOptions opt,
const DataRange range,
unsigned int  maxpoints = 0,
unsigned int  dim = 1 
)

construct passing options and data range

Definition at line 59 of file FitData.cxx.

◆ FitData() [5/13]

ROOT::Fit::FitData::FitData ( unsigned int  n,
const double *  dataX 
)

constructor from external data for 1D data

Definition at line 76 of file FitData.cxx.

◆ FitData() [6/13]

ROOT::Fit::FitData::FitData ( unsigned int  n,
const double *  dataX,
const double *  dataY 
)

constructor from external data for 2D data

Definition at line 96 of file FitData.cxx.

◆ FitData() [7/13]

ROOT::Fit::FitData::FitData ( unsigned int  n,
const double *  dataX,
const double *  dataY,
const double *  dataZ 
)

constructor from external data for 3D data

Definition at line 117 of file FitData.cxx.

◆ FitData() [8/13]

ROOT::Fit::FitData::FitData ( const DataRange range,
unsigned int  maxpoints,
const double *  dataX 
)

constructor for multi-dim external data and a range (data are copied inside according to the range) Uses as argument an iterator of a list (or vector) containing the const double * of the data An example could be the std::vector<const double *>::begin

Definition at line 144 of file FitData.cxx.

◆ FitData() [9/13]

ROOT::Fit::FitData::FitData ( const DataRange range,
unsigned int  maxpoints,
const double *  dataX,
const double *  dataY 
)

constructor for multi-dim external data and a range (data are copied inside according to the range) Uses as argument an iterator of a list (or vector) containing the const double * of the data An example could be the std::vector<const double *>::begin

Definition at line 164 of file FitData.cxx.

◆ FitData() [10/13]

ROOT::Fit::FitData::FitData ( const DataRange range,
unsigned int  maxpoints,
const double *  dataX,
const double *  dataY,
const double *  dataZ 
)

constructor for multi-dim external data and a range (data are copied inside according to the range) Uses as argument an iterator of a list (or vector) containing the const double * of the data An example could be the std::vector<const double *>::begin

Definition at line 184 of file FitData.cxx.

◆ FitData() [11/13]

template<class Iterator >
ROOT::Fit::FitData::FitData ( unsigned int  n,
unsigned int  dim,
Iterator  dataItr 
)
inline

constructor for multi-dim external data (data are not copied inside) Uses as argument an iterator of a list (or vector) containing the const double * of the data An example could be the std::vector<const double *>::begin In case of weighted data, the external data must have a dim+1 lists of data The apssed dim refers just to the coordinate size

Definition at line 123 of file FitData.h.

◆ FitData() [12/13]

template<class Iterator >
ROOT::Fit::FitData::FitData ( const DataRange range,
unsigned int  maxpoints,
unsigned int  dim,
Iterator  dataItr 
)
inline

constructor for multi-dim external data and a range (data are copied inside according to the range) Uses as argument an iterator of a list (or vector) containing the const double * of the data An example could be the std::vector<const double *>::begin

Definition at line 150 of file FitData.h.

◆ ~FitData()

ROOT::Fit::FitData::~FitData ( )
virtual

dummy virtual destructor

Definition at line 201 of file FitData.cxx.

◆ FitData() [13/13]

ROOT::Fit::FitData::FitData ( const FitData rhs)

Definition at line 211 of file FitData.cxx.

Member Function Documentation

◆ Add() [1/2]

void ROOT::Fit::FitData::Add ( double  x)
inline

add one dim data with only coordinate and values

Definition at line 264 of file FitData.h.

◆ Add() [2/2]

void ROOT::Fit::FitData::Add ( const double *  x)
inline

add multi-dim coordinate data with only value

Definition at line 279 of file FitData.h.

◆ Append()

void ROOT::Fit::FitData::Append ( unsigned int  newPoints,
unsigned int  dim = 1 
)

Definition at line 248 of file FitData.cxx.

◆ Coords()

const double* ROOT::Fit::FitData::Coords ( unsigned int  ipoint) const
inline

return a pointer to the coordinates data for the given fit point

Definition at line 246 of file FitData.h.

◆ GetCoordComponent()

const double* ROOT::Fit::FitData::GetCoordComponent ( unsigned int  ipoint,
unsigned int  icoord 
) const
inline

returns a single coordinate component of a point.

This function is threadsafe in contrast to Coords(...) and can easily get vectorized by the compiler in loops running over the ipoint-index.

Definition at line 229 of file FitData.h.

◆ GetCoordDataPtrs()

const std::vector< const double * >& ROOT::Fit::FitData::GetCoordDataPtrs ( ) const
inline

direct access to coord data ptrs

Definition at line 339 of file FitData.h.

◆ InitCoordsVector()

void ROOT::Fit::FitData::InitCoordsVector ( )
inlineprotected

initializer routines to set the corresponding pointers right The vectors must NOT be resized after this initialization without setting the corresponding pointers in the same moment ( has to be an atomic operation in case of multithreading ).

Definition at line 181 of file FitData.h.

◆ InitFromRange()

template<class Iterator >
void ROOT::Fit::FitData::InitFromRange ( Iterator  dataItr)
inlineprotected

Definition at line 200 of file FitData.h.

◆ NDim()

unsigned int ROOT::Fit::FitData::NDim ( ) const
inline

return coordinate data dimension

Definition at line 311 of file FitData.h.

◆ NPoints()

unsigned int ROOT::Fit::FitData::NPoints ( ) const
inline

return number of fit points

Definition at line 295 of file FitData.h.

◆ operator=()

FitData & ROOT::Fit::FitData::operator= ( const FitData rhs)

Definition at line 216 of file FitData.cxx.

◆ Opt() [1/2]

const DataOptions& ROOT::Fit::FitData::Opt ( ) const
inline

access to options

Definition at line 319 of file FitData.h.

◆ Opt() [2/2]

DataOptions& ROOT::Fit::FitData::Opt ( )
inline

Definition at line 323 of file FitData.h.

◆ Range()

const DataRange& ROOT::Fit::FitData::Range ( ) const
inline

access to range

Definition at line 331 of file FitData.h.

◆ Size()

unsigned int ROOT::Fit::FitData::Size ( ) const
inline

return number of fit points

Definition at line 303 of file FitData.h.

◆ UnWrap()

void ROOT::Fit::FitData::UnWrap ( )
inlineprotected

Definition at line 346 of file FitData.h.

◆ VectorPadding()

static constexpr unsigned ROOT::Fit::FitData::VectorPadding ( const unsigned  )
inlinestaticprotected

If VecCore is not defined, there is no vectorization available and the SIMD vector size will always be one.

Then, as every number is a multiple of SIMD vector size, the padding will always be zero.

Definition at line 382 of file FitData.h.

Member Data Documentation

◆ fCoords

std::vector< std::vector< double > > ROOT::Fit::FitData::fCoords
private

This vector stores the vectorizable data: The inner vectors contain the coordinates data fCoords[0] is the vector for the x-coords fCoords[1] is the vector for the y-coords etc.

The vector of pointers stores the pointers to the first elements of the corresponding elements

If fWrapped is true, fCoords is empty. the data can only be accessed by using fCoordsPtr.

Definition at line 413 of file FitData.h.

◆ fCoordsPtr

std::vector< const double * > ROOT::Fit::FitData::fCoordsPtr
private

Definition at line 414 of file FitData.h.

◆ fDim

unsigned int ROOT::Fit::FitData::fDim
protected

Definition at line 396 of file FitData.h.

◆ fMaxPoints

unsigned int ROOT::Fit::FitData::fMaxPoints
protected

Definition at line 394 of file FitData.h.

◆ fNPoints

unsigned int ROOT::Fit::FitData::fNPoints
protected

Definition at line 395 of file FitData.h.

◆ fOptions

DataOptions ROOT::Fit::FitData::fOptions
private

Definition at line 390 of file FitData.h.

◆ fpTmpCoordVector

double* ROOT::Fit::FitData::fpTmpCoordVector
private

Definition at line 416 of file FitData.h.

◆ fRange

DataRange ROOT::Fit::FitData::fRange
private

Definition at line 391 of file FitData.h.

◆ fWrapped

bool ROOT::Fit::FitData::fWrapped
protected

Definition at line 386 of file FitData.h.

Libraries for ROOT::Fit::FitData:
[legend]

The documentation for this class was generated from the following files: