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