Changeset 8938 for trunk


Ignore:
Timestamp:
06/12/08 14:00:47 (16 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/datacenter/macros/plotdb.C

    r8929 r8938  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: plotdb.C,v 1.39 2008-06-08 12:55:22 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: plotdb.C,v 1.40 2008-06-12 13:00:44 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    2121!   Author(s): Daniela Dorner, 05/2005 <mailto:dorner@astro.uni-wuerzburg.de>
    2222!
    23 !   Copyright: MAGIC Software Development, 2000-2006
     23!   Copyright: MAGIC Software Development, 2000-2008
    2424!
    2525!
     
    547547    plot.SetDescription("Mean Signal inner Camera;S_{I} [phe]", "SignalI");
    548548    plot.Plot("Calibration.fMeanSignalInner",  0, 7.0, 0.05);
    549     plot.SetDescription("Mean PulsePosCheck (falling edge) inner camera;T [sl]", "ChkPos");
     549
     550    plot.SetDescription("Mean PulsePosCheck (maximum slice) inner camera;T [sl]", "ChkPos");
    550551    plot.Plot("Calibration.fPulsePosCheckMean", 1, 50.0, 0.1);
    551     plot.SetDescription("Rms PulsePosCheck (falling edge) inner camera;T [sl]", "ChkRms");
     552    plot.SetDescription("Rms PulsePosCheck (maximum slice) inner camera;T [sl]", "ChkRms");
    552553    plot.Plot("Calibration.fPulsePosCheckRms", 0, 12.0, 0.1);
    553     plot.SetDescription("Mean calibrated PulsePos;T", "PulPos");
     554    plot.SetDescription("Mean calibrated PulsePos (as extracted);T [ns]", "PulPos");
    554555    plot.Plot("Calibration.fPulsePosMean", 1, 40.0, 0.1);
    555     plot.SetDescription("Rms calibrated PulsePos;T", "PulRms");
     556    plot.SetDescription("Rms calibrated PulsePos (as extracted);T [ns]", "PulRms");
    556557    plot.Plot("Calibration.fPulsePosRms", 0, 3.0, 0.02);
     558
     559    plot.SetDescription("Average rate of events with lvl1 trigger;R [Hz]", "RateTrig");
     560    plot.Plot("Calibration.fRateTrigEvts", 0, 500, 5);
     561    plot.SetDescription("Average rate of events with only Sum trigger;R [Hz]", "RateSum");
     562    plot.Plot("Calibration.fRateSumEvts", 0, 1500, 5);
     563    //plot.SetDescription("Ratio of only Sum to Lvl1 triggers;R [Hz]", "RateRatio");
     564    //plot.Plot("100*Calibration.fRateSumEvts/Calibration.fRateTrigEvts", 0, 500, 1);
     565    plot.SetDescription("Average rate of events with calibration trigger;R [Hz]", "RateCal");
     566    plot.Plot("Calibration.fRateCalEvts", 0, 50, 1);
     567    plot.SetDescription("Average rate of events with pedestal trigger;R [Hz]", "RatePed");
     568    plot.Plot("Calibration.fRatePedEvts", 0, 50, 1);
     569    plot.SetDescription("Average rate of events with ped+cosmics trigger;R [Hz]", "RatePT");
     570    plot.Plot("Calibration.fRatePedTrigEvts", 0, 3.5, 0.1);
     571    plot.SetDescription("Average rate of events without trigger pattern;R [Hz]", "Rate0");
     572    plot.Plot("Calibration.fRateNullEvts", 0, 3.5, 0.1);
     573    plot.SetDescription("Average rate of unknown trigger pattern;R [Hz]", "RateUnknown");
     574    plot.Plot("Calibration.fRateUnknownEvts", 0, 3.5, 0.1);
    557575
    558576    plot.SetDescription("Hi-/Lo-Gain offset;", "PulOff");
     
    586604    plot.SetDescription("Datarate [Hz]", "Rate");
    587605    plot.Plot("Star.fDataRate",                0, 600, 10);
    588     plot.SetDescription("Maximum Humidity [%]", "Hum");
     606    plot.SetDescription("Average Cloudiness [%]", "AvgClouds");
     607    plot.Plot("Star.fAvgCloudiness",           0, 100, 1);
     608    plot.SetDescription("RMS Cloudiness [%]", "RmsClouds");
     609    plot.Plot("Star.fRmsCloudiness",           0, 100, 1);
     610    plot.SetDescription("Sky Temperature [K]", "SkyTemp");
     611    plot.Plot("Star.fAvgTempSky",         200, 300, 1);
     612    plot.SetDescription("Maximum Humidity [%]", "MaxHum");
    589613    plot.Plot("Star.fMaxHumidity",             0, 100, 1);
     614    plot.SetDescription("Average Humidity [%]", "AvgHum");
     615    plot.Plot("Star.fAvgHumidity",             0, 100, 1);
    590616    plot.SetDescription("Average Temperature [\\circ C];T [\\circ C]", "Temp");
    591617    plot.Plot("Star.fAvgTemperature",        -5, 25, 1);
  • trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc

    r8936 r8938  
    10491049
    10501050        // Remove the canvas from the global list to make sure it is
    1051         // not found by gROOT->FindOBject
    1052         gROOT->GetListOfCanvases()->Remove(c);
     1051        // not found by gROOT->FindObject
     1052        //gROOT->GetListOfCanvases()->Remove(c);
     1053        //gROOT->GetListOfCleanups()->Add(c);
    10531054
    10541055        return *c;
     
    10811082
    10821083    // Remove the canvas from the global list to make sure it is
    1083     // not found by gROOT->FindOBject
    1084     gROOT->GetListOfCanvases()->Remove(&c);
     1084    // not found by gROOT->FindObject
     1085    //gROOT->GetListOfCanvases()->Remove(&c);
     1086    //gROOT->GetListOfCleanups()->Add(&c);
    10851087
    10861088    TGComboBox *box = (TGComboBox*)fList->FindWidget(kTabs);
     
    13321334    if (!c)
    13331335        return;
     1336
     1337    // Repair the "Workaround" being in the RecursiveRemove list
     1338    // but not in a list checked by gROOT->FindObject
     1339    //gROOT->GetListOfCleanups()->Remove(c);
     1340    //gROOT->GetListOfCanvases()->Add(c);
     1341
     1342    // FIXME: Due to our workaround this is necessary for a successfull deletion
     1343    //c->cd();
    13341344
    13351345    const TString name(c->GetName());
  • trunk/MagicSoft/Mars/mhflux/MHEnergyEst.cc

    r8935 r8938  
    317317        {
    318318            pad->GetPad(1)->GetPad(2)->cd(1);
    319             if ((hx=(TH1D*)gPad->FindObject("EnergyEst_ez")))
     319            if (gPad->FindObject("EnergyEst_ez"))
    320320                fHEnergy.Project3D("ez");
    321321
    322322            pad->GetPad(1)->GetPad(2)->cd(2);
    323             hx = (TH1D*)fHResolutionEst.ProjectionY("Resolution", -1, -1, "e");
    324             TPaveStats *stats = dynamic_cast<TPaveStats*>(hx->FindObject("stats"));
    325             if (stats)
     323            if (gPad->FindObject("ResEnergyEst_py"))
    326324            {
    327                 stats->SetBit(BIT(17)); // TStyle.cxx: kTakeStyle=BIT(17)
    328                 stats->SetX1NDC(0.63);
    329                 stats->SetY1NDC(0.68);
     325                hx = (TH1D*)fHResolutionEst.ProjectionY("_py", -1, -1, "e");
     326                TPaveStats *stats = dynamic_cast<TPaveStats*>(hx->FindObject("stats"));
     327                if (stats)
     328                {
     329                    stats->SetBit(BIT(17)); // TStyle.cxx: kTakeStyle=BIT(17)
     330                    stats->SetX1NDC(0.63);
     331                    stats->SetY1NDC(0.68);
     332                }
     333
     334                hx->Fit("gaus", "Q", "", -1.0, 0.25);
     335                hx->GetFunction("gaus")->SetLineColor(kBlue);
     336                hx->GetFunction("gaus")->SetLineWidth(2);
     337                gPad=NULL;
     338                gStyle->SetOptFit(101);
    330339            }
    331 
    332             hx->Fit("gaus", "Q", "", -1.0, 0.25);
    333             hx->GetFunction("gaus")->SetLineColor(kBlue);
    334             hx->GetFunction("gaus")->SetLineWidth(2);
    335             gPad=NULL;
    336             gStyle->SetOptFit(101);
    337340        }
    338341    }
  • trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc

    r8933 r8938  
    635635    MHCamEvent evtR(  4, "HiLoCal",    "Hi-/Lo-Gain ratio;;Ratio");
    636636    MHCamEvent evtO(  7, "HiLoOff",    "Lo-/Hi-Gain Offset;;Offset");
     637    MHCamEvent evtC(  4, "CalPos",     "Extracted pulse position of calibration pulses;;T [sl]");
     638    //MHCamEvent evt2(0, "Extra'd", "Extracted Calibration Signal;;S [cnts/sl]");
    637639    evt2.SetErrorSpread(kFALSE);
    638640    evt5.SetErrorSpread(kFALSE);
     
    649651    // MFillH fill7(&evt7, "MSignalCam",                    "FillTimes");
    650652    MFillH fill8(&evt8, "MCalibConstCam",                "FillConv");
    651     MFillH fill9(&evt9, "MSignalCam",                    "FillPulse");
     653    MFillH fill9(&evt9, "MSignalCam",                    "FillPulsePos");
    652654    MFillH fillR(&evtR, "MExtractedSignalCam",           "FillHiLoCal");
    653655    MFillH fillO(&evtO, "MArrivalTimeCam",               "FillHiLoOff");
     656    MFillH fillC(&evtC, "MArrivalTimeCam",               "FillCalPos");
     657    //MFillH fill2(&evt2, "MExtractedSignalCam", "FillExtractedSignal");
    654658
    655659    MHVsTime histbp("MBadPixelsCam.GetNumUnsuitable");
     
    804808            tlist4.AddToList(&recalc); // MCalibrationRelTimeCam
    805809
     810        tlist4.AddToList(&fillC);      // FillCalPos
     811
    806812        //tlist3.AddToList(&writecal);   // MWriteRootFile
    807813    }
  • trunk/MagicSoft/Mars/mraw/MRawEvtData.cc

    r8704 r8938  
    1818!   Author(s): Thomas Bretz, 12/2000 <mailto:tbretz@astro.uni-wuerzburg.de>
    1919!
    20 !   Copyright: MAGIC Software Development, 2000-2007
     20!   Copyright: MAGIC Software Development, 2000-2008
    2121!
    2222!
     
    263263
    264264    if (str.BeginsWith("graph"))
    265         if (str.Length()>5)
    266             sscanf(&str[5], "%d", &id);
     265        sscanf(str.Data()+5, "%d", &id);
    267266    if (str.BeginsWith("hist"))
    268         if (str.Length()>4)
    269             sscanf(&str[4], "%d", &id);
     267        sscanf(str.Data()+4, "%d", &id);
    270268
    271269    MRawEvtPixelIter pix(this);
     
    299297            graphhi->SetPoint(graphhi->GetN(), i+nh, GetSample(logains, i));
    300298
    301         graphhi->SetMaximum(256);
     299        graphhi->SetMaximum(GetMax()+0.5);
    302300        graphhi->SetMinimum(0);
    303301
     
    307305        TH1F *histhi = graphhi->GetHistogram();
    308306        histhi->SetMinimum(0);
    309         histhi->SetMaximum(255);
     307        histhi->SetMaximum(GetMax()+0.5);
    310308 
    311309        histhi->SetXTitle("Time/FADC Slices");
     
    320318        *fLog << inf << "Drawing Histogram of Pixel with Idx #" << dec << pix.GetPixelId() << " to " << gPad << endl;
    321319
    322         TH1F *histh = new TH1F(name, "FADC Samples", nh, -0.5, nh-.5);
     320        TH1F *histh = new TH1F(name, "FADC Samples", nh+nl, -0.5, nh+nl-.5);
    323321        histh->SetMinimum(0);
    324         histh->SetMaximum(255);
     322        histh->SetMaximum(GetMax()+0.5);
    325323        histh->SetXTitle("Time [FADC Slices]");
    326324        histh->SetYTitle("Signal [FADC Units]");
     
    329327            histh->Fill(i, GetSample(higains, i));
    330328        for (int i=0; i<nl; i++)
    331             histh->Fill(i, GetSample(logains, i));
     329            histh->Fill(i+nl, GetSample(logains, i));
    332330        histh->SetBit(kCanDelete);
    333331        histh->Draw(same ? "same" : "");
     
    613611
    614612    evt.fConnectedPixels = fConnectedPixels;
    615 }
     613
     614    evt.fNumBytesPerSample = fNumBytesPerSample;
     615}
  • trunk/MagicSoft/Mars/mraw/MRawEvtData.h

    r8571 r8938  
    4747    UInt_t GetSample(const void *ptr, Int_t n) // Helper for Draw
    4848    {
    49         switch (n)
     49        switch (fNumBytesPerSample)
    5050        {
    51         case 1: return *(Byte_t*)ptr;
    52         case 2: return *(UShort_t*)ptr;
    53         case 3: return *(Int_t*)ptr;
     51        case 1: return reinterpret_cast<const Byte_t*>(ptr)[n];
     52        case 2: return reinterpret_cast<const UShort_t*>(ptr)[n];
     53        case 3: return reinterpret_cast<const UInt_t*>(ptr)[n];
    5454        }
    5555        return 0;
     
    8383    UShort_t GetNumBytesPerSample() const { return fNumBytesPerSample; }
    8484    UInt_t   GetScale() const { return 1<<((fNumBytesPerSample-1)*8); }
     85    UInt_t   GetMax() const   { return (UInt_t)(~1)>>((4-fNumBytesPerSample)*8); }
    8586
    8687    void ReadPixel(istream &fin, Int_t npix);
Note: See TracChangeset for help on using the changeset viewer.