source: trunk/MagicSoft/Mars/mreport/MReportDrive.cc@ 2529

Last change on this file since 2529 was 2520, checked in by tbretz, 21 years ago
*** empty log message ***
File size: 2.0 KB
Line 
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//////////////////////////////////////////////////////////////////////////////
26//
27// MReportDrive
28//
29//////////////////////////////////////////////////////////////////////////////
30#include "MReportDrive.h"
31
32#include "MLogManip.h"
33
34#include "MAstro.h"
35
36ClassImp(MReportDrive);
37
38using namespace std;
39
40MReportDrive::MReportDrive() : MReport("DRIVE-REPORT")
41{
42 fName = "MReportDrive";
43}
44
45Bool_t MReportDrive::InterpreteBody(TString &str)
46{
47 MAstro::String2Angle(str, fRa);
48 MAstro::String2Angle(str, fDec);
49 MAstro::String2Angle(str, fHa);
50
51 Int_t len;
52 Int_t n=sscanf(str.Data(), "%lf %n", &fMjd, &len);
53 if (n!=1)
54 return kFALSE;
55
56 str.Remove(0, len);
57
58 MAstro::String2Angle(str, fNominalZd);
59 MAstro::String2Angle(str, fNominalAz);
60 MAstro::String2Angle(str, fCurrentZd);
61 MAstro::String2Angle(str, fCurrentAz);
62
63 n=sscanf(str.Data(), "%lf %lf %n", &fErrorZd, &fErrorAz, &len);
64 if (n!=2)
65 return kFALSE;
66
67 str.Remove(0, len);
68
69 str = str.Strip(TString::kBoth);
70
71 *fLog << dbg << "D" << flush;
72
73 return str.IsNull();
74}
Note: See TracBrowser for help on using the repository browser.