CGEM BOSS 6.6.5.g
BESIII Offline Software System
Loading...
Searching...
No Matches
EventDisplay/BesVisClient/BesVisClient-00-05-10/src/main.cxx
Go to the documentation of this file.
1/*
2 * 2005/09/26 Zhengyun You Peking University
3 * First import
4 *
5 */
6
7// Main program for Bes3 EventDisplay
8
9
10#include <TApplication.h>
11#include <TGClient.h>
12#include <TROOT.h>
13#include <TSystem.h>
14#include <TEnv.h>
15#include <TString.h>
16#include <TMath.h>
17
18#include <TGFrame.h>
19#include <TGLayout.h>
20#include <TGFileDialog.h>
21
22#include <iostream>
23#include <stdlib.h>
24
27
28using namespace std;
29
30
31int main(int argc, char **argv) {
32 //Long Peixun's update: Output Besvis and developer information
33 printf("\nWELCOME to BES3 Event Display, Version A.\n");
34 printf("This version contains old detectors, MRPC and CGEM.\n");
35 printf("MRPC display is developed by Huang Shuhui.\n");
36 printf("CGEM display is developed by Long Peixun.\n\n");
37
38 gEnv->SetValue("Gui.BackgroundColor", "#d6def7");
39 gEnv->SetValue("Gui.SelectBackgroundColor", "#ffeec2");
40 gEnv->SetValue("Gui.SelectForegroundColor", "black");
41
42 if (getenv("BESVISLIBROOT") == 0){
43 setenv("BESVISLIBROOT", "/ihepbatch/bes/tianhl/workarea/630/EventDisplay/BesVisLib/BesVisLib-00-00-02", 1);
44 }
45 gEnv->SetValue("+Gui.IconPath", ":${BESVISLIBROOT}/icons");
46
47 TApplication theApp("App", &argc, argv);
48
49 if (gROOT->IsBatch()) {
50 fprintf(stderr, "%s: cannot run in batch mode\n", argv[0]);
51 return 1;
52 }
53
54 int width = 800;
55 int height = 500;
56 BesClient client(gClient->GetRoot(), "BesVis", width, height, "", theApp.Argc(), theApp.Argv());
57 try{
58 theApp.Run();
59 }
60 catch (const char *s){
61 std::cout << s << std::endl;
62 }
63
64 return 0;
65}
66
XmlRpcServer s
Definition: HelloServer.cpp:11
int main()
Definition: test_IFile.cxx:11