BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
main.cxx File Reference
#include <TApplication.h>
#include <TEnv.h>
#include <TGClient.h>
#include <TMath.h>
#include <TROOT.h>
#include <TString.h>
#include <TSystem.h>
#include <TGFileDialog.h>
#include <TGFrame.h>
#include <TGLayout.h>
#include <iostream>
#include <stdlib.h>
#include "BesClient.h"
#include "BesVisLib/BesVisDisplay.h"

Go to the source code of this file.

Functions

int main (int argc, char **argv)

Function Documentation

◆ main()

int main ( int argc,
char ** argv )

Definition at line 29 of file EventDisplay/BesVisClient/src/main.cxx.

29 {
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