source: trunk/MagicSoft/Cosy/starg.cc@ 2817

Last change on this file since 2817 was 2278, checked in by tbretz, 21 years ago
*** empty log message ***
File size: 1.1 KB
Line 
1#include <TROOT.h>
2#include <TApplication.h>
3
4#include <iostream.h>
5
6#include "Camera.h"
7#include "PngReader.h"
8#include "MStarguider.h"
9
10/* ---------------------------------------------------------------------- */
11//extern void InitGui();
12//VoidFuncPtr_t initfuncs[] = { InitGui, 0 };
13
14TROOT root("GUI", "GUI test environement"); //, initfuncs);
15
16int main(int argc, char **argv)
17{
18 TApplication *app=new TApplication("Starguider", &argc, argv);
19
20 Bool_t dummy = kFALSE;
21
22 for (int i=0; i<argc; i++)
23 {
24 TString arg(argv[i]);
25 if (arg=="-d")
26 dummy = kTRUE;
27 }
28
29 PixClient *client=new MStarguider(MObservatory::kMagic1);
30 PixGetter *get;
31
32 if (dummy)
33 {
34 cout << " --> Starting in dummy-mode. <--" << endl;
35 get=new PngReader(*client);
36 }
37 else
38 {
39 cout << " --> Starting in real-mode. <--" << endl;
40 get = new Camera(*client);
41 ((Camera*)get)->Loop(0);
42 }
43
44 app->Run(kTRUE);
45 get->ExitLoop();
46
47 delete get;
48 delete client;
49
50 cout << "Application end...." << endl;
51
52 cout << "Exit." << endl;
53
54 return 0;
55}
Note: See TracBrowser for help on using the repository browser.