CMS 3D CMS Logo

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

List of all members.

Public Member Functions

 DDPolySolid (const DDSolid &s)

Protected Member Functions

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

Detailed Description

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

Definition at line 210 of file DDSolid.h.


Constructor & Destructor Documentation

DDPolySolid::DDPolySolid ( const DDSolid s)

Definition at line 332 of file DDSolid.cc.

  : DDSolid(s)
{ }
DDPolySolid::DDPolySolid ( void  ) [protected]

Member Function Documentation

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

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 DDPolyhedra::rMaxVec(), DDPolycone::rMaxVec(), DDPolycone::rMinVec(), DDPolyhedra::rMinVec(), DDPolyhedra::rVec(), DDPolycone::rVec(), DDPolyhedra::zVec(), and DDPolycone::zVec().

                                                                      {

  // which:  first second or third std::vector 
  // offset: number of non-std::vector components before std::vectors start
  std::string locErr;
  size_t szVec = 0;
  std::vector<double> tvec; // = new std::vector<double>;
  if ( (rep().parameters().size() - offset) % numVecs != 0 ) { // / 2 != (rep().parameters().size() - 2) \ 2) {
    locErr = std::string("Could not find equal sized components of std::vectors in a PolySolid description.");
    edm::LogError ("DDSolid") << "rep().parameters().size()=" << rep().parameters().size() << "  numVecs=" << numVecs
         << "  offset=" << offset << std::endl;
  }
  else {
    szVec = (rep().parameters().size() - offset)/ numVecs;
  }
  for (size_t i = offset + which; i < rep().parameters().size(); i = i + numVecs) {
    tvec.push_back(rep().parameters()[i]);
  }                
  return tvec;
}