Main program of the persistency/gdml/G04 example.
Definition in file gdml_det.cc.
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 62 of file gdml_det.cc.
References G4SDManager::AddNewDetector(), G4UImanager::ApplyCommand(), G4SDManager::FindSensitiveDetector(), G4cout, G4endl, G4GDMLParser::GetAuxMap(), G4SDManager::GetSDMpointer(), G4UImanager::GetUIpointer(), G4GDMLParser::GetWorldVolume(), G4RunManager::Initialize(), G4VisManager::Initialize(), G4GDMLParser::Read(), G4UIExecutive::SessionStart(), G4LogicalVolume::SetSensitiveDetector(), G4RunManager::SetUserAction(), and G4RunManager::SetUserInitialization().
65 G4cout <<
"Usage: gdml_det <intput_gdml_file:mandatory>"
71 G4cout <<
"Error! Mandatory input file is not specified!" <<
G4endl;
97 G4String trackerChamberSDname =
"Tracker";
106 std::cout <<
"Found " << auxmap->size()
107 <<
" volume(s) with auxiliary information."
109 for(G4GDMLAuxMapType::const_iterator iter=auxmap->begin();
110 iter!=auxmap->end(); iter++)
112 G4cout <<
"Volume " << ((*iter).first)->GetName()
113 <<
" has the following list of auxiliary information: "
115 for (G4GDMLAuxListType::const_iterator vit=(*iter).second.begin();
116 vit!=(*iter).second.end(); vit++)
118 std::cout <<
"--> Type: " << (*vit).type
119 <<
" Value: " << (*vit).value << std::endl;
127 for(G4GDMLAuxMapType::const_iterator iter=auxmap->begin();
128 iter!=auxmap->end(); iter++)
130 G4cout <<
"Volume " << ((*iter).first)->GetName()
131 <<
" has the following list of auxiliary information: "
133 for (G4GDMLAuxListType::const_iterator vit=(*iter).second.begin();
134 vit!=(*iter).second.end();vit++)
136 if ((*vit).type==
"SensDet")
138 G4cout <<
"Attaching sensitive detector " << (*vit).value
139 <<
" to volume " << ((*iter).first)->GetName()
150 G4cout << (*vit).value <<
" detector not found" <<
G4endl;
167 G4String command =
"/control/execute ";
virtual void SetUserInitialization(G4VUserDetectorConstruction *userInit)
G4VPhysicalVolume * GetWorldVolume(const G4String &setupName="Default") const
Detector construction for laoding GDML geometry.
Physics list for the GDML senstive detector example.
static G4UImanager * GetUIpointer()
G4GLOB_DLL std::ostream G4cout
Primary generator action for GDML sensitive detector example.
G4VSensitiveDetector * FindSensitiveDetector(G4String dName, G4bool warning=true)
void AddNewDetector(G4VSensitiveDetector *aSD)
const G4GDMLAuxMapType * GetAuxMap() const
static G4SDManager * GetSDMpointer()
void Read(const G4String &filename, G4bool Validate=true)
virtual void Initialize()
std::map< G4LogicalVolume *, G4GDMLAuxListType > G4GDMLAuxMapType
void SetSensitiveDetector(G4VSensitiveDetector *pSDetector)
Sensitive detector to be attached to the GDML geometry.
G4int ApplyCommand(const char *aCommand)
virtual void SetUserAction(G4UserRunAction *userAction)