source: trunk/MagicSoft/Mars/mreport/MReportRun.cc@ 2728

Last change on this file since 2728 was 2711, 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, 12/2003 <mailto:tbretz@astro.uni-wuerzburg.de>
19!
20! Copyright: MAGIC Software Development, 2000-2003
21!
22!
23\* ======================================================================== */
24
25//////////////////////////////////////////////////////////////////////////////
26//
27// MReportRun
28//
29// This is the class interpreting and storing the RUN-REPORT information.
30//
31// PRELIMINARY!
32//
33//////////////////////////////////////////////////////////////////////////////
34#include "MReportRun.h"
35
36#include "MLogManip.h"
37
38#include "MAstro.h"
39
40ClassImp(MReportRun);
41
42using namespace std;
43
44MReportRun::MReportRun() : MReport("RUN-REPORT", kFALSE), fRunNumber(0)
45{
46 fName = "MReportRun";
47 fTitle = "Class for RUN-REPORT information";
48}
49
50Bool_t MReportRun::InterpreteBody(TString &str)
51{
52 Int_t len;
53 const Int_t n=sscanf(str.Data(), "%d %n", &fRunNumber, &len);
54 if (n!=1)
55 {
56 *fLog << err << "ERROR - Wrong number of arguments." << endl;
57 return kFALSE;
58 }
59 str.Remove(0, len);
60
61 if (str.BeginsWith("END"))
62 fRunNumber = -1;
63
64 str.Remove(0, 6);
65 str = str.Strip(TString::kBoth);
66 Ssiz_t pos = str.First(' ');
67 if (pos<0)
68 pos = str.Length();
69 fSourceName = str(0, pos+1);
70
71 return kTRUE;
72}
Note: See TracBrowser for help on using the repository browser.