VGM Version 5.3
Loading...
Searching...
No Matches
BaseVGM::VFactory Class Reference

The abstract base class to geometry factory. More...

#include <VFactory.h>

Inheritance diagram for BaseVGM::VFactory:

Public Member Functions

 VFactory (const std::string &name, VGM::IMaterialFactory *materialFactory)
 
virtual ~VFactory ()
 
virtual std::string Name () const
 Return the name of this factory.
 
virtual const VGM::SolidStoreSolids () const
 Return the store of solids.
 
virtual const VGM::VolumeStoreVolumes () const
 Return the store of volumes.
 
virtual VGM::IMaterialFactoryMaterialFactory () const
 Return the associated material factory.
 
virtual bool Export (VGM::IFactory *factory) const
 Export geometry to the specified factory.
 
virtual void PrintSolids () const
 Print all solids.
 
virtual void PrintVolumes () const
 Print all volumes.
 
virtual void SetDebug (int debug)
 Set the debug level.
 
virtual int Debug () const
 Return the debug level.
 
virtual void SetIgnore (bool ignore, double dummyBoxDimensions=VGM::kDefaultDummyBoxDimensions)
 Set ignoring of unsupported features.
 
virtual bool Ignore () const
 Return the ignore option.
 
virtual void SetDummyBoxDimensions (double value)
 Set the dimensions in mm of a dummy box replacing the unsupported shapes if the 'ignore' option is activated.
 
virtual double DummyBoxDimensions () const
 Return the ignore option.
 
virtual void SetBestMatch (bool value)
 Set best match option.
 
virtual bool BestMatch () const
 Return the single mode option.
 
- Public Member Functions inherited from VGM::IFactory
virtual ~IFactory ()
 
virtual ISolidCreateArb8 (const std::string &name, double hz, std::vector< VGM::TwoVector > vertices)=0
 Create the arbitrary trapezoid with 8 vertices standing on two paralel planes perpendicular to Z axis.
 
virtual ISolidCreateBox (const std::string &name, double hx, double hy, double hz)=0
 Create the box solid.
 
virtual ISolidCreateCons (const std::string &name, double rin1, double rout1, double rin2, double rout2, double hz, double sphi, double dphi)=0
 Create the cons solid = phi segment of a conical tube.
 
virtual ISolidCreateCtubs (const std::string &name, double rin, double rout, double hz, double sphi, double dphi, double nxlow, double nylow, double nzlow, double nxhigh, double nyhigh, double nzhigh)=0
 Create the cut tubs solid = phi segment of a tube cut with two planes.
 
virtual ISolidCreateEllipsoid (const std::string &name, double dx, double dy, double dz, double zBottomCut, double zTopCut)=0
 Create the ellipsoid solid.
 
virtual ISolidCreateEllipticalTube (const std::string &name, double dx, double dy, double hz)=0
 Create the elliptical tube solid.
 
virtual ISolidCreateExtrudedSolid (const std::string &name, std::vector< TwoVector > polygon, std::vector< std::vector< double > > zsections)=0
 Create the extruded solid.
 
virtual ISolidCreateHype (const std::string &name, double r1, double r2, double stereo1, double stereo2, double hz)=0
 Create the hyperboloid solid.
 
virtual ISolidCreatePara (const std::string &name, double hx, double hy, double hz, double alpha, double theta, double phi)=0
 Create the para solid = parallelepiped.
 
virtual ISolidCreateParaboloid (const std::string &name, double r1, double r2, double hz)=0
 Create the paraboloid solid.
 
virtual ISolidCreatePolycone (const std::string &name, double sphi, double dphi, int nofZplanes, double *z, double *rin, double *rout)=0
 Create the polycone solid = phi segment of a polycone.
 
virtual ISolidCreatePolyhedra (const std::string &name, double sphi, double dphi, int nofSides, int nofZplanes, double *z, double *rin, double *rout)=0
 Create the polyhedra solid = phi segment of a polyhedra (polygone)
 
virtual ISolidCreateSphere (const std::string &name, double rin, double rout, double sphi, double dphi, double stheta, double dtheta)=0
 Create the sphere solid = phi segment of a spherical shell.
 
virtual ISolidCreateTessellatedSolid (const std::string &name, std::vector< std::vector< VGM::ThreeVector > > facets)=0
 Create tessellated solid = solid composed from triangular and rectangular facets.
 
virtual ISolidCreateTorus (const std::string &name, double rin, double rout, double rax, double sphi, double dphi)=0
 Create the torus solid = phi segment of a torus.
 
