source: trunk/MagicSoft/Mars/mreport/MReportCC.cc@ 4896

Last change on this file since 4896 was 4575, checked in by tbretz, 20 years ago
*** empty log message ***
File size: 2.6 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, 12/2003 <mailto:tbretz@astro.uni-wuerzburg.de>
19!
20! Copyright: MAGIC Software Development, 2000-2003
21!
22!
23\* ======================================================================== */
24
25//////////////////////////////////////////////////////////////////////////////
26//
27// MReportCC
28//
29// This is the class interpreting and storing the CC-REPORT information.
30//
31// From here maily weather station data is decoded such as
32// temperature, humidity, wind-speed and solar radiation
33//
34//////////////////////////////////////////////////////////////////////////////
35#include "MReportCC.h"
36
37#include "MLogManip.h"
38
39#include "MAstro.h"
40
41ClassImp(MReportCC);
42
43using namespace std;
44
45// --------------------------------------------------------------------------
46//
47// Default construtor. Initialize identifier to "CC-REPORT" Report
48// is expected to have no 'subsystem' time.
49//
50MReportCC::MReportCC() : MReport("CC-REPORT", kFALSE)
51{
52 fName = "MReportCC";
53 fTitle = "Class for CC-REPORT information";
54}
55
56// --------------------------------------------------------------------------
57//
58// Interprete the body of the CC-REPORT string
59//
60Int_t MReportCC::InterpreteBody(TString &str, Int_t ver)
61{
62 // Remove the 30 tokens of the subsystem status
63 // table 12.1 p59
64 for (int i=0; i<30; i++)
65 str.Remove(0, str.First(' ')+1);
66
67 Int_t len;
68 const Int_t n=sscanf(str.Data(),
69 "%*f %*f %*f %*f %f %f %f %f %*f %*f %n",
70 &fTemperature, &fSolarRadiation, &fWindSpeed,
71 &fHumidity, &len);
72 if (n!=4)
73 {
74 *fLog << warn << "WARNING - Wrong number of arguments." << endl;
75 return kCONTINUE;
76 }
77 /*
78 str.Remove(0, len);
79
80 *fLog << dbg << str << endl;
81
82 if (str!=(TString)"OVER")
83 {
84 *fLog << err << "ERROR - Termination (OVER) too far away." << endl;
85 return kFALSE;
86 }
87 */
88 return kTRUE;
89}
Note: See TracBrowser for help on using the repository browser.