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

Last change on this file since 1986 was 1819, checked in by tbretz, 22 years ago
*** empty log message ***
File size: 1.3 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 "MGStarguider.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 MGStarguider(MObservatory::kMagic1);
30
31 if (dummy)
32 {
33 cout << " --> Starting in dummy-mode. <--" << endl;
34 PngReader *read=new PngReader(*client);
35 app->Run(kTRUE);
36 read->ExitLoop();
37 delete read;
38 // delete client;
39 }
40 else
41 {
42 cout << " --> Starting in real-mode. <--" << endl;
43 //PixClient *client=new MGStarguider(MObservatory::kMagic1);
44 Camera *cam = new Camera(*client);
45 cam->Loop(0);
46 app->Run(kTRUE);
47 cam->ExitLoop();
48 delete cam;
49 // delete client;
50 }
51
52 delete client;
53
54
55 cout << "Application end...." << endl;
56
57 cout << "Exit." << endl;
58
59 return 0;
60}
Note: See TracBrowser for help on using the repository browser.