CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes
DDCompareDDRot Struct Reference

Allows to compare name or not. If not, compares only values of the rotation matrix. More...

#include <DDCompareTools.h>

Inheritance diagram for DDCompareDDRot:

Public Member Functions

 DDCompareDDRot ()
 
 DDCompareDDRot (const DDCompOptions &ddco)
 
bool operator() (const DDRotation &lhs, const DDRotation &rhs) const
 

Public Attributes

DDCompOptions ddco_
 

Detailed Description

Allows to compare name or not. If not, compares only values of the rotation matrix.

Definition at line 83 of file DDCompareTools.h.

Constructor & Destructor Documentation

DDCompareDDRot::DDCompareDDRot ( )

Definition at line 360 of file DDCompareTools.cc.

360 : ddco_() { }
DDCompOptions ddco_
DDCompareDDRot::DDCompareDDRot ( const DDCompOptions ddco)

Definition at line 362 of file DDCompareTools.cc.

362 : ddco_(ddco) { }
DDCompOptions ddco_

Member Function Documentation

bool DDCompareDDRot::operator() ( const DDRotation lhs,
const DDRotation rhs 
) const

Definition at line 364 of file DDCompareTools.cc.

References DDCompOptions::compRotName_, gather_cfg::cout, ddco_, DDName::fullname(), DDBase< N, C >::name(), run_regression::ret, and DDRotation::rotation().

364  {
365  bool ret(true);
366  if ( ddco_.compRotName_ && lhs.name().fullname() != rhs.name().fullname() ) {
367  ret = false;
368  std::cout << "DDRotation names do not match "
369  << lhs.name().fullname() << " and "
370  << rhs.name().fullname() << std::endl;
371  } else if ( ! DDCompareDDRotMat()(*lhs.rotation(), *rhs.rotation()) ) {
372  ret = false;
373  std::cout << "DDRotationMatrix values do not match "
374  << lhs.name().fullname() << " and "
375  << rhs.name().fullname() << std::endl;
376  }
377  return ret;
378 }
const DDRotationMatrix * rotation() const
Returns the read-only rotation-matrix.
Definition: DDTransform.h:90
const N & name() const
Definition: DDBase.h:78
DDCompOptions ddco_
const std::string fullname() const
Definition: DDName.h:51
tuple cout
Definition: gather_cfg.py:121

Member Data Documentation

DDCompOptions DDCompareDDRot::ddco_

Definition at line 87 of file DDCompareTools.h.

Referenced by operator()().