virtual ISolidCreateTrap (const std::string &name, double hz, double theta, double phi, double dy1, double dx1, double dx2, double alpha1, double dy2, double dx3, double dx4, double alpha2)=0
 Create the trap solid = general trapezoid ( Note that of the 11 parameters described below, only 9 are really independent)
 
virtual ISolidCreateTrd (const std::string &name, double hx1, double hx2, double hy1, double hy2, double hz)=0
 Create the trd solid = a trapezoid with the x and y dimensions varying along z.
 
virtual ISolidCreateTubs (const std::string &name, double rin, double rout, double hz, double sphi, double dphi)=0
 Create the trd solid = phi segment of a tube.
 
virtual ISolidCreateIntersectionSolid (const std::string &name, VGM::ISolid *solidA, VGM::ISolid *solidB, const VGM::Transform &transform)=0
 Create the intersection of two solids.
 
virtual ISolidCreateSubtractionSolid (const std::string &name, VGM::ISolid *solidA, VGM::ISolid *solidB, const VGM::Transform &transform)=0
 Create the subtraction of two solids.
 
virtual ISolidCreateUnionSolid (const std::string &name, VGM::ISolid *solidA, VGM::ISolid *solidB, const VGM::Transform &transform)=0
 Create the union of two solids.
 
virtual ISolidCreateDisplacedSolid (const std::string &name, VGM::ISolid *solid, const VGM::Transform &transform)=0
 Create displaced solid.
 
virtual ISolidCreateScaledSolid (const std::string &name, VGM::ISolid *solid, const VGM::Transform &transform)=0
 Create scaled solid.
 
virtual ISolidCreateMultiUnion (const std::string &name, std::vector< VGM::ISolid * > constituents, std::vector< VGM::Transform > transforms)=0
 Create the multi union of solids.
 
virtual IVolumeCreateVolume (const std::string &name, VGM::ISolid *solid, const std::string &mediumName)=0
 Create the volume.
 
virtual IPlacementCreatePlacement (const std::string &name, int copyNo, VGM::IVolume *volume, VGM::IVolume *motherVolume, const VGM::Transform &transform)=0
 Create the simple volume placement.
 
virtual IPlacementCreateMultiplePlacement (const std::string &name, VGM::IVolume *volume, VGM::IVolume *motherVolume, VGM::Axis axis, int nofItems, double width, double offset, double halfGap)=0
 Create the multiple volume placement.
 
virtual VGM::IPlacementCreateParameterisedPlacement (const std::string &name, VGM::IVolume *motherVolume, const std::vector< VGM::Transform > &transforms, const std::vector< VGM::IVolume * > &volumes)=0
 Create the parameterised volume placement.
 
virtual IPlacementTop () const =0
 Return the top volume placement.
 
virtual ISolidSingleSolid () const =0
 Return solid (if in one solid conversion mode)
 
virtual void SetSolid (VGM::ISolid *solid)=0
 Set solid (in single mode)
 

Protected Member Functions

 VFactory ()
 
 VFactory (const VFactory &rhs)
 
virtual void SetSingleMode (bool singleMode)
 Set single mode option.
 
virtual bool SingleMode () const
 Return the single mode option.
 
virtual VGM::SolidStoreSolidStore ()
 
virtual VGM::VolumeStoreVolumeStore ()
 

Detailed Description

The abstract base class to geometry factory.

It owns the solids and volumes stores and implements the export to other factory.

Author
Ivana Hrivnacova; IPN Orsay

Definition at line 42 of file VFactory.h.

Constructor & Destructor Documentation

◆ VFactory() [1/3]

BaseVGM::VFactory::VFactory ( const std::string & name,
VGM::IMaterialFactory * materialFactory )

Standard constructor

Definition at line 75 of file VFactory.cxx.

◆ ~VFactory()

BaseVGM::VFactory::~VFactory ( )
virtual

Definition at line 111 of file VFactory.cxx.

◆ VFactory() [2/3]

BaseVGM::VFactory::VFactory ( )
protected

Protected default constructor

Definition at line 99 of file VFactory.cxx.

◆ VFactory() [3/3]

BaseVGM::VFactory::VFactory ( const VFactory & rhs)
protected

Protected copy constructor

Definition at line 105 of file VFactory.cxx.

Member Function Documentation

◆ Name()

std::string BaseVGM::VFactory::Name ( ) const
inlinevirtual

Return the name of this factory.

Implements VGM::IFactory.

Definition at line 127 of file VFactory.h.

◆ Solids()

