New RICH menu.
authordibari <dibari@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 30 Jun 2000 16:42:08 +0000 (16:42 +0000)
committerdibari <dibari@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 30 Jun 2000 16:42:08 +0000 (16:42 +0000)
RICH/RICHmenu.C [new file with mode: 0644]

diff --git a/RICH/RICHmenu.C b/RICH/RICHmenu.C
new file mode 100644 (file)
index 0000000..0432643
--- /dev/null
@@ -0,0 +1,79 @@
+
+Int_t events;
+
+RICHmenu(Int_t nev=1)
+{ 
+
+  // static Int_t events;
+
+  //printf("Called for %d events.",events);
+  
+  //gAlice=0;
+  //char *confi="Config.C";
+  //Int_t events=10;
+
+  events=nev;
+
+  char *str="\"Number of events %d\"";
+  
+   TControlBar *menu = new TControlBar("vertical","RICH menu");
+   menu->AddButton("      Help for RICH      ","RICHHelp()", "Explains how to use RICH menus");
+   menu->AddButton("Configure",            "gSystem->Exec(\"rconfig\"); gSystem->Exit(0);","Configure the simulation");
+   //menu->AddButton("Run",               "RICHInit(nev)","Process an Alice event - WARNING: Overwrites previous data file!");
+   menu->AddButton("Run",               "gAlice->Run(events)","Process an Alice event - WARNING: Overwrites previous data file!");
+   //menu->AddButton("Run Lego",          "gAlice->RunLego()","Special run to generate the radl/absl lego plots");
+   menu->AddButton("Digitise Event",             ".x RICHdigit.C(0,events-1)","Digitise event");
+   menu->AddButton("Clusterize Event",      ".x RICHrawclusters.C(0,events-1)","Reconstruct clusters");
+   // TODO: add the diaglevel here before the script
+   menu->AddButton("3D Hough Pat. Rec.",      ".x RICHdetect.C(0,events-1)","Lisbon");
+   menu->AddButton("1D Hough Pat. Rec.",      ".x RICHpatrec.C(0,events-1)","Bari");
+   menu->AddButton("Diagnostics",       ".x RICHDiagnostics.C(events)","Miscellaneous diagnostics");
+   menu->AddButton("Display",           ".x RICHdisplay.C","Display run");
+   menu->AddButton("Geometry Browser",           "Gui()","Browse the GEANT geometry - WARNING: Overwrites previous data file!");
+   menu->AddButton("File Browser",           "TBrowser new;","Browse data files");
+//   menu->AddButton("Test",              ".x RICHtest.C","bla bla");
+//   menu->AddButton("Edit Configuration",".x RICHConfig.C","Interactive Configuration");
+//   menu->AddButton("Draw",              ".x DrawRICH.C","bla bla");
+//   menu->AddButton("View",              ".x ViewRICH.C","does nothing???");
+   menu->AddButton("Quit AliRoot",             ".q","Close session");
+//   menu->AddButton("Reset",             "RICHReset()","Close and Restart AliRoot");
+   
+   //gROOT->SaveContext();
+
+   //gAlice->Init(config);
+   //((TGeant3*)gMC)->InitHIGZ();
+
+   menu->Show();
+}
+
+void RICHHelp()
+{
+   gSystem->Exec("xemacs RICHHelp.C &");
+}
+
+void RICHInit(Int_t events)
+{
+  gAlice->Init("Config.C");
+  ((TGeant3*)gMC)->InitHIGZ();
+  gAlice->Run(events);
+}
+
+void Gui()
+{
+  gAlice->Init("Config.C");
+  ((TGeant3*)gMC)->InitHIGZ();
+  gROOT->ProcessLine(".x TGeant3GUI.C");
+  //printf("Doesn't work yet\n");
+}
+
+
+void RICHReset()
+{
+//   gSystem->Exec("aliroot mrich.C &");
+
+   // This doesn't work for Win (eheheh) and aliroot must be in the path
+   gSystem->Exec("xterm +ls -e aliroot mrich.C &");
+   gSystem->Exit(0);
+}
+
+