Changeset 12773 for trunk/Mars


Ignore:
Timestamp:
01/27/12 08:38:27 (13 years ago)
Author:
tbretz
Message:
Seperated the weather data from the MAGIC specific data.
Location:
trunk/Mars/mreport
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/mreport/MReportCC.cc

    r9385 r12773  
    3737//  +  Float_t fDifRubGPS; // [us] Difference between the Rubidium clock time and the time provided by the GPS receiver
    3838//
     39// Class Version 3:
     40// ----------------
     41//  * Moved weather data to new base class
     42//
    3943//
    4044//////////////////////////////////////////////////////////////////////////////
    4145#include "MReportCC.h"
     46
     47#include "fits.h"
    4248
    4349#include "MLogManip.h"
     
    5157#include "MCameraRecTemp.h"
    5258
     59ClassImp(MReportWeather);
    5360ClassImp(MReportCC);
    5461
     
    6067// is expected to have no 'subsystem' time.
    6168//
    62 MReportCC::MReportCC() : MReport("CC-REPORT", kFALSE)
     69MReportCC::MReportCC() : MReportWeather("CC-REPORT")
    6370{
    6471    fName  = "MReportCC";
     
    239246// Print contents of report
    240247//
    241 void MReportCC::Print(Option_t *opt) const
     248void MReportWeather::Print(Option_t *opt) const
    242249{
    243250    *fLog << all << GetDescriptor() << ":  Status=" << (int)GetState();
     
    247254    *fLog << "km/h  SolarRad=" << Form("%4.0f", fSolarRadiation) << "W/m^2" << endl;
    248255}
     256
     257Bool_t MReportWeather::SetupReadingFits(std::fits &file)
     258{
     259    return
     260        file.SetRefAddress("T", fTemperature) &&
     261        file.SetRefAddress("H", fHumidity)    &&
     262        file.SetRefAddress("v", fWindSpeed);
     263}
  • trunk/Mars/mreport/MReportCC.h

    r9385 r12773  
    1111class MCameraRecTemp;
    1212
    13 class MReportCC : public MReport
     13class MReportWeather : public MReport
    1414{
    15 private:
     15protected:
    1616    Float_t fHumidity;        // [%]
    1717    Float_t fTemperature;     // [deg] celsius
     
    1919    Float_t fSolarRadiation;  // [W/m^2] IR-Radiation
    2020
     21    Bool_t SetupReadingFits(std::fits &fits);
     22
     23public:
     24    MReportWeather(const char *rep="WEATHER-REPORT")  : MReport(rep, kFALSE)
     25    {
     26        fName  = "MReportWeather";
     27        fTitle = "Class for Weather data";
     28    }
     29
     30    void Print(Option_t *opt) const;
     31
     32    ClassDef(MReportWeather, 1) // Class for Weather information
     33};
     34
     35class MReportCC : public MReportWeather
     36{
     37private:
    2138    Float_t fUPSStatus;       // arbitrary units (still not properly defined)
    2239    Float_t fDifRubGPS;       // [us] Difference between the Rubidium clock time and the time provided by the GPS receiver
     
    4562    Float_t GetSolarRadiation() const { return fSolarRadiation; }
    4663
    47     void Print(Option_t *opt) const;
    48 
    49     ClassDef(MReportCC, 2) // Class for CC-REPORT information
     64    ClassDef(MReportCC, 3) // Class for CC-REPORT information
    5065};
    5166
Note: See TracChangeset for help on using the changeset viewer.