Changeset 7200


Ignore:
Timestamp:
07/19/05 15:53:36 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r7199 r7200  
    4040     - replaced Rate historams by new histogram MHRate
    4141     - added new histogram MHPointing
     42     - gave a new name to writem
    4243
    4344   * mpointing/MSrcPosCorrect.cc:
    4445     - write new optical axis to parameter list
     46     - print a message if a correction is introduced for this run
    4547
    4648   * mreport/MReportStarguider.[h,cc]:
     
    5860   * mpointing/Makefile, mpointing/PointingLinkDef.h:
    5961     - added MHPointing
     62
     63   * mcalib/MCalibrationCam.[h,cc]:
     64     - moved code of static function GetPulserColorStr into source file.
     65       Hopefully this 'repairs' a strange message some people got linking
     66       mars: `.gnu.linkonce.t._ZN15MCalibrationCam17GetPulserColorStrENS_13PulserColor_tE' referenced in section `.rodata' of mcalib/CalibCint.o: defined in discarded section `.gnu.linkonce.t._ZN15MCalibrationCam17GetPulserColorStrENS_13PulserColor_tE' of mcalib/CalibCint.o
     67       which was mainly annoying.
     68
     69   * mfbase/MF.cc:
     70     - changed order and handling in ReadEnv. This allows to overwrite
     71       already set resources in sponde (eg. MFMagicCuts.ThetaCut)
     72
     73   * mhbase/MH.cc:
     74     - first draft of a new palette introduced by Pepe (I got it from
     75       Hendrik)
    6076
    6177
  • trunk/MagicSoft/Mars/mcalib/MCalibrationCam.cc

    r6963 r7200  
    592592    fNumUnreliable[aidx] = i;
    593593}
     594
     595TString MCalibrationCam::GetPulserColorStr(PulserColor_t col)
     596{
     597    TString str;
     598    switch (col)
     599    {
     600    case kCT1:   str += "CT1";      break;
     601    case kGREEN: str += "Green";    break;
     602    case kBLUE:  str += "Blue";     break;
     603    case kUV:    str += "UV";       break;
     604    case kNONE:  str += "None";     break;
     605    default:     str += "Unknown";  break;
     606    }
     607    str += " (";
     608    str += (int)col;
     609    str += ")";
     610    return str;
     611}
  • trunk/MagicSoft/Mars/mcalib/MCalibrationCam.h

    r7194 r7200  
    9494  const MCalibrationPix &operator[]             ( UInt_t i )           const;
    9595
    96   static TString GetPulserColorStr(PulserColor_t col) {
    97       TString str;
    98       switch (col)
    99       {
    100       case kCT1:   str += "CT1";      break;
    101       case kGREEN: str += "Green";    break;
    102       case kBLUE:  str += "Blue";     break;
    103       case kUV:    str += "UV";       break;
    104       case kNONE:  str += "None";     break;
    105       default:     str += "Unknown";  break;
    106       }
    107       str += " (";
    108       str += (int)col;
    109       str += ")";
    110       return str;
    111   }
     96  static TString GetPulserColorStr(PulserColor_t col);
    11297
    11398  // Inits
  • trunk/MagicSoft/Mars/mfbase/MF.cc

    r6932 r7200  
    477477Int_t MF::ReadEnv(const TEnv &env, TString prefix, Bool_t print)
    478478{
    479     Bool_t rc = MFilter::ReadEnv(env, prefix, print);
    480     if (rc==kERROR)
    481         return kERROR;
    482 
    483     if (!IsEnvDefined(env, prefix, "Condition", print))
    484     {
    485         if (rc)
     479
     480    /*
     481     Bool_t rc = MFilter::ReadEnv(env, prefix, print);
     482     if (rc==kERROR)
     483     return kERROR;
     484    */
     485    if (IsEnvDefined(env, prefix, "Condition", print))
     486    {
     487        TString rule = GetEnvValue(env, prefix, "Condition", "");
     488        rule.ReplaceAll(" ", "");
     489
     490        Int_t idx=0;
     491        while (1)
     492        {
     493            TString cond;
     494            if (IsEnvDefined(env, prefix, Form("%d", idx), print))
     495            {
     496                cond += "(";
     497                cond += GetEnvValue(env, prefix, Form("%d", idx), "");
     498                cond += ")";
     499            }
     500
     501            if (cond.IsNull())
     502                break;
     503
     504            rule.ReplaceAll(Form("{%d}", idx), cond);
     505            idx++;
     506        }
     507
     508        if (fF)
     509        {
     510            delete fF;
     511            fF = 0;
     512        }
     513
     514        if (rule.IsNull())
     515        {
     516            *fLog << warn << GetDescriptor() << " ::ReadEnv - WARNING: Empty condition found." << endl;
     517            SetAllowEmpty();
     518            return kTRUE;
     519        }
     520
     521        SetAllowEmpty(kFALSE);
     522
     523        if (!(fF=ParseString(rule, 1)))
     524        {
     525            *fLog << err << "MF::ReadEnv - ERROR: Parsing '" << rule << "' failed." << endl;
     526            return kERROR;
     527        }
     528
     529        if (print)
     530        {
     531            *fLog << inf << "found: ";
     532            fF->Print();
     533            *fLog << endl;
     534        }
     535    }
     536    else
     537    {
     538        if (!fF)
    486539        {
    487540            *fLog << warn << GetDescriptor() << " ::ReadEnv - WARNING: No condition found." << endl;
    488541            SetAllowEmpty();
    489         }
    490         return rc;
    491     }
    492 
    493     TString rule = GetEnvValue(env, prefix, "Condition", "");
    494     rule.ReplaceAll(" ", "");
    495 
    496     Int_t idx=0;
    497     while (1)
    498     {
    499         TString cond;
    500         if (IsEnvDefined(env, prefix, Form("%d", idx), print))
    501         {
    502             cond += "(";
    503             cond += GetEnvValue(env, prefix, Form("%d", idx), "");
    504             cond += ")";
    505         }
    506 
    507         if (cond.IsNull())
    508             break;
    509 
    510         rule.ReplaceAll(Form("{%d}", idx), cond);
    511         idx++;
    512     }
    513 
    514     if (fF)
    515     {
    516         delete fF;
    517         fF = 0;
    518     }
    519 
    520     if (rule.IsNull())
    521     {
    522         *fLog << warn << GetDescriptor() << " ::ReadEnv - WARNING: Empty condition found." << endl;
    523         SetAllowEmpty();
    524         return kTRUE;
    525     }
    526 
    527     SetAllowEmpty(kFALSE);
    528 
    529     if (!(fF=ParseString(rule, 1)))
    530     {
    531         *fLog << err << "MF::ReadEnv - ERROR: Parsing '" << rule << "' failed." << endl;
    532         return kERROR;
    533     }
    534 
    535     if (print)
    536     {
    537         *fLog << inf << "found: ";
    538         fF->Print();
    539         *fLog << endl;
     542            return kFALSE;
     543        }
    540544    }
    541545
     
    546550    // might check for "Inverted" in this case both gets inverted
    547551    // and double-inversion is no inversion
     552    /*
    548553    if (IsEnvDefined(env, prefix, "Inverted", print))
    549554        if (GetEnvValue(env, prefix, "Inverted", kFALSE)==kTRUE)
    550             SetInverted(kFALSE);
     555            SetInverted(kFALSE);*/
    551556
    552557    return kTRUE;
  • trunk/MagicSoft/Mars/mhbase/MH.cc

    r7173 r7200  
    14511451        found=kTRUE;
    14521452    }
     1453    if (paletteName.Contains("pepe"))
     1454    {
     1455        double s[5] = {0.0, 0.6, 0.7, 0.9, 1.0 };
     1456        double r[5] = {0.1, 0.1, 1.0, 1.0, 1.0 };
     1457        double g[5] = {0.1, 0.1, 0.0, 1.0, 1.0 };
     1458        double b[5] = {0.2, 0.7, 0.0, 0.3, 0.9 };
     1459        gStyle->CreateGradientColorTable(5, s, r, g, b, ncol);
     1460        found=kTRUE;
     1461    }
    14531462
    14541463    if (inverse)
  • trunk/MagicSoft/Mars/mpointing/MHPointing.cc

    r7198 r7200  
    8787    fDevTimeSG.SetNameTitle("DevSG",      "Drive (black) and starguider (blue) deviation");
    8888    fDevTimeCosy.SetNameTitle("DevCosy",  "Cosy deviation");
    89     fBrightness.SetNameTitle("Brigtness", "Arbitrary Sky Brightness");
     89    fBrightness.SetNameTitle("Brigtness", "Arbitrary Sky Brightness (black), No. of stars identified by starguider (blue)");
    9090    fNumStars.SetNameTitle("NumStars",    "Number of stars identified by starguider");
    9191    fDevZd.SetNameTitle("DevZd",          "Starguider Deviation Zd (blue), Az(black)");
    9292    fDevAz.SetNameTitle("DevAz",          "Starguider Deviation Az");
     93    fPosZd.SetNameTitle("PosZd",          "Nominal position Zd (black), Az (blue)");
     94    fPosAz.SetNameTitle("PosZd",          "Position Az");
    9395
    9496    InitGraph(fDevTimeSG);
     
    98100    InitGraph(fDevZd);
    99101    InitGraph(fDevAz);
     102    InitGraph(fPosZd);
     103    InitGraph(fPosAz);
    100104
    101105    fDevTimeSG.SetMinimum(0);
     
    106110    fDevTimeSG.SetMarkerColor(kBlue);
    107111    fDevZd.SetMarkerColor(kBlue);
     112    fNumStars.SetMarkerColor(kBlue);
     113    fPosAz.SetMarkerColor(kBlue);
    108114}
    109115
     
    170176    {
    171177        AddPoint(fDevTimeCosy, tm, fReportCosy->GetAbsError()*60);
     178        AddPoint(fPosZd,       tm, fReportCosy->GetNominalZd());
     179        AddPoint(fPosAz,       tm, fReportCosy->GetNominalAz());
    172180        return kTRUE;
    173181    }
     
    190198    }
    191199}
    192 /*
     200
    193201// --------------------------------------------------------------------------
    194202//
     
    227235    axis->SetTitle(title);
    228236    axis->SetTitleOffset(0.9);
    229     axis->SetTextColor(kRed);
     237    axis->SetTextColor(kBlue);
    230238    axis->SetBit(kCanDelete);
    231239    axis->Draw();
    232240}
    233 */
     241
    234242// --------------------------------------------------------------------------
    235243//
     
    259267    gPad->SetGridy();
    260268    fBrightness.Draw("AP");
     269    fNumStars.Draw("P");
     270    DrawRightAxis("N");
    261271
    262272    pad->cd(3);
     
    271281    gPad->SetGridx();
    272282    gPad->SetGridy();
    273     fNumStars.Draw("AP");
     283    fPosZd.Draw("AP");
     284    fPosAz.Draw("P");
     285    DrawRightAxis("Az [\\circ]");
    274286}
    275287
     
    282294    DrawGraph(fDevZd,       "\\Delta [arcmin]");
    283295    DrawGraph(fDevAz,       "\\Delta [arcmin]");
    284     /*
    285     gPad->cd(1);
    286 
     296    DrawGraph(fPosZd,       "Zd [\\circ]");
     297    DrawGraph(fPosAz,       "Az [\\circ]");
     298
     299    TVirtualPad *pad = gPad;
     300
     301    pad->cd(2);
    287302    if (gPad)
    288303    {
    289         fHumidity.GetHistogram()->GetYaxis()->SetTitleColor(kBlue);
    290         UpdateRightAxis(fTemperature);
    291     }*/
    292 }
     304        fNumStars.GetHistogram()->GetYaxis()->SetTitleColor(kBlue);
     305        UpdateRightAxis(fBrightness);
     306    }
     307
     308    pad->cd(4);
     309    if (gPad)
     310    {
     311        fPosAz.GetHistogram()->GetYaxis()->SetTitleColor(kBlue);
     312        UpdateRightAxis(fPosZd);
     313    }
     314}
  • trunk/MagicSoft/Mars/mpointing/MHPointing.h

    r7198 r7200  
    2929    TGraph             fDevAz;       // Starguider deviation Az
    3030
     31    TGraph             fPosZd;       // Position Zd
     32    TGraph             fPosAz;       // Position Az
     33
    3134    void ResetGraph(TGraph &g) const;
    3235    void InitGraph(TGraph &g) const;
    3336    void AddPoint(TGraph &g, Double_t x, Double_t y) const;
    3437    void DrawGraph(TGraph &g, const char *y=0) const;
    35     //void UpdateRightAxis(TGraph &g) const;
    36     //void DrawRightAxis(const char *title) const;
     38    void UpdateRightAxis(TGraph &g) const;
     39    void DrawRightAxis(const char *title) const;
    3740
    3841public:
  • trunk/MagicSoft/Mars/mpointing/MSrcPosCorrect.cc

    r7196 r7200  
    100100    fRunNumber = run->GetRunNumber();
    101101
     102    if (fRunNumber<56161 && fRunNumber>53832)
     103    {
     104        *fLog << inf << "Run Number " << fRunNumber << " between 53832 and 56161." << endl;
     105        *fLog << "A missfocussing correction (-0.048deg/0.034deg) will be applied." << endl;
     106    }
     107
    102108    return kTRUE;
    103109}
Note: See TracChangeset for help on using the changeset viewer.