]> git.uio.no Git - u/mrichter/AliRoot.git/blob - html/menu.txt
Add undulated version 3 for the PIPE. By S.Chattopadhyay.
[u/mrichter/AliRoot.git] / html / menu.txt
1 void menu(const char *config="Config.C")
2 {
3    TControlBar *menu = new TControlBar("vertical","gAlice menu");
4    menu->AddButton("    Help to run gAlice    ","AliceHelp()", "Explains how to use gAlice menus");
5    menu->AddButton("Run",             "gAlice->Run()","Process an Alice event");
6    menu->AddButton("Run Lego",        "gAlice->RunLego()","Special run to generate the radl/absl lego plots");
7    menu->AddButton("Top view",        "DrawTopView()","Draw Top view (cut) of Alice");
8    menu->AddButton("Side view",       "DrawSideView()","Draw Side view (cut) of Alice");
9    menu->AddButton("Front view",      "DrawFrontView()","Draw Front view (cut) of Alice");
10    menu->AddButton("Menu Trees",      ".x DrawTrees.C","Menu to display the Alice Geant trees");
11    menu->AddButton("Menu Pictures",   ".x DrawPictures.C","Menu to display detectors in shaded mode");
12    menu->AddButton("Hide ON",         "SetHide(1)","Activate drawing option HIDE");
13    menu->AddButton("Hide OFF",        "SetHide(0)","DeActivate drawing option HIDE");
14    menu->AddButton("Shading ON",      "SetShade(1)","Activate drawing option SHAD");
15    menu->AddButton("Shading OFF",     "SetShade(0)","DeActivate drawing option SHAD");
16 //   menu->AddButton("RayTracing ON",   "SetRayTracing(1)","Activate drawing option RAYT");
17 //   menu->AddButton("RayTracing OFF",  "SetRayTracing(0)","DeActivate drawing option RAYT");
18    menu->AddButton("Box Clip ON",     "SetBoxClip(1)","Activate clipping box");
19    menu->AddButton("Box Clip OFF",    "SetBoxClip(0)","DeActivate clipping box");
20 //   menu->AddButton("Parallel view",   "SetViewType(1)","Set Parallel view");
21 //   menu->AddButton("Perspective view","SetViewType(0)","Set Perspective view");
22    gROOT->SaveContext();
23    gAlice->Init(config);
24    geant3->InitHIGZ();
25    menu->Show();
26 }
27
28 void AliceHelp()
29 {
30    gSystem->Exec("nedit AliceHelp.C &");
31 }
32
33 void SetRange()
34 {
35    THIGZ *higz = (THIGZ*)gROOT->GetListOfCanvases()->FindObject("higz");
36    if (higz) higz->Range(0,0,20,20);
37 }
38
39 void DrawTopView()
40 {
41    printf("Generating TOP view of Alice. Be patient one minute!\n");
42    SetRange();
43    geant3->Gdrawc("ALIC",2,0,10,10,0.01,0.01);
44 }
45
46 void DrawSideView()
47 {
48    printf("Generating SIDE view of Alice. Be patient one minute!\n");
49    SetRange();
50    geant3->Gdrawc("ALIC",1,0,10,10,0.01,0.01);
51 }
52
53 void DrawFrontView()
54 {
55    printf("Generating FRONT view of Alice. Be patient one minute!\n");
56    SetRange();
57    geant3->Gdrawc("ALIC",3,0,10,10,0.01,0.01);
58 }
59
60 void SetHide(Int_t opt)
61 {
62    if (opt) {
63       printf("Drawing option HIDE is ACTIVE!\n");
64       geant3->Gdopt("HIDE","ON");
65    } else {
66       printf("Drawing option HIDE is NOT ACTIVE!\n");
67       geant3->Gdopt("HIDE","OFF");
68    }
69 }
70
71 void SetShade(Int_t opt)
72 {
73    if (opt) {
74       printf("Drawing option SHAD is ACTIVE!\n");
75       geant3->Gdopt("SHAD","ON");
76    } else {
77       printf("Drawing option SHAD is NOT ACTIVE!\n");
78       geant3->Gdopt("SHAD","OFF");
79    }
80 }
81
82 void SetRayTracing(Int_t opt)
83 {
84    if (opt) {
85       printf("Drawing option RAYT is ACTIVE!\n");
86       geant3->Gdopt("RAYT","ON");
87    } else {
88       printf("Drawing option RAYT is NOT ACTIVE!\n");
89       geant3->Gdopt("RAYT","OFF");
90    }
91 }
92
93 void SetBoxClip(Int_t opt)
94 {
95    if (opt) {
96       printf("Clipping BOX is ACTIVE!\n");
97       geant3->SetClipBox("*", 0, 1000, -1000, 1000, -1000, 1000);
98    } else {
99       printf("Clipping BOX is NOT ACTIVE!\n");
100       geant3->SetClipBox(".");
101    }
102 }
103
104 void SetViewType(Int_t opt)
105 {
106    if (opt) {
107       printf("Setting PARALLEL view!\n");
108       geant3->Gdopt("PROJ","PARA");
109    } else {
110       printf("Setting PERSPECTIVE view!\n");
111       geant3->Gdopt("PROJ","PERS");
112    }
113 }