Ignore:
Timestamp:
03/04/09 18:46:07 (16 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mreport
Files:
2 edited

Legend:

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

    r9292 r9385  
    120120    str.Remove(0, len);
    121121
    122     if (ver>=200809030)
    123     {
    124         if (!CheckTag(str, "SCHEDULE "))
    125             return kFALSE;
    126 
    127         str = str.Strip(TString::kBoth);
    128 
    129         // [Sourcename] sourcecategory
    130         const Ssiz_t pos1 = str.First(' ');
    131         if (pos1<0)
     122    return kTRUE;
     123}
     124
     125// --------------------------------------------------------------------------
     126//
     127// Interprete SCHEDULE section of the CC-REPORT string
     128//
     129Bool_t MReportCC::InterpreteSchedule(TString &str)
     130{
     131    if (!CheckTag(str, "SCHEDULE "))
     132        return kFALSE;
     133
     134    str = str.Strip(TString::kBoth);
     135
     136    // [Sourcename] sourcecategory
     137    const Ssiz_t pos1 = str.First(' ');
     138    if (pos1<0)
     139    {
     140        *fLog << warn << "WARNING - Wrong number of arguments (should be 1 or 2)." << endl;
     141        return kFALSE;
     142    }
     143
     144    const TString str1 = str(0, pos1);
     145
     146    str.Remove(0, pos1);
     147    str = str.Strip(TString::kBoth);
     148
     149    if (!str1.IsDigit())
     150    {
     151        const Ssiz_t pos2 = str.First(' ');
     152        if (pos2<0)
    132153        {
    133154            *fLog << warn << "WARNING - Wrong number of arguments (should be 1 or 2)." << endl;
     
    135156        }
    136157
    137         const TString str1 = str(0, pos1);
    138 
    139         str.Remove(0, pos1);
    140         str = str.Strip(TString::kBoth);
    141 
    142         if (!str1.IsDigit())
     158        TString str2 = str(0, pos2);
     159
     160        str.Remove(0, pos2);
     161
     162        // Remove a leading minus. The negative numbers are error codes introduced
     163        // by Arehucas. It's only meant for the GRB monitor to change the priority
     164        // of its alerts.
     165        if (str2[0]=='-')
     166            str2.Remove(0, 1);
     167
     168        if (!str2.IsDigit())
    143169        {
    144             const Ssiz_t pos2 = str.First(' ');
    145             if (pos2<0)
    146             {
    147                 *fLog << warn << "WARNING - Wrong number of arguments (should be 1 or 2)." << endl;
    148                 return kFALSE;
    149             }
    150 
    151             TString str2 = str(0, pos2);
    152 
    153             str.Remove(0, pos2);
    154 
    155             // Remove a leading minus. The negative numbers are error codes introduced
    156             // by Arehucas. It's only meant for the GRB monitor to change the priority
    157             // of its alerts.
    158             if (str2[0]=='-')
    159                 str2.Remove(0, 1);
    160 
    161             if (!str2.IsDigit())
    162             {
    163                 *fLog << warn << "WARNING - Wrong type of second argument (obs. category): " << str2 << endl;
    164                 return kFALSE;
    165             }
     170            *fLog << warn << "WARNING - Wrong type of second argument (obs. category): " << str2 << endl;
     171            return kFALSE;
    166172        }
    167173    }
     174
     175    return kTRUE;
     176}
     177
     178
     179// --------------------------------------------------------------------------
     180//
     181// Interprete the part of the CC-Report with the MII Subsystem status'
     182//
     183Bool_t MReportCC::InterpreteStatusM2(TString &str)
     184{
     185    // Status of: DAQ, DominoCalibration, Drive, Starguider, CaCo,
     186    //            CaCo2 LID, CaCo sentinel, CaCo LV, CaCo2 HV, AMC, L2T,
     187    //            Domino, Readout, REC, DT, Readout cooling, calib
     188    //            %05.2f %05.2f Zd [deg], Az [deg]
     189
     190    // Remove the 18 tokens of the MAGIC II subsystem status
     191    for (int i=0; i<19; i++)
     192        str.Remove(0, str.First(' ')+1);
    168193
    169194    return kTRUE;
     
    185210    if (!InterpreteCC(str, ver))
    186211        return kCONTINUE;
     212
     213    if (ver>=200809030)
     214        if (!InterpreteSchedule(str))
     215            return kCONTINUE;
     216
     217    if (ver>=200902030)
     218        if (!InterpreteStatusM2(str))
     219            return kCONTINUE;
    187220
    188221    if (ver<200805190)
  • trunk/MagicSoft/Mars/mreport/MReportCC.h

    r8963 r9385  
    3131    Bool_t SetupReading(MParList &plist);
    3232    Bool_t InterpreteCC(TString &str, Int_t ver);
     33    Bool_t InterpreteSchedule(TString &str);
     34    Bool_t InterpreteStatusM2(TString &str);
    3335
    3436    // MReport
Note: See TracChangeset for help on using the changeset viewer.