EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
|
#include <EicRoot/blob/master/eic/cad/EicStlFactory.h>
Public Types | |
enum | StlFileType { Undefined, BinaryStl, AsciiStl, AsciiSlp } |
Public Member Functions | |
EicStlFactory (const char *volume_name, const char *geometry_file_name, const EicCadFileConfig *config, bool acknowledge_config_file_scaling=true) | |
EicStlFactory () | |
~EicStlFactory () | |
gEntry & | mgroups (void) |
void | _ConstructGeometry (TGeoVolume *mother, TVector3 shift, bool swapXY=false, std::vector< TGeoVolume * > *volumes=0) |
int | CreateRootFile (TGeoVolume *mother, const char *bname) |
Private Member Functions | |
void | ImportBinaryStlFile (FILE *fin, unsigned trCount, double scale=1.0) |
void | ImportAsciiStlSlpFile (double scale=1.0) |
void | PreAllocateFacet (unsigned solidId, const TGeoMedium *medium, const double vCoord1[], const double vCoord2[], const double vCoord3[]) |
void | DumpTmpStlFile (EicStlAssembly *assembly, TString &stlActualFileName) |
Private Attributes | |
FairLogger * | mLogger |
StlFileType | mType |
const EicCadFileConfig * | mConfig |
gEntry | mGroups |
TString | mVolumeName |
TString | mGeometryName |
Definition at line 26 of file EicStlFactory.h.
View newest version in sPHENIX GitHub at line 26 of file EicStlFactory.h
Either binary or ASCII STL, as well as ASCII SLP files are allowed as input; STL/SLP is decided based on file extension, binary/ASCII based on file length
Definition at line 37 of file EicStlFactory.h.
View newest version in sPHENIX GitHub at line 37 of file EicStlFactory.h
EicStlFactory::EicStlFactory | ( | const char * | volume_name, |
const char * | geometry_file_name, | ||
const EicCadFileConfig * | config, | ||
bool | acknowledge_config_file_scaling = true |
||
) |
Definition at line 258 of file EicStlFactory.cxx.
View newest version in sPHENIX GitHub at line 258 of file EicStlFactory.cxx
References _BINARY_STL_HEADER_SIZE_, AsciiSlp, AsciiStl, BinaryStl, FairLogger::Fatal(), EicMediaHub::fSingleMedium, FairLogger::GetLogger(), ImportAsciiStlSlpFile(), ImportBinaryStlFile(), mConfig, MESSAGE_ORIGIN, mGeometryName, EicCadFileConfig::mhub(), mLogger, mType, EicCadFileConfig::scale(), and EicCadFileConfig::units().
|
inline |
Definition at line 31 of file EicStlFactory.h.
View newest version in sPHENIX GitHub at line 31 of file EicStlFactory.h
|
inline |
Definition at line 33 of file EicStlFactory.h.
View newest version in sPHENIX GitHub at line 33 of file EicStlFactory.h
void EicStlFactory::_ConstructGeometry | ( | TGeoVolume * | mother, |
TVector3 | shift, | ||
bool | swapXY = false , |
||
std::vector< TGeoVolume * > * | volumes = 0 |
||
) |
Definition at line 470 of file EicStlFactory.cxx.
View newest version in sPHENIX GitHub at line 470 of file EicStlFactory.cxx
References EicStlMediaGroup::assemblies(), CreateTetrahedron(), DumpTmpStlFile(), FairLogger::Fatal(), EicStlKey::GetData(), EicCadFileConfig::GetStlVertexMergingTolerance(), in, it, EicStlVertex::key(), tetgenio::load_stl(), mConfig, MESSAGE_ORIGIN, mGeometryName, mGroups, mLogger, eic::mm, mVolumeName, name, tetgenio::numberofpoints, tetgenio::numberoftetrahedra, EicStlMediaGroup::SplitIntoAssemblies(), swapXYfun(), tetrahedralize(), EicStlMediaGroup::vertices(), vtx(), and wireframe().
Referenced by EicCadFile::ConstructGeometry().
int EicStlFactory::CreateRootFile | ( | TGeoVolume * | mother, |
const char * | bname | ||
) |
Definition at line 621 of file EicStlFactory.cxx.
View newest version in sPHENIX GitHub at line 621 of file EicStlFactory.cxx
References EicStlMediaGroup::assemblies(), CreateTetrahedron(), DumpTmpStlFile(), EicMediaHub::fSingleMedium, EicCadFileConfig::GetStlVertexMergingTolerance(), in, it, tetgenio::load_stl(), mConfig, mGroups, EicCadFileConfig::mhub(), mVolumeName, name, tetgenio::numberofpoints, tetgenio::numberoftetrahedra, printf(), EicStlMediaGroup::SplitIntoAssemblies(), and tetrahedralize().
Referenced by EicCadWizard::CreateStlSolidRootFile().
|
private |
Definition at line 334 of file EicStlFactory.cxx.
View newest version in sPHENIX GitHub at line 334 of file EicStlFactory.cxx
References EicStlAssembly::facets(), FairLogger::Fatal(), EicStlFacet::GetNormal(), MESSAGE_ORIGIN, mLogger, sign(), and EicStlFacet::vertices().
Referenced by _ConstructGeometry(), and CreateRootFile().
|
private |
Definition at line 120 of file EicStlFactory.cxx.
View newest version in sPHENIX GitHub at line 120 of file EicStlFactory.cxx
References AsciiSlp, AsciiStl, buffer, color, EicMediaHub::fSingleMedium, EicMediaHub::GetMedium(), ip(), mConfig, mGeometryName, EicCadFileConfig::mhub(), mType, and PreAllocateFacet().
Referenced by EicStlFactory().
|
private |
Definition at line 77 of file EicStlFactory.cxx.
View newest version in sPHENIX GitHub at line 77 of file EicStlFactory.cxx
References EicMediaHub::fSingleMedium, mConfig, EicCadFileConfig::mhub(), and PreAllocateFacet().
Referenced by EicStlFactory().
|
inline |
Definition at line 39 of file EicStlFactory.h.
View newest version in sPHENIX GitHub at line 39 of file EicStlFactory.h
References mGroups.
Referenced by EicCompositeShape::LocalFillBuffer3D().
|
private |
Facet allocation call during STL file input stage
solidId | 0-based index of "solid - endsolid" block in the ASCII STL/SLP files; 0 for binary STL |
medium | medium pointer |
vCoord1 | 1-st vertex coordinates |
vCoord2 | 2-d vertex coordinates |
vCoord3 | 3-d vertex coordinates |
Definition at line 32 of file EicStlFactory.cxx.
View newest version in sPHENIX GitHub at line 32 of file EicStlFactory.cxx
References EicStlMediaGroup::AddVertex(), Acts::Test::at, EicStlKey::GetData(), EicStlVertex::key(), EicStlMediaGroup::mFbuffer, mGroups, v1, v2, v3, EicStlMediaGroup::vertices(), vtx(), EicStlMediaGroup::xCoord, EicStlMediaGroup::yCoord, and EicStlMediaGroup::zCoord.
Referenced by ImportAsciiStlSlpFile(), and ImportBinaryStlFile().
|
private |
Definition at line 54 of file EicStlFactory.h.
View newest version in sPHENIX GitHub at line 54 of file EicStlFactory.h
Referenced by _ConstructGeometry(), CreateRootFile(), EicStlFactory(), ImportAsciiStlSlpFile(), and ImportBinaryStlFile().
|
private |
Definition at line 60 of file EicStlFactory.h.
View newest version in sPHENIX GitHub at line 60 of file EicStlFactory.h
Referenced by _ConstructGeometry(), EicStlFactory(), and ImportAsciiStlSlpFile().
|
private |
Ordered map of medium-separated objects
Definition at line 57 of file EicStlFactory.h.
View newest version in sPHENIX GitHub at line 57 of file EicStlFactory.h
Referenced by _ConstructGeometry(), CreateRootFile(), mgroups(), and PreAllocateFacet().
|
private |
Definition at line 46 of file EicStlFactory.h.
View newest version in sPHENIX GitHub at line 46 of file EicStlFactory.h
Referenced by _ConstructGeometry(), DumpTmpStlFile(), and EicStlFactory().
|
private |
Input STL/SLP file type
Definition at line 49 of file EicStlFactory.h.
View newest version in sPHENIX GitHub at line 49 of file EicStlFactory.h
Referenced by EicStlFactory(), and ImportAsciiStlSlpFile().
|
private |
Definition at line 59 of file EicStlFactory.h.
View newest version in sPHENIX GitHub at line 59 of file EicStlFactory.h
Referenced by _ConstructGeometry(), and CreateRootFile().