BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EventDisplay/BesVisClient/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#include <TApplication.h>
10#include <TEnv.h>
11#include <TGClient.h>
12#include <TMath.h>
13#include <TROOT.h>
14#include <TString.h>
15#include <TSystem.h>
16
17#include <TGFileDialog.h>
18#include <TGFrame.h>
19#include <TGLayout.h>
20
21#include <iostream>
22#include <stdlib.h>
23
24#include "BesClient.h"
25#include "BesVisLib/BesVisDisplay.h"
26
27using namespace std;
28
29int main( int argc, char** argv ) {
30 // Long Peixun's update: Output Besvis and developer information
31 printf( "\nWELCOME to BES3 Event Display, Version B.\n" );
32 printf( "This version contains old detectors and MRPC, but does not contain CGEM.\n" );
33 printf( "MRPC display is developed by Huang Shuhui.\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 {
41 setenv( "BESVISLIBROOT",
42 "/ihepbatch/bes/tianhl/workarea/630/EventDisplay/BesVisLib/BesVisLib-00-00-02",
43 1 );
44 }
45 gEnv->SetValue( "+Gui.IconPath", ":${ROOTSYS}/icons:${BESVISLIBROOT}/icons" );
46
47 TApplication theApp( "App", &argc, argv );
48
49 if ( gROOT->IsBatch() )
50 {
51 fprintf( stderr, "%s: cannot run in batch mode\n", argv[0] );
52 return 1;
53 }
54
55 int width = 800;
56 int height = 500;
57 BesClient client( gClient->GetRoot(), "BesVis", width, height, "", theApp.Argc(),
58 theApp.Argv() );
59 try
60 { theApp.Run(); } catch ( const char* s )
61 { std::cout << s << std::endl; }
62
63 return 0;
64}
XmlRpcServer s
int main()
Definition phokhara.cc:42