source: trunk/MagicSoft/Mars/mreport/MReportStarguider.cc@ 6724

Last change on this file since 6724 was 5796, checked in by riegel, 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, 11/2003 <mailto:tbretz@astro.uni-wuerzburg.de>
19! Benjamin Riegel, 01/2005 <mailto:riegel@astro.uni-wuerzburg.de>
20!
21! Copyright: MAGIC Software Development, 2000-2005
22!
23!
24\* ======================================================================== */
25
26//////////////////////////////////////////////////////////////////////////////
27//
28// MReportStarguider
29//
30// This is the class interpreting and storing the STARG-REPORT information.
31//
32// This is the place to get the azimuth-/zenith mispointing of the telescope
33// given by the starguider-camera.
34//
35//
36//
37// Double_t fDevAz; // [deg] azimuth mispointing
38// Double_t fDevZd; // [deg] zenith mispointing
39//
40//
41//////////////////////////////////////////////////////////////////////////////
42#include "MReportStarguider.h"
43
44#include "MLogManip.h"
45
46ClassImp(MReportStarguider);
47
48using namespace std;
49
50// --------------------------------------------------------------------------
51//
52// Default constructor. Initialize identifier to "STARG-REPORT"
53//
54MReportStarguider::MReportStarguider() : MReport("STARG-REPORT"),
55 fDevAz(0), fDevZd(0)
56{
57 fName = "MReportStarguider";
58 fTitle = "Class for STARG-REPORT information (telescope mispointing)";
59}
60
61// --------------------------------------------------------------------------
62//
63// Interprete the body of the STARG-REPORT string
64//
65Int_t MReportStarguider::InterpreteBody(TString &str, Int_t ver)
66{
67 Int_t len;
68 Int_t n=sscanf(str.Data(), "%lf %lf %n", &fDevAz, &fDevZd, &len);
69 if (n!=2)
70 {
71 *fLog << warn << "WARNING - Not enough arguments." << endl;
72 return kCONTINUE;
73 }
74
75 str.Remove(0, len);
76
77 str = str.Strip(TString::kBoth);
78
79 return str.IsNull() ? kTRUE : kCONTINUE;
80}
81
82
83void MReportStarguider::Print(Option_t *o) const
84{
85 *fLog << GetDescriptor() << ": DevZd=" << fDevZd << " DevAz=" << fDevAz << endl;
86}
Note: See TracBrowser for help on using the repository browser.