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 374 of file DDCompareTools.cc.

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

Definition at line 376 of file DDCompareTools.cc.

376 : ddco_(ddco) { }
DDCompOptions ddco_

Member Function Documentation

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

Definition at line 378 of file DDCompareTools.cc.

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

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

Member Data Documentation

DDCompOptions DDCompareDDRot::ddco_

Definition at line 97 of file DDCompareTools.h.

Referenced by operator()().