BOSS 8.0.0
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;.
 EmcG4Geo ()
 Constructor.
 ~EmcG4Geo ()
 Destructor.
void InitFromGdml (const char *gdmlFile, const char *setupName)
 Initialize the instance of G4Geo.
void SetDefaultVis ()
 Set default visual attributes;.
 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;.
 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;.
 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.
static EmcG4GeoInstance ()
 Get a pointer to the single instance of EmcG4Geo.
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 DetectorDescription/G4Geo/include/G4Geo/EmcG4Geo.h.

Constructor & Destructor Documentation

◆ EmcG4Geo() [1/3]

EmcG4Geo::EmcG4Geo ( )

Constructor.

Definition at line 21 of file EmcG4Geo.cxx.

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

Referenced by Instance(), and SetDefaultVis().

◆ ~EmcG4Geo() [1/3]

EmcG4Geo::~EmcG4Geo ( )

Destructor.

Definition at line 29 of file EmcG4Geo.cxx.

29{}

◆ EmcG4Geo() [2/3]

EmcG4Geo::EmcG4Geo ( )

Constructor.

◆ ~EmcG4Geo() [2/3]

EmcG4Geo::~EmcG4Geo ( )

Destructor.

◆ EmcG4Geo() [3/3]

EmcG4Geo::EmcG4Geo ( )

Constructor.

◆ ~EmcG4Geo() [3/3]

EmcG4Geo::~EmcG4Geo ( )

Destructor.

Member Function Documentation

◆ InitFromGdml() [1/3]

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

Initialize the instance of G4Geo.

Definition at line 31 of file EmcG4Geo.cxx.

31 {
32 ReadGdml( gdmlFile, setupName );
33 m_TopVolume = GetLogicalVolume( "logicalEMC" );
34 if ( !m_TopVolume ) cout << "EmcG4Geo::InitFromGdml, m_TopVolume not found" << endl;
35 else cout << "Emc TopVolume name " << m_TopVolume->GetName() << endl;
37
38 m_G4GeoInit = 1;
39}
void SetDefaultVis()
Set default visual attributes;.
Definition EmcG4Geo.cxx:41
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;.

Referenced by EmcG4Geo().

◆ InitFromGdml() [2/3]

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

Initialize the instance of G4Geo.

◆ InitFromGdml() [3/3]

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

Initialize the instance of G4Geo.

◆ Instance() [1/3]

EmcG4Geo * EmcG4Geo::Instance ( )
static

Get a pointer to the single instance of EmcG4Geo.

Definition at line 43 of file EmcG4Geo.cxx.

43 {
44 // Get a pointer to the single instance of EmcG4Geo
45 if ( !m_pEmcG4Geo )
46 {
47 m_pEmcG4Geo = new EmcG4Geo;
48 // cout<<"in EmcG4Geo:: no EmcG4Geo now."<<m_pEmcG4Geo<<endl;
49 }
50 // cout<<"in EmcG4Geo:: get EmcG4Geo successfully."<<endl;
51 return m_pEmcG4Geo;
52}
EmcG4Geo()
Constructor.
Definition EmcG4Geo.cxx:21

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

◆ Instance() [2/3]

EmcG4Geo * EmcG4Geo::Instance ( )
static

Get a pointer to the single instance of EmcG4Geo.

◆ Instance() [3/3]

EmcG4Geo * EmcG4Geo::Instance ( )
static

Get a pointer to the single instance of EmcG4Geo.

◆ SetDefaultVis() [1/3]

void EmcG4Geo::SetDefaultVis ( )

Set default visual attributes;.

Definition at line 41 of file EmcG4Geo.cxx.

41{}

Referenced by InitFromGdml().

◆ SetDefaultVis() [2/3]

void EmcG4Geo::SetDefaultVis ( )

Set default visual attributes;.

◆ SetDefaultVis() [3/3]

void EmcG4Geo::SetDefaultVis ( )

Set default visual attributes;.


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