source: trunk/MagicSoft/Cosy/cosy.cc@ 759

Last change on this file since 759 was 738, checked in by tbretz, 24 years ago
*** empty log message ***
File size: 1011 bytes
Line 
1#include "MCosy.h"
2
3#include <iomanip.h>
4#include <fstream.h>
5#include <iostream.h>
6
7#include <TROOT.h>
8#include <TSystem.h>
9#include <TApplication.h>
10
11#include "MGCosy.h"
12
13#include "macs.h"
14#include "timer.h"
15#include "slalib.h"
16#include "slamac.h"
17#include "shaftencoder.h"
18
19#include <sys/resource.h> // PRIO_PROCESS
20
21int main(int argc, char **argv)
22{
23 //
24 // this must move to MGCosy !!!! (or MApplication)
25 //
26 ofstream lout("cosy.log");
27 lout << "Starting Cosy" << endl;
28
29 //
30 // start the main window
31 //
32 lout << "- Initialising Root environment." << endl;
33 TROOT root("Cosy", "Magic Control System");
34 TApplication app ("App", &argc, argv);
35
36 //
37 // Create the Network. Device: /dev/dpm_00, Rate: 500kbps
38 //
39 MCosy *cosy = new MCosy("/dev/dpm_00", 500, lout);
40 cosy->Start();
41
42 lout << "- Starting mailoop." << endl;
43 app.Run();
44
45 cosy->Stop();
46
47 delete cosy;
48
49 lout << "- Terminating Program." << endl;
50 cout << "The End." << endl;
51}
Note: See TracBrowser for help on using the repository browser.