ATLAS Offline Software
|
#include <EMAPMatrix.h>
Public Member Functions | |
EMAPMatrix () | |
Default constructor. More... | |
EMAPMatrix (const std::vector< EMAPMatrixAxis > &axes, const std::string &textDescription) | |
Constructor with std::vector of axes to define dimensions and binnging of this matrix. More... | |
EMAPMatrix (const EMAPMatrix &ob)=default | |
Constructor with std::vector of axes to define dimensions and binnging of this matrix. More... | |
~EMAPMatrix () | |
Default destructor. More... | |
EMAPMatrix & | operator= (const EMAPMatrix &ob)=default |
Operator = Overload. More... | |
StatusCode | setupMatrix (std::vector< EMAPMatrixAxis > axes) |
Setup Matrix via given std::vector of EMAPMatrixAxis objects. More... | |
StatusCode | setBinContent (double x, T value) |
Set Bin-content to "T" in bin which corresponds to value "x". More... | |
StatusCode | setBinContent (double x, double y, T value) |
Set Bin-content to "T" in bin which corresponds to value "x" and "y". More... | |
StatusCode | setBinContent (double x, double y, double z, T value) |
Set Bin-content to "T" in bin which corresponds to value "x,y,z". More... | |
StatusCode | setBinContent (double x, double y, double z, double u, T value) |
Set Bin-content to "T" in bin which corresponds to value "x,y,z,u". More... | |
StatusCode | setBinContent (double x, double y, double z, double u, double v, T value) |
Set Bin-content to "T" in bin which corresponds to value "x,y,z,u,v". More... | |
StatusCode | setBinContent (const std::vector< double > &x, T value) |
Set Bin-content to "T" in bin which corresponds to value std::vector x. More... | |
const T * | getBinContent (double x) const |
Get Bin-content to "T" in bin which corresponds to value "x". More... | |
const T * | getBinContent (double x, double y) const |
Get Bin-content to "T" in bin which corresponds to value "x,y". More... | |
const T * | getBinContent (double x, double y, double z) const |
Get Bin-content to "T" in bin which corresponds to value "x,y,z". More... | |
const T * | getBinContent (double x, double y, double z, double u) const |
Get Bin-content to "T" in bin which corresponds to value "x,y,z,u". More... | |
const T * | getBinContent (double x, double y, double z, double u, double v) const |
Get Bin-content to "T" in bin which corresponds to value "x,y,z,u,v". More... | |
const T * | getBinContent (const std::vector< double > &x) const |
Get Bin-content to "T" in bin which corresponds to value std::vector x. More... | |
int | getDimensions () const |
Return status code of last operations. More... | |
EMAPMatrixAxis | getAxis (unsigned int i) const |
const std::vector< T > & | getValues () const |
return the std::vector<T> which contains all content information of the matrix. More... | |
void | clear () |
Clear all Matrix information (Also binning,...) More... | |
void | clearEntries () |
Clear Matrix content but not binning, dimensions and axis. More... | |
bool | isInRange (const std::vector< double > &x) const |
void | setTextDescription (const std::string &text) |
The user can add a Description of what this matrix contains and how it was produced, e.g. More... | |
const std::string & | getTextDescription () const |
The user can add a Description of what this matrix contains and how it was produced, e.g. More... | |
Protected Member Functions | |
StatusCode | setupEntries () |
Description of the content of this matrix. More... | |
unsigned int | Index (const std::vector< unsigned int > &x) const |
std::vector< unsigned int > | Index (unsigned int id) |
Protected Attributes | |
unsigned int | m_dimensions |
std::vector< EMAPMatrixAxis > | m_axis |
std::vector< T > | m_matrix |
std::vector< unsigned int > | m_base |
representation of the content of matrix More... | |
std::string | m_textDescription |
helper object which is used to "convert" the 1dim m_matrix into a n-dimensional object More... | |
The EMAPMatrix class is a templete class which was design to represent a sort of a n-dimensional Histogram. Each entry of the matrix must provide a copy constructor and a addition function. It is based on APMatrix in InsituPerformance, by Matthias Schott, but simplified to remove dependencies and features not used. (EMClusterErrors is not additive, so all the addition routines are removed.)
Definition at line 71 of file EMAPMatrix.h.
EMAPMatrix< T >::EMAPMatrix | ( | ) |
Default constructor.
EMAPMatrix< T >::EMAPMatrix | ( | const std::vector< EMAPMatrixAxis > & | axes, |
const std::string & | textDescription | ||
) |
Constructor with std::vector of axes to define dimensions and binnging of this matrix.
axes | std::vector of EMAPMatrixAxis objects |
|
default |
Constructor with std::vector of axes to define dimensions and binnging of this matrix.
axes | std::vector of EMAPMatrixAxis objects @emptyObject: Standard object which is used to fill the matrix if it is supposed to be empty/cleaned Copy constructor |
EMAPMatrix< T >::~EMAPMatrix | ( | ) |
Default destructor.
void EMAPMatrix< T >::clear | ( | ) |
Clear all Matrix information (Also binning,...)
void EMAPMatrix< T >::clearEntries | ( | ) |
Clear Matrix content but not binning, dimensions and axis.
|
inline |
Definition at line 168 of file EMAPMatrix.h.
const T* EMAPMatrix< T >::getBinContent | ( | const std::vector< double > & | x | ) | const |
Get Bin-content to "T" in bin which corresponds to value std::vector x.
Can only used for n-dimensional matrix if the length of the std::vector x ind n.
x | std::vector of length n which represents the values on all axes |
T | value which should be recieved |
const T* EMAPMatrix< T >::getBinContent | ( | double | x | ) | const |
Get Bin-content to "T" in bin which corresponds to value "x".
Can only used for 1-dimensional matrix
x | value on x-axis |
T | value which is received |
const T* EMAPMatrix< T >::getBinContent | ( | double | x, |
double | y | ||
) | const |
Get Bin-content to "T" in bin which corresponds to value "x,y".
Can only used for 2-dimensional matrix
x | value on x-axis |
y | value on y-axis |
T | value which is received |
const T* EMAPMatrix< T >::getBinContent | ( | double | x, |
double | y, | ||
double | z | ||
) | const |
Get Bin-content to "T" in bin which corresponds to value "x,y,z".
Can only used for 3-dimensional matrix
x | value on x-axis |
y | value on y-axis |
z | value on z-axis |
T | value which is received |
const T* EMAPMatrix< T >::getBinContent | ( | double | x, |
double | y, | ||
double | z, | ||
double | u | ||
) | const |
Get Bin-content to "T" in bin which corresponds to value "x,y,z,u".
Can only used for 4-dimensional matrix
const T* EMAPMatrix< T >::getBinContent | ( | double | x, |
double | y, | ||
double | z, | ||
double | u, | ||
double | v | ||
) | const |
Get Bin-content to "T" in bin which corresponds to value "x,y,z,u,v".
Can only used for 5-dimensional matrix
|
inline |
Return status code of last operations.
Some access operations might have failed. In this case, the statusCode is set to false Return number of dimensions of this matrix
Definition at line 165 of file EMAPMatrix.h.
const std::string& EMAPMatrix< T >::getTextDescription | ( | ) | const |
The user can add a Description of what this matrix contains and how it was produced, e.g.
cuts
|
inline |
return the std::vector<T> which contains all content information of the matrix.
Note that the binning and dimensions is not coded inside
Definition at line 171 of file EMAPMatrix.h.
|
protected |
|
protected |
bool EMAPMatrix< T >::isInRange | ( | const std::vector< double > & | x | ) | const |
|
default |
Operator = Overload.
StatusCode EMAPMatrix< T >::setBinContent | ( | const std::vector< double > & | x, |
T | value | ||
) |
Set Bin-content to "T" in bin which corresponds to value std::vector x.
Can only used for n-dimensional matrix if the length of the std::vector x ind n.
x | std::vector of length n which represents the values on all axes |
T | value which should be set |
StatusCode EMAPMatrix< T >::setBinContent | ( | double | x, |
double | y, | ||
double | z, | ||
double | u, | ||
double | v, | ||
T | value | ||
) |
Set Bin-content to "T" in bin which corresponds to value "x,y,z,u,v".
Can only used for 5-dimensional matrix
StatusCode EMAPMatrix< T >::setBinContent | ( | double | x, |
double | y, | ||
double | z, | ||
double | u, | ||
T | value | ||
) |
Set Bin-content to "T" in bin which corresponds to value "x,y,z,u".
Can only used for 4-dimensional matrix
StatusCode EMAPMatrix< T >::setBinContent | ( | double | x, |
double | y, | ||
double | z, | ||
T | value | ||
) |
Set Bin-content to "T" in bin which corresponds to value "x,y,z".
Can only used for 3-dimensional matrix
x | value on x-axis |
y | value on y-axis |
z | value on z-axis |
T | value which should be set |
StatusCode EMAPMatrix< T >::setBinContent | ( | double | x, |
double | y, | ||
T | value | ||
) |
Set Bin-content to "T" in bin which corresponds to value "x" and "y".
Can only used for 2-dimensional matrix
x | value on x-axis |
y | value on y-axis |
T | value which should be set |
StatusCode EMAPMatrix< T >::setBinContent | ( | double | x, |
T | value | ||
) |
Set Bin-content to "T" in bin which corresponds to value "x".
Can only used for 1-dimensional matrix
x | value on x-axis |
T | value which should be set |
void EMAPMatrix< T >::setTextDescription | ( | const std::string & | text | ) |
The user can add a Description of what this matrix contains and how it was produced, e.g.
cuts
|
protected |
Description of the content of this matrix.
StatusCode EMAPMatrix< T >::setupMatrix | ( | std::vector< EMAPMatrixAxis > | axes | ) |
Setup Matrix via given std::vector of EMAPMatrixAxis objects.
|
protected |
Definition at line 193 of file EMAPMatrix.h.
|
protected |
representation of the content of matrix
Definition at line 196 of file EMAPMatrix.h.
|
protected |
Definition at line 191 of file EMAPMatrix.h.
|
protected |
Definition at line 195 of file EMAPMatrix.h.
|
protected |
helper object which is used to "convert" the 1dim m_matrix into a n-dimensional object
Definition at line 197 of file EMAPMatrix.h.