Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4Assembly Class Reference

#include <G4Assembly.hh>

Public Member Functions

 G4Assembly ()
 
 ~G4Assembly ()
 
void SetPlacedVector (G4PlacedVector &)
 
G4PlacedSolidGetPlacedSolid (G4int solidNumber) const
 
G4int GetNumberOfSolids () const
 

Detailed Description

Definition at line 54 of file G4Assembly.hh.

Constructor & Destructor Documentation

◆ G4Assembly()

G4Assembly::G4Assembly ( )

Definition at line 38 of file G4Assembly.cc.

39 : numberOfSolids(0)
40{
41 // ReadSTEPFile();
42 // CopySTEPData();
43}

◆ ~G4Assembly()

G4Assembly::~G4Assembly ( )

Definition at line 45 of file G4Assembly.cc.

46{
47 G4PlacedSolid* a = 0;
48
49 // Remove placedVec and delete all its contents
50 while (placedVec.size()>0)
51 {
52 a = placedVec.back();
53 placedVec.pop_back();
54 for (G4PlacedVector::iterator i=placedVec.begin(); i!=placedVec.end();)
55 {
56 if (*i==a)
57 {
58 i = placedVec.erase(i);
59 }
60 else
61 {
62 ++i;
63 }
64 }
65 if ( a ) { delete a; }
66 }
67}

Member Function Documentation

◆ GetNumberOfSolids()

G4int G4Assembly::GetNumberOfSolids ( ) const
inline

◆ GetPlacedSolid()

G4PlacedSolid * G4Assembly::GetPlacedSolid ( G4int  solidNumber) const
inline

◆ SetPlacedVector()

void G4Assembly::SetPlacedVector ( G4PlacedVector pVec)

Definition at line 69 of file G4Assembly.cc.

70{
71 numberOfSolids = pVec.size();
72
73 for(G4int a=0;a<numberOfSolids;a++)
74 {
75 placedVec.push_back( pVec[a]);
76 }
77}
int G4int
Definition: G4Types.hh:66

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