BOSS 7.0.7
BESIII Offline Software System
Loading...
Searching...
No Matches
EmcG4Geo Class Reference

#include <EmcG4Geo.h>

+ Inheritance diagram for EmcG4Geo:

Public Member Functions

 EmcG4Geo ()
 Constructor.
 
 ~EmcG4Geo ()
 Destructor.
 
void InitFromGdml (const char *gdmlFile, const char *setupName)
 Initialize the instance of G4Geo.
 
void SetDefaultVis ()
 Set default visual attributes;.
 
- Public Member Functions inherited from SubDetectorG4Geo
 SubDetectorG4Geo ()
 Constructor.
 
virtual ~SubDetectorG4Geo ()
 Destructor.
 
void ReadGdml (const char *gdmlFile, const char *setupName)
 Initialize the instance of G4Geo.
 
int IsInitialized ()
 If the G4 geometry of this subdetctor is initialized;.
 
G4LogicalVolume * GetLogicalVolume (const std::string &vn)
 Get a logical volume by name;.
 
G4LogicalVolume * GetTopVolume ()
 Get the top(world) volume;.
 

Static Public Member Functions

static EmcG4GeoInstance ()
 Get a pointer to the single instance of EmcG4Geo.
 

Additional Inherited Members

- Protected Attributes inherited from SubDetectorG4Geo
int m_G4GeoInit
 
G4LogicalVolume * m_TopVolume
 

Detailed Description

Class EmcGeo contains all of the objects necessary to describe the Emc geometry.

Definition at line 18 of file EmcG4Geo.h.

Constructor & Destructor Documentation

◆ EmcG4Geo()

EmcG4Geo::EmcG4Geo ( )

Constructor.

Definition at line 22 of file EmcG4Geo.cxx.

23{
24 string GdmlManagementPath = getenv("GDMLMANAGEMENTROOT");
25 if (GdmlManagementPath == "") cout << "EmcG4Geo::GdmlManagementPath not set!" << endl;
26 string GdmlFile = GdmlManagementPath + string("/dat/Emc.gdml");
27 cout << "Construct Emc from GdmlFile " << GdmlFile << endl;
28 InitFromGdml( GdmlFile.c_str(), "Emc" );
29}
void InitFromGdml(const char *gdmlFile, const char *setupName)
Initialize the instance of G4Geo.
Definition: EmcG4Geo.cxx:35

Referenced by Instance().

◆ ~EmcG4Geo()

EmcG4Geo::~EmcG4Geo ( )

Destructor.

Definition at line 31 of file EmcG4Geo.cxx.

32{ }

Member Function Documentation

◆ InitFromGdml()

void EmcG4Geo::InitFromGdml ( const char *  gdmlFile,
const char *  setupName 
)

Initialize the instance of G4Geo.

Definition at line 35 of file EmcG4Geo.cxx.

36{
37 ReadGdml(gdmlFile, setupName);
38 m_TopVolume = GetLogicalVolume("logicalEMC");
39 if (!m_TopVolume) cout << "EmcG4Geo::InitFromGdml, m_TopVolume not found" << endl;
40 else cout << "Emc TopVolume name " << m_TopVolume->GetName() << endl;
42
43 m_G4GeoInit = 1;
44}
void SetDefaultVis()
Set default visual attributes;.
Definition: EmcG4Geo.cxx:47
void ReadGdml(const char *gdmlFile, const char *setupName)
Initialize the instance of G4Geo.
G4LogicalVolume * GetLogicalVolume(const std::string &vn)
Get a logical volume by name;.
G4LogicalVolume * m_TopVolume

Referenced by EmcG4Geo().

◆ Instance()

EmcG4Geo * EmcG4Geo::Instance ( )
static

Get a pointer to the single instance of EmcG4Geo.

Definition at line 52 of file EmcG4Geo.cxx.

53{
54 //Get a pointer to the single instance of EmcG4Geo
55 if(!m_pEmcG4Geo) {
56 m_pEmcG4Geo = new EmcG4Geo;
57 //cout<<"in EmcG4Geo:: no EmcG4Geo now."<<m_pEmcG4Geo<<endl;
58 }
59 //cout<<"in EmcG4Geo:: get EmcG4Geo successfully."<<endl;
60 return m_pEmcG4Geo;
61}
EmcG4Geo()
Constructor.
Definition: EmcG4Geo.cxx:22

Referenced by ExtBesEmcConstruction::Construct(), and BesEmcConstruction::Construct().

◆ SetDefaultVis()

void EmcG4Geo::SetDefaultVis ( )

Set default visual attributes;.

Definition at line 47 of file EmcG4Geo.cxx.

48{
49}

Referenced by InitFromGdml().


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