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 202 of file DDCompareTools.cc.

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

Definition at line 204 of file DDCompareTools.cc.

204 : ddco_(ddco) { }
DDCompOptions ddco_

Member Function Documentation

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

Definition at line 206 of file DDCompareTools.cc.

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

206  {
207  bool ret(true);
208  // for a logical part to be equal, the solid must be equal and the name must be equal.
209  if ( lhs.name().fullname() != rhs.name().fullname() ) {
210  ret = false;
211  std::cout << "LogicalPart names do not match " << lhs.name().fullname()
212  << " and " << rhs.name().fullname() << std::endl;
213  } else if ( ! DDCompareSolid(ddco_)(lhs.solid(), rhs.solid()) ){
214  ret = false;
215  std::cout << "LogicalPart Solids do not match " << lhs.name().fullname()
216  << " and " << rhs.name().fullname() << std::endl;
217  }
218  return ret;
219 }
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()().