BOSS 7.0.4
BESIII Offline Software System
Loading...
Searching...
No Matches
EventDisplay/BesVisClient/BesVisClient-00-04-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
25#include "BesVisClient/BesClient.h"
26#include "BesVisLib/BesVisDisplay.h"
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 B.\n");
34 printf("This version contains old detectors and MRPC, but does not contain CGEM.\n");
35 printf("MRPC display is developed by Huang Shuhui.\n\n");
36
37 gEnv->SetValue("Gui.BackgroundColor", "#d6def7");
38 gEnv->SetValue("Gui.SelectBackgroundColor", "#ffeec2");
39 gEnv->SetValue("Gui.SelectForegroundColor", "black");
40
41 if (getenv("BESVISLIBROOT") == 0){
42 setenv("BESVISLIBROOT", "/ihepbatch/bes/tianhl/workarea/630/EventDisplay/BesVisLib/BesVisLib-00-00-02", 1);
43 }
44 gEnv->SetValue("+Gui.IconPath", ":${BESVISLIBROOT}/icons");
45
46 TApplication theApp("App", &argc, argv);
47
48 if (gROOT->IsBatch()) {
49 fprintf(stderr, "%s: cannot run in batch mode\n", argv[0]);
50 return 1;
51 }
52
53 int width = 800;
54 int height = 500;
55 BesClient client(gClient->GetRoot(), "BesVis", width, height, "", theApp.Argc(), theApp.Argv());
56 try{
57 theApp.Run();
58 }
59 catch (const char *s){
60 std::cout << s << std::endl;
61 }
62
63 return 0;
64}
65
XmlRpcServer s
Definition: HelloServer.cpp:11
int main()
Definition: test_IFile.cxx:11