Ignore:
Timestamp:
12/10/03 11:56:33 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mreport
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mreport/MReport.cc

    r2604 r2632  
    6060    int n = sscanf(str.Data(),
    6161                   fHasReportTime ?
    62                    " %d %d %d %d %d %d %d %d "
    63                    "%*d %*d %*d %*d %*d %*d %*d %*d %n" :
    64                    " %d %*d %*d %*d %d %d %d %d ",
     62                   " %d %d %d %d %d %d %d %d %*d %*d %*d %*d %*d %*d %*d %*d %n" :
     63                   " %d %d %d %d %d %d %d %d %n",
    6564                   &state, &yea, &mon, &day, &hor, &min, &sec, &ms, &len);
    6665    if (n!=8)
    6766    {
    68         *fLog << err << "ERROR - Cannot interprete Body of " << fIdentifier << endl;
     67        *fLog << err << "ERROR - Cannot interprete Body of " << fIdentifier << " (n=" << n << ")" << endl;
    6968        return kFALSE;
    7069    }
     
    8180
    8281    str.Remove(0, len);
     82
    8383    return kTRUE;
    8484}
  • trunk/MagicSoft/Mars/mreport/MReportCurrents.cc

    r2597 r2632  
    3636#include "MLogManip.h"
    3737
    38 #include "MAstro.h"
     38#include "MParList.h"
     39#include "MCameraDC.h"
    3940
    4041ClassImp(MReportCurrents);
     
    4243using namespace std;
    4344
    44 MReportCurrents::MReportCurrents() : MReport("DC-REPORT"), fCurrents(577)
     45MReportCurrents::MReportCurrents() : MReport("DC-REPORT", kFALSE)
    4546{
    4647    fName  = "MReportCurrents";
    4748    fTitle = "Class for DC-REPORT information";
    4849}
     50
     51Bool_t MReportCurrents::SetupReading(MParList &plist)
     52{
     53    fDC = (MCameraDC*)plist.FindCreateObj("MCameraDC");
     54    if (!fDC)
     55        return kFALSE;
     56
     57    return MReport::SetupReading(plist);
     58}
     59
    4960
    5061// Currents-REPORT 02 2003 11 04 23 53 34 951 00 0000 00 00 23 53 32 466
     
    5465    Int_t len;
    5566    Short_t err1, err2;
    56     const Int_t n=sscanf(str.Data(), " %hd %hd %n",
    57                          &err1, &err2, &len);
     67    const Int_t n=sscanf(str.Data(), " %hd %hd %n", &err1, &err2, &len);
    5868    if (n!=2)
    5969    {
    60         *fLog << err << "ERROR - Reading information of 'LV' section." << endl;
     70        *fLog << err << "ERROR - Reading status information." << endl;
    6171        return kFALSE;
    6272    }
     
    8292        }
    8393
    84         fCurrents[i++] = 0.001*c;
     94        (*fDC)[i++] = 0.001*c;
    8595    }
    8696
     
    8898    str=str.Strip(TString::kLeading);
    8999
    90     return kTRUE;
     100    return str.IsNull();
    91101}
  • trunk/MagicSoft/Mars/mreport/MReportCurrents.h

    r2597 r2632  
    66#endif
    77
    8 #ifndef ROOT_TArrayF
    9 #include <TArrayF.h>
    10 #endif
     8class MCameraDC;
    119
    1210class MReportCurrents : public MReport
     
    1614    Byte_t fStatus2;
    1715
    18     TArrayF fCurrents;
     16    MCameraDC *fDC; //!
     17
     18    Bool_t SetupReading(MParList &plist);
     19    Bool_t InterpreteBody(TString &str);
    1920
    2021public:
    2122    MReportCurrents();
    2223
    23     Bool_t InterpreteBody(TString &str);
    24 
    25     ClassDef(MReportCurrents, 0) // Class for DC-REPORT information
     24    ClassDef(MReportCurrents, 1) // Class for DC-REPORT information
    2625};
    2726
  • trunk/MagicSoft/Mars/mreport/MReportFileRead.cc

    r2592 r2632  
    270270        return kFALSE;
    271271    }
     272    if (TestBit(kHasNoHeader))
     273        return kTRUE;
    272274
    273275    return CheckFileHeader();
     
    287289    while (!GetReport(rep))
    288290    {
    289         str.ReadLine(*fIn);
     291        // Don't know the reason, but ReadLine and ReadString don't work
     292        // for the (at least: converted) DC files.
     293        str.ReadToDelim(*fIn);
    290294        if (!*fIn)
    291295        {
  • trunk/MagicSoft/Mars/mreport/MReportFileRead.h

    r2592 r2632  
    2727    THashTable *fList;
    2828
     29    enum { kHasNoHeader = BIT(14) };
     30
    2931    Int_t PreProcess(MParList *pList);
    3032    Int_t Process();
     
    4042    ~MReportFileRead();
    4143
     44    void SetHasNoHeader() { SetBit(kHasNoHeader); }
     45
    4246    Bool_t AddToList(const char *name) const;
    4347
  • trunk/MagicSoft/Mars/mreport/Makefile

    r2592 r2632  
    2222#  connect the include files defined in the config.mk file
    2323#
    24 INCLUDES = -I. -I../mbase -I../mtools -I../mcamera
     24INCLUDES = -I. -I../mbase -I../mtools -I../mcamera -I../mgui
     25# mgui - MCameraDC <MCamEvent>
    2526
    2627#------------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.