#include <AlignmentParametersData.h>
Public Types | |
typedef ReferenceCountingPointer < AlignmentParametersData > | DataContainer |
Public Member Functions | |
AlignmentParametersData (void) | |
Default constructor. | |
AlignmentParametersData (AlgebraicVector *param, AlgebraicSymMatrix *cov, std::vector< bool > *sel) | |
AlignmentParametersData (AlgebraicVector *param, AlgebraicSymMatrix *cov) | |
AlignmentParametersData (const AlgebraicVector ¶m, const AlgebraicSymMatrix &cov) | |
Constructor from parameters vector and covariance matrix. | |
AlignmentParametersData (const AlgebraicVector ¶m, const AlgebraicSymMatrix &cov, const std::vector< bool > &sel) | |
Constructor from parameters vector, covariance matrix and selection vector. | |
void | checkConsistency (void) const |
const AlgebraicSymMatrix & | covariance (void) const |
Access to the covariance matrix. | |
int | numSelected (void) |
Access to the number of selected parameters. | |
const AlgebraicVector & | parameters (void) const |
Access to the parameter vector. | |
const std::vector< bool > & | selector (void) const |
Access to the selection vector. | |
~AlignmentParametersData (void) | |
Private Attributes | |
AlgebraicSymMatrix * | theCovariance |
int | theNumSelected |
AlgebraicVector * | theParameters |
std::vector< bool > * | theSelector |
Definition at line 7 of file AlignmentParametersData.h.
Definition at line 12 of file AlignmentParametersData.h.
AlignmentParametersData::AlignmentParametersData | ( | void | ) |
Default constructor.
Definition at line 9 of file AlignmentParametersData.cc.
: theParameters( new AlgebraicVector() ), theCovariance( new AlgebraicSymMatrix() ), theSelector( new std::vector<bool>() ), theNumSelected( 0 ) {}
AlignmentParametersData::AlignmentParametersData | ( | AlgebraicVector * | param, |
AlgebraicSymMatrix * | cov, | ||
std::vector< bool > * | sel | ||
) |
Constructor from parameters vector, covariance matrix and selection vector. NOTE: The input data must live on the heap and must not be deleted by the user.
Definition at line 17 of file AlignmentParametersData.cc.
References theNumSelected, and theSelector.
: theParameters( param ), theCovariance( cov ), theSelector( sel ) { theNumSelected = std::count_if( theSelector->begin(), theSelector->end(), std::bind2nd( std::equal_to<bool>(), true ) ); }
AlignmentParametersData::AlignmentParametersData | ( | const AlgebraicVector & | param, |
const AlgebraicSymMatrix & | cov, | ||
const std::vector< bool > & | sel | ||
) |
Constructor from parameters vector, covariance matrix and selection vector.
Definition at line 30 of file AlignmentParametersData.cc.
References theNumSelected, and theSelector.
: theParameters( new AlgebraicVector( param ) ), theCovariance( new AlgebraicSymMatrix( cov ) ), theSelector( new std::vector<bool>( sel ) ) { theNumSelected = std::count_if( theSelector->begin(), theSelector->end(), std::bind2nd( std::equal_to<bool>(), true ) ); }
AlignmentParametersData::AlignmentParametersData | ( | AlgebraicVector * | param, |
AlgebraicSymMatrix * | cov | ||
) |
Constructor from parameters vector and covariance matrix. NOTE: The input data must live on the heap and must not be deleted by the user.
Definition at line 43 of file AlignmentParametersData.cc.
: theParameters( param ), theCovariance( cov ), theSelector( new std::vector<bool>( param->num_row(), true ) ), theNumSelected( param->num_row() ) {}
AlignmentParametersData::AlignmentParametersData | ( | const AlgebraicVector & | param, |
const AlgebraicSymMatrix & | cov | ||
) |
Constructor from parameters vector and covariance matrix.
Definition at line 52 of file AlignmentParametersData.cc.
: theParameters( new AlgebraicVector( param ) ), theCovariance( new AlgebraicSymMatrix( cov ) ), theSelector( new std::vector<bool>( param.num_row(), true ) ), theNumSelected( param.num_row() ) {}
AlignmentParametersData::~AlignmentParametersData | ( | void | ) |
Definition at line 61 of file AlignmentParametersData.cc.
References theCovariance, theParameters, and theSelector.
{ delete theParameters; delete theCovariance; delete theSelector; }
void AlignmentParametersData::checkConsistency | ( | void | ) | const |
Check if the size of the parameters vector, the size of the covariance matrix, the size of the selector and the number of selected parameters is consistent. An exception of type "LogicError" is thrown in case of any inconsistencies.
Definition at line 69 of file AlignmentParametersData.cc.
References Exception, theCovariance, theParameters, and theSelector.
{ int selectorSize = static_cast<int>( theSelector->size() ); int paramSize = theParameters->num_row(); int covSize = theCovariance->num_row(); if ( ( paramSize != covSize ) || ( paramSize != selectorSize ) ) throw cms::Exception("LogicError") << "@SUB=AlignmentParametersData::checkConsistency " << "\nSize mismatch: parameter size = " << paramSize << ", covariance size = " << covSize << ", selector size = " << selectorSize << "."; }
const AlgebraicSymMatrix& AlignmentParametersData::covariance | ( | void | ) | const [inline] |
Access to the covariance matrix.
Definition at line 43 of file AlignmentParametersData.h.
References theCovariance.
{ return *theCovariance; }
int AlignmentParametersData::numSelected | ( | void | ) | [inline] |
Access to the number of selected parameters.
Definition at line 49 of file AlignmentParametersData.h.
References theNumSelected.
{ return theNumSelected; }
const AlgebraicVector& AlignmentParametersData::parameters | ( | void | ) | const [inline] |
Access to the parameter vector.
Definition at line 40 of file AlignmentParametersData.h.
References theParameters.
{ return *theParameters; }
const std::vector<bool>& AlignmentParametersData::selector | ( | void | ) | const [inline] |
Access to the selection vector.
Definition at line 46 of file AlignmentParametersData.h.
References theSelector.
{ return *theSelector; }
Definition at line 59 of file AlignmentParametersData.h.
Referenced by checkConsistency(), covariance(), and ~AlignmentParametersData().
int AlignmentParametersData::theNumSelected [private] |
Definition at line 61 of file AlignmentParametersData.h.
Referenced by AlignmentParametersData(), and numSelected().
Definition at line 58 of file AlignmentParametersData.h.
Referenced by checkConsistency(), parameters(), and ~AlignmentParametersData().
std::vector<bool>* AlignmentParametersData::theSelector [private] |
Definition at line 60 of file AlignmentParametersData.h.
Referenced by AlignmentParametersData(), checkConsistency(), selector(), and ~AlignmentParametersData().