CMS 3D CMS Logo

Public Member Functions | Public Attributes

DDCompareBoolSol Struct Reference

Needs to know because of Rotation Matrix of Boolean Relationship. More...

#include <DDCompareTools.h>

Inheritance diagram for DDCompareBoolSol:
binary_function

List of all members.

Public Member Functions

 DDCompareBoolSol ()
 DDCompareBoolSol (const DDCompOptions &ddco)
bool operator() (const DDBooleanSolid &lhs, const DDBooleanSolid &rhs) const

Public Attributes

DDCompOptions ddco_

Detailed Description

Needs to know because of Rotation Matrix of Boolean Relationship.

Definition at line 68 of file DDCompareTools.h.


Constructor & Destructor Documentation

DDCompareBoolSol::DDCompareBoolSol ( )

Definition at line 311 of file DDCompareTools.cc.

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

Definition at line 313 of file DDCompareTools.cc.

: ddco_(ddco) { }

Member Function Documentation

bool DDCompareBoolSol::operator() ( const DDBooleanSolid lhs,
const DDBooleanSolid rhs 
) const

Definition at line 314 of file DDCompareTools.cc.

References gather_cfg::cout, ddco_, DDCompOptions::distTol_, DDName::fullname(), DDBase< N, C >::name(), DDSolid::parameters(), run_regression::ret, DDBooleanSolid::rotation(), DDSolid::shape(), DDBooleanSolid::solidA(), DDBooleanSolid::solidB(), and DDBooleanSolid::translation().

                                                                                               {
  bool ret(true);
  if ( lhs.name().fullname() != rhs.name().fullname() ) {
    ret = false;
    std::cout << "BooleanSolid names do not match ";
  } else if ( lhs.shape() != rhs.shape() ) {
    ret = false;
    std::cout << "BooleanSolid shape types do not match ";
  } else if ( ! DDCompareDBLVEC(ddco_.distTol_)(lhs.parameters(), rhs.parameters()) ) {
    ret = false;
    std::cout << "BooleanSolid parameters do not match ";
  } else if ( ! DDCompareSolid(ddco_)(lhs.solidA(), rhs.solidA()) ) {
    ret = false;
    std::cout << "BooleanSolid SolidA solids do not match ";
  } else if ( ! DDCompareSolid(ddco_)(lhs.solidB(), rhs.solidB()) ) {
    ret= false;
    std::cout << "BooleanSolid SolidB solids do not match ";
  } else if ( ! DDCompareDDTrans(ddco_.distTol_)(lhs.translation(), rhs.translation()) ) {
    ret = false;
    std::cout << "BooleanSolid Translations do not match ";
  } else if ( ! DDCompareDDRot(ddco_)(lhs.rotation(), rhs.rotation()) ) {
    ret = false;
    std::cout << "BooleanSolid Rotations do not match ";
  }
  if ( ! ret ) {
    std::cout << "for boolean solids " 
              << lhs.name().fullname() << " and " 
              << rhs.name().fullname() << std::endl;
  }
  return ret;
}

Member Data Documentation

Definition at line 72 of file DDCompareTools.h.

Referenced by operator()().