CMS 3D CMS Logo

DDPolySolid Class Reference

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

#include <DetectorDescription/Core/interface/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 ()
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 232 of file DDSolid.h.


Constructor & Destructor Documentation

DDPolySolid::DDPolySolid ( const DDSolid s  ) 

Definition at line 312 of file DDSolid.cc.

00313   : DDSolid(s)
00314 { }

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 [protected, virtual]

note defaults please.

Definition at line 316 of file DDSolid.cc.

References lat::endl(), i, DDSolid::parameters(), DDBase< DDName, DDI::Solid * >::rep(), and DDBase< DDName, DDI::Solid * >::size().

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

00318                                                                       {
00319 
00320   // which:  first second or third std::vector 
00321   // offset: number of non-std::vector components before std::vectors start
00322   std::string locErr;
00323   size_t szVec = 0;
00324   std::vector<double> tvec; // = new std::vector<double>;
00325   if ( (rep().parameters().size() - offset) % numVecs != 0 ) { // / 2 != (rep().parameters().size() - 2) \ 2) {
00326     locErr = std::string("Could not find equal sized components of std::vectors in a PolySolid description.");
00327     edm::LogError ("DDSolid") << "rep().parameters().size()=" << rep().parameters().size() << "  numVecs=" << numVecs
00328          << "  offset=" << offset << std::endl;
00329   }
00330   else {
00331     szVec = (rep().parameters().size() - offset)/ numVecs;
00332   }
00333   for (size_t i = offset + which; i < rep().parameters().size(); i = i + numVecs) {
00334     tvec.push_back(rep().parameters()[i]);
00335   }                
00336   return tvec;
00337 }


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:18:12 2009 for CMSSW by  doxygen 1.5.4