CMS 3D CMS Logo

Public Member Functions | Public Attributes

DDCompareLP Struct Reference

LogicalParts have solids which could be BooleanSolids. More...

#include <DDCompareTools.h>

Inheritance diagram for DDCompareLP:
binary_function

List of all members.

Public Member Functions

 DDCompareLP ()
 DDCompareLP (const DDCompOptions &ddco)
bool operator() (const DDLogicalPart &lhs, const DDLogicalPart &rhs) const

Public Attributes

DDCompOptions ddco_

Detailed Description

LogicalParts have solids which could be BooleanSolids.

This means they need to know if the DDRotation naems matter.

Definition at line 45 of file DDCompareTools.h.


Constructor & Destructor Documentation

DDCompareLP::DDCompareLP ( )

Definition at line 189 of file DDCompareTools.cc.

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

Definition at line 191 of file DDCompareTools.cc.

: ddco_(ddco) { }

Member Function Documentation

bool DDCompareLP::operator() ( const DDLogicalPart lhs,
const DDLogicalPart rhs 
) const

Definition at line 193 of file DDCompareTools.cc.

References gather_cfg::cout, ddco_, DDName::fullname(), DDBase< N, C >::name(), run_regression::ret, and DDLogicalPart::solid().

                                                                                     {
  bool ret(true);
  // for a logical part to be equal, the solid must be equal and the name must be equal.
  if ( lhs.name().fullname() != rhs.name().fullname() ) {
    ret = false;
    std::cout << "LogicalPart names do not match " << lhs.name().fullname() 
              << " and " << rhs.name().fullname() << std::endl;
  } else if ( ! DDCompareSolid(ddco_)(lhs.solid(), rhs.solid()) ){
    ret = false;
    std::cout << "LogicalPart Solids do not match " << lhs.name().fullname() 
              << " and " << rhs.name().fullname() << std::endl;
  }
  return ret;
}

Member Data Documentation

Definition at line 49 of file DDCompareTools.h.

Referenced by operator()().