CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions
DDPolySolid Class Reference

Abstract class for DDPolycone and DDPolyhedra. Basically a common member function. More...

#include <DDSolid.h>

Inheritance diagram for DDPolySolid:
DDSolid DDBase< DDName, DDI::Solid * > DDPolycone DDPolyhedra

Public Member Functions

 DDPolySolid (const DDSolid &s)
 
- Public Member Functions inherited from DDSolid
 DDSolid ()
 Uninitialilzed solid reference-object; for further details on reference-objects see documentation of DDLogicalPart. More...
 
 DDSolid (const DDName &name)
 Creates a reference-object to a solid named name. More...
 
const std::vector< double > & parameters () const
 Don't use (only meant to be used by DDbox(), DDtub(), ...) More...
 
DDSolidShape shape () const
 The type of the solid. More...
 
double volume () const
 Returns the volume of the given solid (does not work with boolean soids !) More...
 
- Public Member Functions inherited from DDBase< DDName, DDI::Solid * >
 DDBase ()
 
const DDNameddname () const
 
def_type isDefined () const
 
bool isValid () const
 true, if the wrapped pointer is valid More...
 
const DDNamename () const
 
 operator bool () const
 
bool operator< (const DDBase &b) const
 
bool operator== (const DDBase &b) const
 
bool operator> (const DDBase &b) const
 
const DDI::rep_traits< DDName,
DDI::Solid * >::reference 
rep () const
 
DDI::rep_traits< DDName,
DDI::Solid * >::reference 
rep ()
 
std::string toString () const
 
const DDI::rep_traits< DDName,
DDI::Solid * >::reference 
val () const
 
const DDI::rep_traits< DDName,
DDI::Solid * >::reference 
val ()
 
virtual ~DDBase ()
 

Protected Member Functions

 DDPolySolid ()
 
virtual std::vector< double > getVec (const size_t &which, const size_t &offset=0, const size_t &nVecs=1) const
 note defaults please. More...
 

Additional Inherited Members

- Public Types inherited from DDBase< DDName, DDI::Solid * >
typedef std::pair< const
DDName *, bool > 
def_type
 
typedef DDI::Solidpimpl_type
 
typedef DDI::rep_type< DDName,
pimpl_type > * 
prep_type
 
typedef DDI::Singleton
< DDI::Store< DDName,
DDI::Solid * > > 
StoreT
 
- Static Public Member Functions inherited from DDBase< DDName, DDI::Solid * >
static DDI::Store< DDName,
DDI::Solid * >::iterator 
begin ()
 
static void clear ()
 
static DDI::Store< DDName,
DDI::Solid * >::iterator 
end ()
 
static size_t size ()
 
- Protected Attributes inherited from DDBase< DDName, DDI::Solid * >
prep_type prep_
 

Detailed Description

Abstract class for DDPolycone and DDPolyhedra. Basically a common member function.

Definition at line 232 of file DDSolid.h.

Constructor & Destructor Documentation

DDPolySolid::DDPolySolid ( const DDSolid s)

Definition at line 332 of file DDSolid.cc.

333  : DDSolid(s)
334 { }
DDSolid()
Uninitialilzed solid reference-object; for further details on reference-objects see documentation of ...
Definition: DDSolid.cc:58
DDPolySolid::DDPolySolid ( )
protected

Member Function Documentation

std::vector< double > DDPolySolid::getVec ( const size_t &  which,
const size_t &  offset = 0,
const size_t &  nVecs = 1 
) const
protectedvirtual

note defaults please.

Definition at line 336 of file DDSolid.cc.

References i, evf::evtn::offset(), DDSolid::parameters(), DDBase< DDName, DDI::Solid * >::rep(), and DDBase< DDName, DDI::Solid * >::size().

Referenced by DDPolycone::rMaxVec(), DDPolyhedra::rMaxVec(), DDPolycone::rMinVec(), DDPolyhedra::rMinVec(), DDPolycone::rVec(), DDPolyhedra::rVec(), DDPolycone::zVec(), and DDPolyhedra::zVec().

338  {
339 
340  // which: first second or third std::vector
341  // offset: number of non-std::vector components before std::vectors start
342  std::string locErr;
343  size_t szVec = 0;
344  std::vector<double> tvec; // = new std::vector<double>;
345  if ( (rep().parameters().size() - offset) % numVecs != 0 ) { // / 2 != (rep().parameters().size() - 2) \ 2) {
346  locErr = std::string("Could not find equal sized components of std::vectors in a PolySolid description.");
347  edm::LogError ("DDSolid") << "rep().parameters().size()=" << rep().parameters().size() << " numVecs=" << numVecs
348  << " offset=" << offset << std::endl;
349  }
350  else {
351  szVec = (rep().parameters().size() - offset)/ numVecs;
352  }
353  for (size_t i = offset + which; i < rep().parameters().size(); i = i + numVecs) {
354  tvec.push_back(rep().parameters()[i]);
355  }
356  return tvec;
357 }
const std::vector< double > & parameters() const
Don&#39;t use (only meant to be used by DDbox(), DDtub(), ...)
Definition: DDSolid.cc:153
int i
Definition: DBlmapReader.cc:9
const DDI::rep_traits< DDName, DDI::Solid * >::reference rep() const
Definition: DDBase.h:95
static size_t size()
Definition: DDBase.h:79
unsigned int offset(bool)