source: branches/Corsika7405Compatibility/mreport/MReportPyrometer.cc@ 18295

Last change on this file since 18295 was 8936, checked in by tbretz, 16 years ago
*** empty log message ***
File size: 2.3 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, 6/2008 <mailto:tbretz@astro.uni-wuerzburg.de>
19!
20! Copyright: MAGIC Software Development, 2000-2008
21!
22!
23\* ======================================================================== */
24
25//////////////////////////////////////////////////////////////////////////////
26//
27// MReportPyrometer
28//
29// This is the class interpreting and storing the PYRO-REPORT information.
30//
31// These reports exist since 2007/05/15
32//
33//////////////////////////////////////////////////////////////////////////////
34#include "MReportPyrometer.h"
35
36#include "MLogManip.h"
37
38ClassImp(MReportPyrometer);
39
40using namespace std;
41
42// --------------------------------------------------------------------------
43//
44// Default construtor. Initialize identifier to "RUN-REPORT" No subsystem
45// is expected.
46//
47MReportPyrometer::MReportPyrometer() : MReport("PYRO-REPORT"),
48 fTempSky(-1), fTempAir(-1), fCloudiness(-1), fLidOpen(kFALSE)
49
50{
51 fName = "MReportPyrometer";
52 fTitle = "Class for PYRO-REPORT information";
53}
54
55// --------------------------------------------------------------------------
56//
57// Interprete the body of the PYRO-REPORT string
58//
59Int_t MReportPyrometer::InterpreteBody(TString &str, Int_t ver)
60{
61 str = str.Strip(TString::kBoth);
62
63 Int_t status, len;
64
65 const Int_t n=sscanf(str.Data(), "%f %f %d %f %n",
66 &fTempSky, &fCloudiness, &status, &fTempAir, &len);
67 if (n!=4)
68 {
69 *fLog << warn << "WARNING - Wrong number of arguments." << endl;
70 return kCONTINUE;
71 }
72
73 fLidOpen = status>0;
74
75 str.Remove(0, len);
76 str = str.Strip(TString::kBoth);
77
78 return str=="OVER" ? kTRUE : kCONTINUE;
79}
Note: See TracBrowser for help on using the repository browser.