13#include "TGeoVolume.h"
16#include "BesVisLib/SubDetectorROOTGeo.h"
23 m_DetectorsArray =
new TObjArray();
24 m_HitsArray =
new TObjArray();
25 m_2DHitsArray =
new TObjArray();
30 cout <<
"[DEBUG] TEST: ~SubDetectorROOTGeo() begin" << endl;
36 cout <<
"[DEBUG] TEST: ~SubDetectorROOTGeo() finished" << endl;
42 m_config.SetURI( gdmlFile );
43 m_config.SetSetupName( setupName );
44 m_config.SetType (
"ROOT" );
46 m_sxp.Configure( &m_config );
50 m_TopVolume = (TGeoVolume*)TGDMLProcessor::GetInstance()->GetWorldVolume();
55 TGeoVolume *lv = (TGeoVolume*)TGDMLProcessor::GetInstance()->GetLogicalVolume(vn);
61 TGeoVolumeAssembly *av = (TGeoVolumeAssembly*)TGDMLProcessor::GetInstance()->GetAssemblyVolume(an);
67 TGeoNode *node = (TGeoNode*)TGDMLProcessor::GetInstance()->GetPhysicalVolume(nn);
73 if (i < m_HitsArray->GetEntries())
83 if (pNode) pNode->SetVisibility(1);
TGeoNode * GetNode(const std::string &nn)
Get a node(physical volume) by name;.
TObjArray * m_2DHitsArray
virtual TGeoPhysicalNode * GetHit(int i)
Get ith hit in HitsArray;.
TGeoVolume * GetLogicalVolume(const std::string &vn)
Get a logical volume by name;.
virtual void SetDetectorOn()
Set all physicalNodes in m_DeteorsArray visible;.
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;.
TObjArray * m_DetectorsArray
SubDetectorROOTGeo()
Constructor.