CMS 3D CMS Logo

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, std::unique_ptr< DDI::Solid > > DDExtrudedPolygon DDPolycone DDPolyhedra

Public Member Functions

 DDPolySolid (const DDSolid &s)
 
 DDPolySolid (void)=delete
 
- Public Member Functions inherited from DDSolid
 DDSolid (const DDName &name)
 Creates a reference-object to a solid named name. More...
 
 DDSolid (void)
 Uninitialilzed solid reference-object; for further details on reference-objects see documentation of DDLogicalPart. More...
 
const std::vector< double > & parameters (void) const
 Give the parameters of the solid. More...
 
DDSolidShape shape (void) const
 The type of the solid. More...
 
double volume (void) const
 Returns the volume of the given solid (does not work with boolean soids !) More...
 
- Public Member Functions inherited from DDBase< DDName, std::unique_ptr< DDI::Solid > >
void create (const DDName &name)
 
void create (const DDName &name, std::unique_ptr< DDI::Solid > vals)
 
 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
 
DDI::rep_traits< DDName, std::unique_ptr< DDI::Solid > >::reference rep ()
 
const DDI::rep_traits< DDName, std::unique_ptr< DDI::Solid > >::reference rep () const
 
std::string toString () const
 
const DDI::rep_traits< DDName, std::unique_ptr< DDI::Solid > >::reference val ()
 
const DDI::rep_traits< DDName, std::unique_ptr< DDI::Solid > >::reference val () const
 
virtual ~DDBase ()
 

Protected Member Functions

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, std::unique_ptr< DDI::Solid > >
using def_type = std::pair< const DDName *, bool >
 
using StoreT = DDI::Singleton< DDI::Store< DDName, std::unique_ptr< DDI::Solid > > >
 
- Static Public Member Functions inherited from DDBase< DDName, std::unique_ptr< DDI::Solid > >
static auto begin ()
 
static auto end ()
 

Detailed Description

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

Definition at line 201 of file DDSolid.h.

Constructor & Destructor Documentation

◆ DDPolySolid() [1/2]

DDPolySolid::DDPolySolid ( const DDSolid s)

Definition at line 246 of file DDSolid.cc.

246 : DDSolid(s) {}

◆ DDPolySolid() [2/2]

DDPolySolid::DDPolySolid ( void  )
delete

Member Function Documentation

◆ getVec()

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 248 of file DDSolid.cc.

248  {
249  // which: first second or third std::vector
250  // offset: number of non-std::vector components before std::vectors start
251  if ((rep().parameters().size() - offset) % numVecs != 0) {
252  edm::LogError("DDSolid") << "Could not find equal sized components of std::vectors in a PolySolid description."
253  << "rep().parameters().size()=" << rep().parameters().size() << " numVecs=" << numVecs
254  << " offset=" << offset << std::endl;
255  }
256  std::vector<double> tvec;
257  for (size_t i = offset + which; i < rep().parameters().size(); i = i + numVecs) {
258  tvec.emplace_back(rep().parameters()[i]);
259  }
260  return tvec;
261 }

References mps_fire::i, hltrates_dqm_sourceclient-live_cfg::offset, DDSolid::parameters(), DDBase< DDName, std::unique_ptr< DDI::Solid > >::rep(), findQualityFiles::size, and eostools::which().

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

mps_fire.i
i
Definition: mps_fire.py:355
alignCSCRings.s
s
Definition: alignCSCRings.py:92
DDBase< DDName, std::unique_ptr< DDI::Solid > >::rep
const DDI::rep_traits< DDName, std::unique_ptr< DDI::Solid > >::reference rep() const
Definition: DDBase.h:65
edm::LogError
Definition: MessageLogger.h:183
DDSolid::parameters
const std::vector< double > & parameters(void) const
Give the parameters of the solid.
Definition: DDSolid.cc:121
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:78
eostools.which
def which(cmd)
Definition: eostools.py:336
DDSolid::DDSolid
DDSolid(void)
Uninitialilzed solid reference-object; for further details on reference-objects see documentation of ...
Definition: DDSolid.cc:49
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443