const VGM::SolidStore & BaseVGM::VFactory::Solids ( ) const
inlinevirtual

Return the store of solids.

Implements VGM::IFactory.

Definition at line 129 of file VFactory.h.

◆ Volumes()

const VGM::VolumeStore & BaseVGM::VFactory::Volumes ( ) const
inlinevirtual

Return the store of volumes.

Implements VGM::IFactory.

Definition at line 134 of file VFactory.h.

◆ MaterialFactory()

VGM::IMaterialFactory * BaseVGM::VFactory::MaterialFactory ( ) const
inlinevirtual

Return the associated material factory.

Implements VGM::IFactory.

Definition at line 139 of file VFactory.h.

◆ Export()

bool BaseVGM::VFactory::Export ( VGM::IFactory * factory) const
virtual

Export geometry to the specified factory.

Export the whole geometry to the given factory.

Implements VGM::IFactory.

Definition at line 673 of file VFactory.cxx.

◆ PrintSolids()

void BaseVGM::VFactory::PrintSolids ( ) const
virtual

Print all solids.

Implements VGM::IFactory.

Definition at line 713 of file VFactory.cxx.

◆ PrintVolumes()

void BaseVGM::VFactory::PrintVolumes ( ) const
virtual

Print all volumes.

Implements VGM::IFactory.

Definition at line 728 of file VFactory.cxx.

◆ SetDebug()

void BaseVGM::VFactory::SetDebug ( int value)
virtual

Set the debug level.

Implements VGM::IFactory.

Definition at line 743 of file VFactory.cxx.

◆ Debug()

int BaseVGM::VFactory::Debug ( ) const
inlinevirtual

Return the debug level.

Implements VGM::IFactory.

Definition at line 156 of file VFactory.h.

◆ SetIgnore()

void BaseVGM::VFactory::SetIgnore ( bool value,
double dummyBoxDimensions = VGM::kDefaultDummyBoxDimensions )
virtual

Set ignoring of unsupported features.

  • if not set (default) - program stops when an unsupported feature occurs
  • if set - only warning is issued

Implements VGM::IFactory.

Definition at line 753 of file VFactory.cxx.

◆ Ignore()

bool BaseVGM::VFactory::Ignore ( ) const
inlinevirtual

Return the ignore option.

Implements VGM::IFactory.

Definition at line 158 of file VFactory.h.

◆ SetDummyBoxDimensions()

void BaseVGM::VFactory::SetDummyBoxDimensions ( double value)
inlinevirtual

Set the dimensions in mm of a dummy box replacing the unsupported shapes if the 'ignore' option is activated.

Implements VGM::IFactory.

Definition at line 160 of file VFactory.h.

◆ DummyBoxDimensions()

double BaseVGM::VFactory::DummyBoxDimensions ( ) const
inlinevirtual

Return the ignore option.

Implements VGM::IFactory.

Definition at line 165 of file VFactory.h.

◆ SetBestMatch()

void BaseVGM::VFactory::SetBestMatch ( bool value)
inlinevirtual

Set best match option.

  • if not set (default) - prefer the geometry optimization to the best match of the hierarchy of volumes
  • if set - prefer the best match of the hierarchy of volumes to optimization in preformance/memory (currently this option is used only in emulation of the "replica slice" emulation in Root)

Implements VGM::IFactory.

Definition at line 170 of file VFactory.h.

◆ BestMatch()

bool BaseVGM::VFactory::BestMatch ( ) const
inlinevirtual

Return the single mode option.

Implements VGM::IFactory.

Definition at line 175 of file VFactory.h.

◆ SetSingleMode()

void BaseVGM::VFactory::SetSingleMode ( bool value)
inlineprotectedvirtual

Set single mode option.

  • if not set (default) - import/export the whole geometry tree
  • if set - import/export a single geometry object (currently only solid objects are supported)

Implements VGM::IFactory.

Definition at line 177 of file VFactory.h.

◆ SingleMode()

bool BaseVGM::VFactory::SingleMode ( ) const
inlineprotectedvirtual

Return the single mode option.

Implements VGM::IFactory.

Definition at line 182 of file VFactory.h.

◆ SolidStore()

VGM::SolidStore & BaseVGM::VFactory::SolidStore ( )
inlineprotectedvirtual

Return the store of solids (non const)

Definition at line 144 of file VFactory.h.

◆ VolumeStore()

VGM::VolumeStore & BaseVGM::VFactory::VolumeStore ( )
inlineprotectedvirtual

Return the store of volumes (non const)

Definition at line 150 of file VFactory.h.


The documentation for this class was generated from the following files: