| 1 | /* ======================================================================== *\
|
|---|
| 2 | !
|
|---|
| 3 | ! *
|
|---|
| 4 | ! * This file is part of MARS, the MAGIC Analysis and Reconstruction
|
|---|
| 5 | ! * Software. It is distributed to you in the hope that it can be a useful
|
|---|
| 6 | ! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
|
|---|
| 7 | ! * It is distributed WITHOUT ANY WARRANTY.
|
|---|
| 8 | ! *
|
|---|
| 9 | ! * Permission to use, copy, modify and distribute this software and its
|
|---|
| 10 | ! * documentation for any purpose is hereby granted without fee,
|
|---|
| 11 | ! * provided that the above copyright notice appear in all copies and
|
|---|
| 12 | ! * that both that copyright notice and this permission notice appear
|
|---|
| 13 | ! * in supporting documentation. It is provided "as is" without express
|
|---|
| 14 | ! * or implied warranty.
|
|---|
| 15 | ! *
|
|---|
| 16 | !
|
|---|
| 17 | !
|
|---|
| 18 | ! Author(s): Thomas Bretz, 11/2003 <mailto:tbretz@astro.uni-wuerzburg.de>
|
|---|
| 19 | !
|
|---|
| 20 | ! Copyright: MAGIC Software Development, 2000-2003
|
|---|
| 21 | !
|
|---|
| 22 | !
|
|---|
| 23 | \* ======================================================================== */
|
|---|
| 24 | /*
|
|---|
| 25 | Bool_t HandleInput()
|
|---|
| 26 | {
|
|---|
| 27 | TTimer timer("gSystem->ProcessEvents();", 50, kFALSE);
|
|---|
| 28 | while (1)
|
|---|
| 29 | {
|
|---|
| 30 | //
|
|---|
| 31 | // While reading the input process gui events asynchronously
|
|---|
| 32 | //
|
|---|
| 33 | timer.TurnOn();
|
|---|
| 34 | TString input = Getline("Type 'q' to exit, <return> to go on: ");
|
|---|
| 35 | timer.TurnOff();
|
|---|
| 36 |
|
|---|
| 37 | if (input=="q\n")
|
|---|
| 38 | return kFALSE;
|
|---|
| 39 |
|
|---|
| 40 | if (input=="\n")
|
|---|
| 41 | return kTRUE;
|
|---|
| 42 | };
|
|---|
| 43 |
|
|---|
| 44 | return kFALSE;
|
|---|
| 45 | }
|
|---|
| 46 | */
|
|---|
| 47 | void readrep(const char *fname="CC_2003_11_04_23_53_18.rep")
|
|---|
| 48 | {
|
|---|
| 49 | MParList plist;
|
|---|
| 50 | MTaskList tlist;
|
|---|
| 51 | plist.AddToList(&tlist);
|
|---|
| 52 |
|
|---|
| 53 | MReportFileRead read(fname);
|
|---|
| 54 | tlist.AddToList(&read);
|
|---|
| 55 |
|
|---|
| 56 | MReportDAQ daq;
|
|---|
| 57 | MReportDrive drive;
|
|---|
| 58 | MReportCamera camera;
|
|---|
| 59 | MReportTrigger trigger;
|
|---|
| 60 | read.AddToList(&daq);
|
|---|
| 61 | read.AddToList(&drive);
|
|---|
| 62 | read.AddToList(&camera);
|
|---|
| 63 | read.AddToList(&trigger);
|
|---|
| 64 |
|
|---|
| 65 | MEvtLoop evtloop;
|
|---|
| 66 | evtloop.SetParList(&plist);
|
|---|
| 67 |
|
|---|
| 68 | if (!evtloop.Eventloop())
|
|---|
| 69 | return;
|
|---|
| 70 |
|
|---|
| 71 | tlist.PrintStatistics();
|
|---|
| 72 | }
|
|---|