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

Constructor & Destructor Documentation

DDCompareLP::DDCompareLP ( )

Definition at line 189 of file DDCompareTools.cc.

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

Definition at line 191 of file DDCompareTools.cc.

191 : ddco_(ddco) { }
DDCompOptions 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(), runTheMatrix::ret, and DDLogicalPart::solid().

193  {
194  bool ret(true);
195  // for a logical part to be equal, the solid must be equal and the name must be equal.
196  if ( lhs.name().fullname() != rhs.name().fullname() ) {
197  ret = false;
198  std::cout << "LogicalPart names do not match " << lhs.name().fullname()
199  << " and " << rhs.name().fullname() << std::endl;
200  } else if ( ! DDCompareSolid(ddco_)(lhs.solid(), rhs.solid()) ){
201  ret = false;
202  std::cout << "LogicalPart Solids do not match " << lhs.name().fullname()
203  << " and " << rhs.name().fullname() << std::endl;
204  }
205  return ret;
206 }
tuple ret
prodAgent to be discontinued
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:51
tuple cout
Definition: gather_cfg.py:145

Member Data Documentation

DDCompOptions DDCompareLP::ddco_

Definition at line 49 of file DDCompareTools.h.

Referenced by operator()().