]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/TPCLib/OnlineDisplay/StartDisplayMacro.C
Jochen's TPCLib source code from Jan 2006 merged
[u/mrichter/AliRoot.git] / HLT / TPCLib / OnlineDisplay / StartDisplayMacro.C
CommitLineData
738c049f 1/************************************************************************
2**
3** This file is property of and copyright by the Computer Science/Computer
4** Engineering Group, Kirchhoff Institute for Physics, Ruprecht-Karls-
5** University, Heidelberg, Germany, 2005
6** This file has been written by Jochen Thaeder,
7** thaeder@kip.uni-heidelberg.de
8**
9**
10** See the file license.txt for details regarding usage, modification,
11** distribution and warranty.
12** Important: This file is provided without any warranty, including
13** fitness for any particular purpose.
14**
15**
16** Newer versions of this file's package will be made available from
17** http://www.kip.uni-heidelberg.de/ti/HLT/
18** or the corresponding page of the Heidelberg Alice HLT group.
19**
20*************************************************************************/
21
22// *****************************************************************
23// * USEAGE in ROOT
24// *****************************************************************
25// * -->LOAD the macro first:
26// * .L ("HLT-OnlineDisplay-HOMER.C");
27// *
28// * --> use with ".p FUNCTION;" OR here as macro function
29// * ODH_Init();
30// * ODH_Connect(Char_t *hostname1,Int_t port1,Char_t *hostname2,Int_t port2,Char_t *hostname3,Int_t port3);
31// * ODH_DisplayEvent(); // Display NextEvent
32// *
33// * ODH_SetSliceRange(); // Sets Slice: ALL
34// * ODH_SetSliceRange(Int_t slice); // Sets Slice: "slice"
35// * ODH_SetSliceRange(Int_t minslice, Int_t maxslice); // Sets Slice: "minslice" to "maxslice"
36// * ODH_SetSlicePair(Int_t slice); // Sets Slice: "slice" and "slice"+9
37// * ODH_SetSlicePair(Int_t minslice, Int_t maxslice); // Sets Slice: ["minslice" to "maxslice"] and ["minslice"+9 to "maxslice"+9]
38// *
39// * ODH_SetCluster(Bool_t used, Bool_t unused); // Sets Cluster: used, unused, all(= used && unused)
40// *
41// * ODH_SetInvert(); // Invert 3D Display
42// * ODH_SetKeepView(Bool_t keepview); // Keep 3D View
43// *
44// * ODH_SetPadRow(Int_t slice, Int_t padrow, Int_t pad); // Set PadRow "padrow" within Slice "slice" and Pad "pad"(=0 per default)
45// *
46// * ODH_SetSelectTrack(Bool_t switch, Int_t slice, Int_t track); // with switch=true :Select Single Track "track" in Slice "slice"
47// * // turn off: ODH_SetSelectTrack();
48// *
49// * ODH_SetTrack(Int_t minhits, Float_t ptthreshold); // Sets Cuts in order to display tracks, both default is 0
50// *
51// * ODH_Set3D(Bool_t tracks, Bool_t cluster, Bool_t padrow, Bool_t geometry); // Switches for the 3D Display
52// * ODH_Set3DTracks(Bool_t on); // Set 3D tracks, default is off
53// * ODH_Set3DCluster(Bool_t on); // Set 3D cluster, default is off
54// * ODH_Set3DPadRow(Bool_t on); // Set 3D padrow, default is off
55// * ODH_Set3DGeometry(Bool_t on); // Set 3D geometry, default is off
56// *
57// *****************************************************************
a38a7850 58{
59
738c049f 60 gROOT->LoadMacro("HLT-OnlineDisplay-HOMER.C");
61
62 // --- LOAD DISPLAY FUNCTIONS
63 HLT_OnlineDisplay_HOMER();
64
65 // --- INITIALIZE DISPLAY, LOAD GEOMETRY FILE, LOAD LIBRARIES (HOMER,HLT,..)
66 ODH_Init();
67
68 // --- CONNECT TO TCP DUMP SUBSCRIBERS
69 ODH_Connect("e300",42002,NULL,NULL,"e300",42001);
70
71 // --- Next Event
72 ODH_DisplayEvent();
73
74 barCl = new TControlBar("vertical", "HLT DISPLAY - Cluster");
75 barCl->AddButton("All Cluster",".p ODH_SetCluster(true,true)", "All Cluster");
76 barCl->AddButton("Used Cluster",".p ODH_SetCluster(true,false)", "Used Cluster");
77 barCl->AddButton("Unused Cluster",".p ODH_SetCluster(false,true)", "Unused Cluster");
78 barCl->Show();
79
80 bar = new TControlBar("vertical", "HLT DISPLAY");
81 bar->AddButton("Next Event",".p ODH_DisplayEvent()", "Next Event");
82 bar->AddSeparator();
83 bar->AddButton("Show all slices",".p ODH_SetSliceRange()", "Show all slices");
84 bar->AddSeparator();
85 bar->AddButton("Keep 3D View",".p ODH_SetKeepView(true)", "Keep 3D View");
86 bar->AddButton("!Keep 3D View",".p ODH_SetKeepView(false)", "Keep 3D View");
87 bar->AddButton("Invert 3D View",".p ODH_SetInvert()","Invert 3D View");
88 bar->AddSeparator();
89 bar->AddButton("Show 3D Tracks",".p ODH_Set3DTracks(true)","Show 3D Tracks");
90 bar->AddButton("!Show 3D Tracks",".p ODH_Set3DTracks()","!Show 3D Tracks");
91 bar->AddButton("Show 3D Cluster",".p ODH_Set3DCluster(true)","Show 3D Cluster");
92 bar->AddButton("!Show 3D Cluster",".p ODH_Set3DCluster()","!Show 3D Cluster");
93 bar->AddButton("Show 3D PadRow",".p ODH_Set3DPadRow(true)","Show 3D PadRow");
94 bar->AddButton("!Show 3D PadRow",".p ODH_Set3DPadRow()","!Show 3D PadRow");
95 bar->AddButton("Show 3D Geometry",".p ODH_Set3DGeometry(true)","Show 3D Geometry");
96 bar->AddButton("!Show 3D Geometry",".p ODH_Set3DGeometry()","!Show 3D Geometry");
97 bar->AddSeparator();
98 bar->AddButton("Show Sector 0",".p ODH_SetSliceRange(0)", "Show Next Event");
99 bar->AddButton("Show Sector 9",".p ODH_SetSliceRange(9)", "Show Next Event");
100 bar->AddButton("Show Sector 18",".p ODH_SetSliceRange(18)", "Show Next Event");
101 bar->AddButton("Show Sector 27",".p ODH_SetSliceRange(27)", "Show Next Event");
102 bar->AddButton("Show Sector 0 - 2",".p ODH_SetSliceRange(0,2)", "Show Next Event");
103 bar->AddButton("Show Sector 0 - 9",".p ODH_SetSliceRange(0,9)", "Show Next Event");
104 bar->AddButton("Show pair 0",".p ODH_SetSlicePair(0)", "Show Next Event");
105 bar->AddButton("Show pair 0 - 2",".p ODH_SetSlicePair(0,2)", "Show Next Event");
106
107 bar->AddSeparator();
108
109bar->AddButton("Close","gROOT.Reset(\"a\")", "Close");
a38a7850 110bar->Show();
111gROOT->SaveContext();
112}
113
114