14#include "TGeoVolume.h"
16#include "ROOTGeo/SubDetectorROOTGeo.h"
26 m_config.SetURI( gdmlFile );
27 m_config.SetSetupName( setupName );
28 m_config.SetType(
"ROOT" );
30 m_sxp.Configure( &m_config );
34 m_TopVolume = (TGeoVolume*)TGDMLProcessor::GetInstance()->GetWorldVolume();
35 if ( !
m_TopVolume ) std::cout <<
"Top Volume not found " << std::endl;
39 TGeoVolume* lv = (TGeoVolume*)TGDMLProcessor::GetInstance()->GetLogicalVolume( vn );
40 if ( !lv ) std::cout <<
"Logical Volume " << vn <<
" not found " << std::endl;
45 TGeoVolumeAssembly* av =
46 (TGeoVolumeAssembly*)TGDMLProcessor::GetInstance()->GetAssemblyVolume( an );
47 if ( !av ) std::cout <<
"Assembly Volume " << an <<
" not found " << std::endl;
52 TGeoNode* node = (TGeoNode*)TGDMLProcessor::GetInstance()->GetPhysicalVolume( nn );
53 if ( !node ) std::cout <<
"Physical Volume " << nn <<
" not found " << std::endl;
TGeoNode * GetNode(const std::string &nn)
Get a node(physical volume) by name;.
TGeoVolume * GetLogicalVolume(const std::string &vn)
Get a logical volume by name;.
virtual ~SubDetectorROOTGeo()
Destructor.
void ReadGdml(const char *gdmlFile, const char *setupName)
Initialize the instance of ROOTGeo.
TGeoVolumeAssembly * GetAssemblyVolume(const std::string &an)
Get an assembly by name;.
SubDetectorROOTGeo()
Constructor.