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

Last change on this file since 1018 was 924, checked in by tbretz, 23 years ago
*** empty log message ***
File size: 1.1 KB
Line 
1#include <iomanip.h>
2#include <fstream.h>
3#include <iostream.h>
4
5#include <TROOT.h>
6#include <TSystem.h>
7#include <TApplication.h>
8
9#include "MCosy.h"
10#include "MLogManip.h"
11#include "base/timer.h"
12
13#define clog(txt) \
14 lout << edev(MLog::eStdout) << txt << endl << ddev(MLog::eStdout)
15
16int main(int argc, char **argv)
17{
18 Timer time;
19 time.Now();
20
21 //
22 // this must move to MGCosy !!!! (or MApplication)
23 //
24 MLog lout("log/cosy.log", kTRUE);
25
26 clog("Starting Cosy at " << time.GetTimeStr() << " ...");
27
28 //
29 // start the main window
30 //
31 clog("- Initialising Root environment.");
32
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 clog("- Starting mainloop.");
43 app.Run(kTRUE);
44
45 clog("- Stopping cosy.");
46 cosy->Stop();
47 clog("- cosy stopped.");
48
49 delete cosy;
50
51 clog("- Terminating Program.");
52 cout << "The End." << endl;
53}
Note: See TracBrowser for help on using the repository browser.