CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
DDCompareLP Struct Reference

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

#include <DDCompareTools.h>

Inheritance diagram for DDCompareLP:

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 55 of file DDCompareTools.h.

Constructor & Destructor Documentation

DDCompareLP::DDCompareLP ( )

Definition at line 148 of file DDCompareTools.cc.

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

Definition at line 150 of file DDCompareTools.cc.

150 : ddco_(ddco) { }
DDCompOptions ddco_

Member Function Documentation

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

Definition at line 152 of file DDCompareTools.cc.

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

152  {
153  bool ret(true);
154  // for a logical part to be equal, the solid must be equal and the name must be equal.
155  if ( lhs.name().fullname() != rhs.name().fullname() ) {
156  ret = false;
157  std::cout << "LogicalPart names do not match " << lhs.name().fullname()
158  << " and " << rhs.name().fullname() << std::endl;
159  } else if ( ! DDCompareSolid(ddco_)(lhs.solid(), rhs.solid()) ){
160  ret = false;
161  std::cout << "LogicalPart Solids do not match " << lhs.name().fullname()
162  << " and " << rhs.name().fullname() << std::endl;
163  }
164  return ret;
165 }
const N & name() const
Definition: DDBase.h:78
Needs to know about rotmat because of BooleanSolid.
const DDSolid & solid(void) const
Returns a reference object of the solid being the shape of this LogicalPart.
DDCompOptions ddco_
const std::string fullname() const
Definition: DDName.h:52

Member Data Documentation

DDCompOptions DDCompareLP::ddco_

Definition at line 59 of file DDCompareTools.h.

Referenced by operator()().