menu->AddButton("Run", "gAlice->Run()", "Process Alice run");
menu->AddButton("Geant4", "CreateGeant4()", "Create Geant4 only (without initializing AliRun)");
menu->AddButton("Geant4UI", "StartGeant4UI()","Go to Geant4 Interactive session");
+ menu->AddButton("XML", "GenerateXML()","Generate XML (AGDD) file with geometry description");
+ menu->AddButton("Quit", "Quit()", "Quit aliroot");
gROOT->SaveContext();
menu->Show();
}
else {
cout << "Monte Carlo has not been yet created." << endl;
}
+}
+
+void GenerateXML()
+{
+ if (gMC) {
+ // release Root terminal control
+
+ // go into non-raw term mode
+ //Getlinem(kCleanUp, 0);
+
+ // add test if gMC is TGeant4
+ TGeant4* g4 = (TGeant4*)gMC;
+
+ g4->ProcessGeantCommand("/xml/generateAGDD");
+
+ // new Root prompt
+ //Getlinem(kInit, ((TRint*)gROOT->GetApplication())->GetPrompt());
+ }
+ else {
+ cout << "Monte Carlo has not been yet created." << endl;
+ }
+}
+
+void Quit()
+{
+ delete gAlice->GetRunLoader();
+ delete gAlice;
+
+ exit(0);
}