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

Last change on this file since 913 was 912, checked in by tbretz, 25 years ago
*** empty log message ***
File size: 998 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
11int main(int argc, char **argv)
12{
13 cout << endl;
14 cout << "Starting..." << endl;
15 cout << endl;
16
17 //
18 // this must move to MGCosy !!!! (or MApplication)
19 //
20 ofstream lout("cosy.log");
21 lout << "Starting Cosy" << endl;
22
23 //
24 // start the main window
25 //
26 lout << "- Initialising Root environment." << endl;
27 TROOT root("Cosy", "Magic Control System");
28 TApplication app("App", &argc, argv);
29
30 //
31 // Create the Network. Device: /dev/dpm_00, Rate: 500kbps
32 //
33 MCosy *cosy = new MCosy("/dev/dpm_00", 500, lout);
34 cosy->Start();
35
36 lout << "- Starting mainloop." << endl;
37 app.Run(kTRUE);
38
39 lout << "- Stopping cosy." << endl;
40 cosy->Stop();
41 lout << "- cosy stopped." << endl;
42
43 delete cosy;
44
45 lout << "- Terminating Program." << endl;
46 cout << "The End." << endl;
47}
Note: See TracBrowser for help on using the repository browser.