CMS 3D CMS Logo

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:
binary_function

List of all members.

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.

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

Definition at line 362 of file DDCompareTools.cc.

: ddco_(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(), runTheMatrix::ret, and DDRotation::rotation().

                                                                                     {
  bool ret(true);
  if ( ddco_.compRotName_ && lhs.name().fullname() != rhs.name().fullname() ) {
    ret = false;
    std::cout << "DDRotation names do not match " 
              << lhs.name().fullname() << " and " 
              << rhs.name().fullname() << std::endl;
  } else if ( ! DDCompareDDRotMat()(*lhs.rotation(), *rhs.rotation()) ) {
    ret = false;
    std::cout << "DDRotationMatrix values do not match " 
              << lhs.name().fullname() << " and " 
              << rhs.name().fullname() << std::endl;
  }
  return ret;
}

Member Data Documentation

Definition at line 87 of file DDCompareTools.h.

Referenced by operator()().