#include <DetDesc/AlignmentCondition.h>
Inheritance diagram for AlignmentCondition:
Public Types | |
DEFAULT | |
ALWAYS_VALID | |
FORCE_UPDATE | |
enum | UpdateModeFlag { DEFAULT, ALWAYS_VALID, FORCE_UPDATE } |
Possible stata of the update flag. More... | |
Public Member Functions | |
AlignmentCondition () | |
Standard constructor. | |
AlignmentCondition (const std::vector< double > &translation, const std::vector< double > &rotation, const std::vector< double > &pivot=std::vector< double >(3, 0.)) | |
virtual | ~AlignmentCondition () |
Destructor. | |
virtual StatusCode | initialize () |
This method initializes the condition. | |
virtual const CLID & | clID () const |
Class ID of this instance. | |
const Gaudi::Transform3D & | offNominalMatrix () const |
Return the nominal -> off-nominal 3D transformation. | |
const Gaudi::Transform3D & | toNominalMatrix () const |
Return the off-nominal -> nominal 3D transformation. | |
void | offNominalMatrix (const Gaudi::Transform3D &newMatrix) |
Set a nominal -> off-nomunal 3D transformation starting directly from from a Transform3D. | |
StatusCode | setOffNominalTransformation (const std::vector< double > &translation, const std::vector< double > &rotation, const std::vector< double > &pivot) |
Set a new nominal -> off-nominal 3D transformation starting from the basic set of parameters describing a rotation about the Z, Y' and X" axes in that order. | |
std::ostream & | fillStream (std::ostream &s) const |
Fill the output stream (ASCII). | |
virtual void | update (ValidDataObject &obj) |
Update using another ValidDataObject: deep copy all contents, except for the properties of a generic DataObject. | |
virtual StatusCode | update () |
Update the current object and all the useds one (children, references, etc) only if needed, of course. | |
virtual std::string | toXml (std::string name="", bool header=false, int precision=16) const |
Prepare an XML string representing the condition. | |
void | reset () |
Reset to the initial state. | |
bool | exists (const std::string &name) const |
Check if the parameter with the given name exists. | |
virtual const std::type_info & | type (const std::string &name) const |
TypeId of the parameter. | |
template<class T> | |
bool | is (const std::string &name) const |
Check the type of a parameter (commodity function). | |
bool | isVector (const std::string &name) const |
Check if the parameter is a vector. | |
virtual std::string | comment (const std::string &name) const |
Get the comment of a parameter. | |
virtual void | setComment (const std::string &name, const char *comm) |
Set the comment of a parameter. | |
template<class T> | |
const T & | param (const std::string &name) const |
Give a read-only accessor to a parameter. | |
template<class T> | |
T & | param (const std::string &name) |
Give a read/write accessor to a parameter. | |
template<class T> | |
const std::vector< T > & | paramVect (const std::string &name) const |
Give a read-only accessor to a parameter vector. | |
template<class T> | |
std::vector< T > & | paramVect (const std::string &name) |
Give a read/write accessor to a parameter vector. | |
virtual const std::string & | paramAsString (const std::string &name) const |
Get the value of a parameter, as a string. | |
virtual std::string & | paramAsString (const std::string &name) |
Get the value of a parameter, as a string (non const version). | |
virtual int | paramAsInt (const std::string &name) const |
Get the value of a parameter, as an int. | |
virtual double | paramAsDouble (const std::string &name) const |
Get the value of a parameter, as a double. | |
virtual const std::vector< std::string > & | paramAsStringVect (const std::string &name) const |
Get the value of a parameter, as a string. | |
virtual std::vector< std::string > & | paramAsStringVect (const std::string &name) |
Get the value of a parameter, as a string. | |
virtual const std::vector< int > & | paramAsIntVect (const std::string &name) const |
Get the value of a parameter, as an int. | |
virtual std::vector< int > & | paramAsIntVect (const std::string &name) |
Get the value of a parameter, as an int. | |
virtual const std::vector< double > & | paramAsDoubleVect (const std::string &name) const |
Get the value of a parameter, as a double. | |
virtual std::vector< double > & | paramAsDoubleVect (const std::string &name) |
Get the value of a parameter, as a double. | |
virtual std::vector< std::string > | paramNames () const |
Returns list of existing parameter vectors as a vector of their names. | |
virtual std::string | printParams () const |
Print the parameters on a string. | |
virtual std::string | paramToString (const std::string &name, int precision) const |
Convert a parameter to a string (for xml representation). | |
template<class T> | |
void | addParam (const std::string &name, const T &value, const std::string &comment=std::string()) |
void | addBasicParam (const std::string &name, const BasicParam *p, const std::string &comment=std::string()) |
virtual bool | isValid () const |
Check if the data object has a well defined validity range. | |
virtual bool | isValid (const Gaudi::Time &t) const |
Check if the data object is valid at the specified time. | |
virtual const Gaudi::Time & | validSince () const |
Get start of validity. | |
virtual const Gaudi::Time & | validTill () const |
Get end of validity. | |
virtual void | setValidity (const Gaudi::Time &since, const Gaudi::Time &till) |
Set validity range. | |
virtual void | setValiditySince (const Gaudi::Time &since) |
Set start of validity. | |
virtual void | setValidityTill (const Gaudi::Time &till) |
Set end of validity. | |
virtual const UpdateModeFlag & | updateMode () const |
Return the update mode: ValidDataObject::DEFAULT -> use the actual validity ValidDataObject::ALWAYS_VALID -> never update ValidDataObject::FORCE_UPDATE -> force an update even if still valid (then back to DEFAULT behaviour). | |
virtual void | setUpdateMode (UpdateModeFlag mode) |
Set the mode for update. | |
virtual void | defaultUpdateMode () |
virtual void | forceUpdateMode () |
virtual void | neverUpdateMode () |
void | setRegistry (IRegistry *pRegistry) |
IRegistry * | registry () const |
LinkManager * | linkMgr () const |
unsigned char | version () const |
void | setVersion (unsigned char vsn) |
unsigned long | refCount () const |
virtual unsigned long | addRef () |
virtual unsigned long | release () |
const std::string & | name () const |
virtual StreamBuffer & | serialize (StreamBuffer &s) |
virtual StreamBuffer & | serialize (StreamBuffer &s) const |
Static Public Member Functions | |
static const CLID & | classID () |
Class ID of this class. | |
Protected Member Functions | |
IMessageSvc * | msgSvc () const |
void | loadParams (const std::vector< double > &translation, const std::vector< double > &rotation, const std::vector< double > &pivot) |
virtual StatusCode | makeMatrices () |
void | updateParams () |
Protected Attributes | |
DetDesc::Services * | m_services |
Gaudi::Transform3D | m_matrix |
Gaudi::Transform3D | m_matrixInv |
The misaligned to aligned transformation matrix. | |
const std::string | m_translationString |
The aligned to misaligned transformation matrix. | |
const std::string | m_rotationString |
const std::string | m_pivotString |
Friends | |
friend std::ostream & | operator<< (std::ostream &s, const DataObject &obj) |
Definition at line 22 of file AlignmentCondition.h.
enum ValidDataObject::UpdateModeFlag [inherited] |
Possible stata of the update flag.
Definition at line 102 of file ValidDataObject.h.
00102 { 00103 DEFAULT, 00104 ALWAYS_VALID, 00105 FORCE_UPDATE 00106 };
AlignmentCondition::AlignmentCondition | ( | ) |
Standard constructor.
AlignmentCondition::AlignmentCondition | ( | const std::vector< double > & | translation, | |
const std::vector< double > & | rotation, | |||
const std::vector< double > & | pivot = std::vector< double >(3, 0.) | |||
) |
virtual AlignmentCondition::~AlignmentCondition | ( | ) | [virtual] |
Destructor.
virtual StatusCode AlignmentCondition::initialize | ( | ) | [virtual] |
This method initializes the condition.
It should be overridden and used for computation purposes. This is a kind of hook for adding user code easily in the initialization of a condition.
Reimplemented from Condition.
virtual const CLID& AlignmentCondition::clID | ( | ) | const [inline, virtual] |
Class ID of this instance.
Reimplemented from Condition.
Definition at line 38 of file AlignmentCondition.h.
00038 { return classID(); }
static const CLID& AlignmentCondition::classID | ( | ) | [inline, static] |
Class ID of this class.
Reimplemented from Condition.
Definition at line 40 of file AlignmentCondition.h.
00040 { return CLID_AlignmentCondition; };
const Gaudi::Transform3D& AlignmentCondition::offNominalMatrix | ( | ) | const [inline] |
Return the nominal -> off-nominal 3D transformation.
Definition at line 44 of file AlignmentCondition.h.
00045 { 00046 return m_matrixInv; 00047 }
const Gaudi::Transform3D& AlignmentCondition::toNominalMatrix | ( | ) | const [inline] |
Return the off-nominal -> nominal 3D transformation.
Definition at line 51 of file AlignmentCondition.h.
00052 { 00053 return m_matrix; 00054 }
void AlignmentCondition::offNominalMatrix | ( | const Gaudi::Transform3D & | newMatrix | ) |
Set a nominal -> off-nomunal 3D transformation starting directly from from a Transform3D.
newMatrix | new full transformation object describing nominal to off-nominal transformation in the frame of the detector element.. |
StatusCode AlignmentCondition::setOffNominalTransformation | ( | const std::vector< double > & | translation, | |
const std::vector< double > & | rotation, | |||
const std::vector< double > & | pivot | |||
) |
Set a new nominal -> off-nominal 3D transformation starting from the basic set of parameters describing a rotation about the Z, Y' and X" axes in that order.
translation | vector containing X,Y,Z translation parameters. | |
rotation | vector containing rotation angles about Z,Y,X. | |
pivot | vector containing X,Y,Z pivot point for rotation. |
std::ostream& AlignmentCondition::fillStream | ( | std::ostream & | s | ) | const [virtual] |
IMessageSvc* AlignmentCondition::msgSvc | ( | ) | const [protected] |
void AlignmentCondition::loadParams | ( | const std::vector< double > & | translation, | |
const std::vector< double > & | rotation, | |||
const std::vector< double > & | pivot | |||
) | [inline, protected] |
Definition at line 84 of file AlignmentCondition.h.
00087 { 00088 this->addParam(m_translationString, translation ); 00089 this->addParam(m_rotationString, rotation ); 00090 this->addParam(m_pivotString, pivot ); 00091 }
virtual StatusCode AlignmentCondition::makeMatrices | ( | ) | [protected, virtual] |
void AlignmentCondition::updateParams | ( | ) | [protected] |
virtual void Condition::update | ( | ValidDataObject & | obj | ) | [virtual, inherited] |
Update using another ValidDataObject: deep copy all contents, except for the properties of a generic DataObject.
Reimplemented from ParamValidDataObject.
virtual StatusCode ValidDataObject::update | ( | ) | [virtual, inherited] |
Update the current object and all the useds one (children, references, etc) only if needed, of course.
This method must be reimplemented for more complex objects.
virtual std::string Condition::toXml | ( | std::string | name = "" , |
|
bool | header = false , |
|||
int | precision = 16 | |||
) | const [virtual, inherited] |
Prepare an XML string representing the condition.
void ParamValidDataObject::reset | ( | ) | [inherited] |
bool ParamValidDataObject::exists | ( | const std::string & | name | ) | const [inherited] |
Check if the parameter with the given name exists.
virtual const std::type_info& ParamValidDataObject::type | ( | const std::string & | name | ) | const [virtual, inherited] |
TypeId of the parameter.
bool ParamValidDataObject::is | ( | const std::string & | name | ) | const [inline, inherited] |
Check the type of a parameter (commodity function).
Definition at line 58 of file ParamValidDataObject.h.
bool ParamValidDataObject::isVector | ( | const std::string & | name | ) | const [inherited] |
Check if the parameter is a vector.
virtual std::string ParamValidDataObject::comment | ( | const std::string & | name | ) | const [virtual, inherited] |
Get the comment of a parameter.
virtual void ParamValidDataObject::setComment | ( | const std::string & | name, | |
const char * | comm | |||
) | [virtual, inherited] |
Set the comment of a parameter.
const T& ParamValidDataObject::param | ( | const std::string & | name | ) | const [inline, inherited] |
Give a read-only accessor to a parameter.
Definition at line 73 of file ParamValidDataObject.h.
00073 { 00074 ParamList::const_iterator i = m_paramList.find(name); 00075 if ( i == m_paramList.end() ) throw ParamException(name); 00076 try { 00077 return i->second-> template get<T>(); 00078 } catch (std::bad_cast) { 00079 throw ParamException(name,typeid(T),i->second->type()); 00080 } 00081 }
T& ParamValidDataObject::param | ( | const std::string & | name | ) | [inline, inherited] |
Give a read/write accessor to a parameter.
Definition at line 85 of file ParamValidDataObject.h.
00085 { 00086 ParamList::iterator i = m_paramList.find(name); 00087 if ( i == m_paramList.end() ) throw ParamException(name); 00088 try { 00089 return i->second-> template get<T>(); 00090 } catch (std::bad_cast) { 00091 throw ParamException(name,typeid(T),i->second->type()); 00092 } 00093 }
const std::vector<T>& ParamValidDataObject::paramVect | ( | const std::string & | name | ) | const [inline, inherited] |
Give a read-only accessor to a parameter vector.
Definition at line 97 of file ParamValidDataObject.h.
00097 { 00098 return param<std::vector<T> >(name); 00099 }
std::vector<T>& ParamValidDataObject::paramVect | ( | const std::string & | name | ) | [inline, inherited] |
Give a read/write accessor to a parameter vector.
Definition at line 103 of file ParamValidDataObject.h.
00103 { 00104 return param<std::vector<T> >(name); 00105 }
virtual const std::string& ParamValidDataObject::paramAsString | ( | const std::string & | name | ) | const [virtual, inherited] |
Get the value of a parameter, as a string.
virtual std::string& ParamValidDataObject::paramAsString | ( | const std::string & | name | ) | [virtual, inherited] |
Get the value of a parameter, as a string (non const version).
virtual int ParamValidDataObject::paramAsInt | ( | const std::string & | name | ) | const [virtual, inherited] |
Get the value of a parameter, as an int.
virtual double ParamValidDataObject::paramAsDouble | ( | const std::string & | name | ) | const [virtual, inherited] |
Get the value of a parameter, as a double.
virtual const std::vector<std::string>& ParamValidDataObject::paramAsStringVect | ( | const std::string & | name | ) | const [virtual, inherited] |
Get the value of a parameter, as a string.
virtual std::vector<std::string>& ParamValidDataObject::paramAsStringVect | ( | const std::string & | name | ) | [virtual, inherited] |
Get the value of a parameter, as a string.
virtual const std::vector<int>& ParamValidDataObject::paramAsIntVect | ( | const std::string & | name | ) | const [virtual, inherited] |
Get the value of a parameter, as an int.
virtual std::vector<int>& ParamValidDataObject::paramAsIntVect | ( | const std::string & | name | ) | [virtual, inherited] |
Get the value of a parameter, as an int.
virtual const std::vector<double>& ParamValidDataObject::paramAsDoubleVect | ( | const std::string & | name | ) | const [virtual, inherited] |
Get the value of a parameter, as a double.
virtual std::vector<double>& ParamValidDataObject::paramAsDoubleVect | ( | const std::string & | name | ) | [virtual, inherited] |
Get the value of a parameter, as a double.
virtual std::vector<std::string> ParamValidDataObject::paramNames | ( | ) | const [virtual, inherited] |
Returns list of existing parameter vectors as a vector of their names.
virtual std::string ParamValidDataObject::printParams | ( | ) | const [virtual, inherited] |
Print the parameters on a string.
virtual std::string ParamValidDataObject::paramToString | ( | const std::string & | name, | |
int | precision | |||
) | const [virtual, inherited] |
Convert a parameter to a string (for xml representation).
void ParamValidDataObject::addParam | ( | const std::string & | name, | |
const T & | value, | |||
const std::string & | comment = std::string() | |||
) | [inline, inherited] |
Definition at line 149 of file ParamValidDataObject.h.
00149 { 00150 m_paramList.add(name,value); 00151 if (!comment.empty()) { 00152 m_comments[name] = comment; 00153 } 00154 }
void ParamValidDataObject::addBasicParam | ( | const std::string & | name, | |
const BasicParam * | p, | |||
const std::string & | comment = std::string() | |||
) | [inline, inherited] |
Definition at line 156 of file ParamValidDataObject.h.
00156 { 00157 m_paramList.addBasicParam(name,p); 00158 if (!comment.empty()) { 00159 m_comments[name] = comment; 00160 } 00161 }
virtual bool ValidDataObject::isValid | ( | ) | const [virtual, inherited] |
virtual bool ValidDataObject::isValid | ( | const Gaudi::Time & | t | ) | const [virtual, inherited] |
virtual const Gaudi::Time& ValidDataObject::validSince | ( | ) | const [virtual, inherited] |
virtual const Gaudi::Time& ValidDataObject::validTill | ( | ) | const [virtual, inherited] |
virtual void ValidDataObject::setValidity | ( | const Gaudi::Time & | since, | |
const Gaudi::Time & | till | |||
) | [virtual, inherited] |
virtual void ValidDataObject::setValiditySince | ( | const Gaudi::Time & | since | ) | [virtual, inherited] |
virtual void ValidDataObject::setValidityTill | ( | const Gaudi::Time & | till | ) | [virtual, inherited] |
virtual const UpdateModeFlag& ValidDataObject::updateMode | ( | ) | const [virtual, inherited] |
Return the update mode: ValidDataObject::DEFAULT -> use the actual validity
ValidDataObject::ALWAYS_VALID -> never update ValidDataObject::FORCE_UPDATE -> force an update even if still valid (then back to DEFAULT behaviour).
virtual void ValidDataObject::setUpdateMode | ( | UpdateModeFlag | mode | ) | [virtual, inherited] |
Set the mode for update.
virtual void ValidDataObject::defaultUpdateMode | ( | ) | [virtual, inherited] |
virtual void ValidDataObject::forceUpdateMode | ( | ) | [virtual, inherited] |
virtual void ValidDataObject::neverUpdateMode | ( | ) | [virtual, inherited] |
DetDesc::Services* AlignmentCondition::m_services [protected] |
Definition at line 98 of file AlignmentCondition.h.
Gaudi::Transform3D AlignmentCondition::m_matrix [protected] |
Definition at line 100 of file AlignmentCondition.h.
Gaudi::Transform3D AlignmentCondition::m_matrixInv [protected] |
The misaligned to aligned transformation matrix.
Definition at line 101 of file AlignmentCondition.h.
const std::string AlignmentCondition::m_translationString [protected] |
The aligned to misaligned transformation matrix.
Definition at line 103 of file AlignmentCondition.h.
const std::string AlignmentCondition::m_rotationString [protected] |
Definition at line 104 of file AlignmentCondition.h.
const std::string AlignmentCondition::m_pivotString [protected] |
Definition at line 105 of file AlignmentCondition.h.