CMS 3D CMS Logo

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 93 of file DDCompareTools.h.

Constructor & Destructor Documentation

DDCompareDDRot::DDCompareDDRot ( )

Definition at line 375 of file DDCompareTools.cc.

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

Definition at line 377 of file DDCompareTools.cc.

377 : ddco_(ddco) { }
DDCompOptions ddco_

Member Function Documentation

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

Definition at line 379 of file DDCompareTools.cc.

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

379  {
380  bool ret(true);
381  if ( ddco_.compRotName_ && lhs.name().fullname() != rhs.name().fullname() ) {
382  ret = false;
383  std::cout << "DDRotation names do not match "
384  << lhs.name().fullname() << " and "
385  << rhs.name().fullname() << std::endl;
386  } else if ( ! DDCompareDDRotMat()(*lhs.rotation(), *rhs.rotation()) ) {
387  ret = false;
388  std::cout << "DDRotationMatrix values do not match "
389  << lhs.name().fullname() << " and "
390  << rhs.name().fullname() << std::endl;
391  }
392  return ret;
393 }
const DDRotationMatrix * rotation() const
Returns the read-only rotation-matrix.
Definition: DDTransform.h:91
const N & name() const
Definition: DDBase.h:78
DDCompOptions ddco_
const std::string fullname() const
Definition: DDName.h:52

Member Data Documentation

DDCompOptions DDCompareDDRot::ddco_

Definition at line 97 of file DDCompareTools.h.

Referenced by operator()().