test
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
DDCompareBoolSol Struct Reference

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

#include <DDCompareTools.h>

Inheritance diagram for DDCompareBoolSol:

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.

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

Definition at line 313 of file DDCompareTools.cc.

313 : ddco_(ddco) { }
DDCompOptions 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().

314  {
315  bool ret(true);
316  if ( lhs.name().fullname() != rhs.name().fullname() ) {
317  ret = false;
318  std::cout << "BooleanSolid names do not match ";
319  } else if ( lhs.shape() != rhs.shape() ) {
320  ret = false;
321  std::cout << "BooleanSolid shape types do not match ";
322  } else if ( ! DDCompareDBLVEC(ddco_.distTol_)(lhs.parameters(), rhs.parameters()) ) {
323  ret = false;
324  std::cout << "BooleanSolid parameters do not match ";
325  } else if ( ! DDCompareSolid(ddco_)(lhs.solidA(), rhs.solidA()) ) {
326  ret = false;
327  std::cout << "BooleanSolid SolidA solids do not match ";
328  } else if ( ! DDCompareSolid(ddco_)(lhs.solidB(), rhs.solidB()) ) {
329  ret= false;
330  std::cout << "BooleanSolid SolidB solids do not match ";
331  } else if ( ! DDCompareDDTrans(ddco_.distTol_)(lhs.translation(), rhs.translation()) ) {
332  ret = false;
333  std::cout << "BooleanSolid Translations do not match ";
334  } else if ( ! DDCompareDDRot(ddco_)(lhs.rotation(), rhs.rotation()) ) {
335  ret = false;
336  std::cout << "BooleanSolid Rotations do not match ";
337  }
338  if ( ! ret ) {
339  std::cout << "for boolean solids "
340  << lhs.name().fullname() << " and "
341  << rhs.name().fullname() << std::endl;
342  }
343  return ret;
344 }
const std::vector< double > & parameters(void) const
Give the parameters of the solid.
Definition: DDSolid.cc:150
const N & name() const
Definition: DDBase.h:82
Needs to know about rotmat because of BooleanSolid.
DDTranslation translation(void) const
Definition: DDSolid.cc:540
DDSolid solidB(void) const
Definition: DDSolid.cc:550
DDRotation rotation(void) const
Definition: DDSolid.cc:535
const std::string fullname() const
Definition: DDName.h:56
DDSolidShape shape(void) const
The type of the solid.
Definition: DDSolid.cc:144
DDCompOptions ddco_
DDSolid solidA(void) const
Definition: DDSolid.cc:545
Allows to compare name or not. If not, compares only values of the rotation matrix.
tuple cout
Definition: gather_cfg.py:121

Member Data Documentation

DDCompOptions DDCompareBoolSol::ddco_

Definition at line 72 of file DDCompareTools.h.

Referenced by operator()().