Changeset 2711 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
12/18/03 15:48:42 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r2710 r2711  
    1414   * manalysis/MExetractedSignalPix.h:
    1515     - added missing const-qualifier IsLoGainUsed
     16
     17   * mreport/MReportFileRead.[h,cc]:
     18     - added support for line counter
    1619
    1720   * mreport/MReportRun.[h,cc]:
  • trunk/MagicSoft/Mars/Makefile.rules

    r2617 r2711  
    5050rmbin: 
    5151        @echo " Removing binary files..."
    52         @rm -f $(PROGRAMS) lib/$(SOLIB) so_locations
     52        @rm -f $(PROGRAMS) $(SOLIB) so_locations
    5353
    5454rmbak:
  • trunk/MagicSoft/Mars/mbase/MAGIC.h

    r2688 r2711  
    1616//
    1717#ifndef __CINT__
    18 #if ROOT_VERSION_CODE < ROOT_VERSION(3,02,00)
    19 #error Your root version is too old to compile Mars, use root>=3.02
     18#if ROOT_VERSION_CODE < ROOT_VERSION(3,05,06)
     19#error Your root version is too old to compile Mars, use root>=3.05/06
    2020#endif
    2121#endif
  • trunk/MagicSoft/Mars/merpp.cc

    r2710 r2711  
    120120    const Int_t kRunNumber = arg.HasOption("--run=") ? arg.GetIntAndRemove("--run=") : -1;
    121121
    122     if (!kTimeStart)
    123         cout << "No start time!" << endl;
    124     if (!kTimeStop)
    125         cout << "No stop time!" << endl;
     122    if (kTimeStart)
     123        gLog << inf << "Start Time: " << kTimeStart << endl;
     124    if (kTimeStop)
     125        gLog << inf << "Stop  Time: " << kTimeStop << endl;
    126126
    127127    //
     
    270270        {
    271271            r->AddToList("MReportCC");
    272             r->AddToList("MReportDAQ");
     272            //r->AddToList("MReportDAQ");
    273273            r->AddToList("MReportDrive");
    274274            r->AddToList("MReportCamera");
     
    277277            {
    278278                r->AddToList("MReportRun");
    279                 filter = new MFDataMember("MReportRun.fRunNumber", '=', kRunNumber-0.5);
    280                 filter->SetInverted();
     279                filter = new MFDataMember("MReportRun.fRunNumber", '=', kRunNumber);
    281280                w->SetFilter(filter);
    282281            }
  • trunk/MagicSoft/Mars/mreport/MReportCC.cc

    r2687 r2711  
    4343using namespace std;
    4444
    45 MReportCC::MReportCC() : MReport("CC-REPORT")
     45MReportCC::MReportCC() : MReport("CC-REPORT", kFALSE)
    4646{
    4747    fName  = "MReportCC";
     
    5757
    5858    Int_t len;
    59     Float_t zd, az, dec, ra;
    6059    const Int_t n=sscanf(str.Data(),
    6160                         "%*f %*f %*f %*f %f %f %f %f %*f %*f %n",
     
    6766        return kFALSE;
    6867    }
     68    /*
    6969    str.Remove(0, len);
     70
     71    *fLog << dbg << str << endl;
    7072
    7173    if (str!=(TString)"OVER")
     
    7476        return kFALSE;
    7577    }
    76 
     78    */
    7779    return kTRUE;
    7880}
  • trunk/MagicSoft/Mars/mreport/MReportFileRead.cc

    r2678 r2711  
    207207// file versions
    208208//
    209 Bool_t MReportFileRead::CheckFileHeader() const
    210 {
     209Int_t MReportFileRead::CheckFileHeader() const
     210{
     211    Int_t line = 0;
     212
    211213    TString str;
    212214    str.ReadLine(*fIn);   // Read to EOF or newline
     
    215217        *fLog << err << "ERROR - First line doesn't match '" << gsReportHeader <<"' ";
    216218        *fLog << "in file '" << fFileName << "'"<<endl;
    217         return kFALSE;
    218     }
     219        return line;
     220    }
     221    line++;
    219222
    220223    str.ReadLine(*fIn);   // Read to EOF or newline
     
    223226        *fLog << err << "ERROR - Version prefix '" << gsVersionPrefix <<"' ";
    224227        *fLog << "not found in second line of file '" << fFileName << "'"<<endl;
    225         return kFALSE;
    226     }
     228        return line;
     229    }
     230    line++;
    227231
    228232    str.Remove(0, gsVersionPrefix.Length());
     
    234238        *fLog << err << "ERROR - Version string '" << str <<"' doesn't ";
    235239        *fLog << "match regular expression." << endl;
    236         return kFALSE;
     240        return line;
    237241    }
    238242
    239243    *fLog << dbg << "Report File version: <" << ver << ">" << endl;
    240244
    241     return kTRUE;
     245    return line;
    242246}
    243247
     
    252256    //if (!time)
    253257    //    return kFALSE;
     258    fNumLine = 0;
    254259
    255260    TIter Next(fList);
     
    275280        return kTRUE;
    276281
    277     return CheckFileHeader();
     282    const Int_t n = CheckFileHeader();
     283    fNumLine += n;
     284    return n==2;
    278285}
    279286
     
    298305        }
    299306
     307        fNumLine++;
     308
    300309        const Int_t pos = str.First(' ');
    301310        if (pos<=0)
     
    310319    if (rc==kFALSE)
    311320    {
    312         *fLog << err << "ERROR - Interpretation of '" << rep->GetName() << "' failed." << endl;
     321        *fLog << err << "ERROR - Interpretation of '" << rep->GetName() << "' failed (Line #" << fNumLine << ")" << endl;
    313322        return kFALSE;
    314323    }
  • trunk/MagicSoft/Mars/mreport/MReportFileRead.h

    r2678 r2711  
    3434    MTime fStop;             // Time range which should be read from file
    3535
     36    ULong_t fNumLine;        // line counter
     37
    3638    enum { kHasNoHeader = BIT(14) };
    3739
     
    4042    Int_t PostProcess();
    4143
    42     Bool_t CheckFileHeader() const;
     44    Int_t CheckFileHeader() const;
    4345    MReport *GetReport(const TString &str) const;
    4446    MReport *GetReport(MReportHelp *help) const;
  • trunk/MagicSoft/Mars/mreport/MReportRun.cc

    r2708 r2711  
    5050Bool_t MReportRun::InterpreteBody(TString &str)
    5151{
    52     // Remove the 30 tokens of the subsystem status
    53     //  table 12.1 p59
    54     for (int i=0; i<30; i++)
    55         str.Remove(0, str.First(' ')+1);
    56 
    5752    Int_t len;
    5853    const Int_t n=sscanf(str.Data(), "%d %n", &fRunNumber, &len);
     
    6964    str.Remove(0, 6);
    7065    str = str.Strip(TString::kBoth);
    71     fSourceName = str(0, str.First(' ')+1);
     66    Ssiz_t pos = str.First(' ');
     67    if (pos<0)
     68        pos = str.Length();
     69    fSourceName = str(0, pos+1);
    7270
    7371    return kTRUE;
  • trunk/MagicSoft/Mars/mtools/MTFillMatrix.cc

    r2695 r2711  
    134134        return kFALSE;
    135135    }
     136    if (fname.IsNull())
     137    {
     138        *fLog << "ERROR - Unable to write matrix, file name empty." << endl;
     139        return kFALSE;
     140    }
    136141
    137142    TFile file(fname, "RECREATE", m->GetTitle());
     
    245250    MEvtLoop evtloop(fName);
    246251    evtloop.SetParList(&plist);
     252    evtloop.SetDisplay(fDisplay);
     253    evtloop.SetLogStream(fLog);
    247254    if (!evtloop.Eventloop())
    248255    {
Note: See TracChangeset for help on using the changeset viewer.