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

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