Ignore:
Timestamp:
09/28/06 14:15:00 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r7762 r7992  
    4949// or all data, but with dataset data highlighted
    5050//   .x plotdb.C("dataset.txt")
    51 //  --> the sequences defined in dataset.txt aree highlighted (blue:on, red:off)
     51//  --> the sequences defined in dataset.txt are highlighted (blue:on, red:off)
     52//  --> You can also add a dataset-name as last argument to one of the
     53//      calls above
    5254//
    5355// Make sure, that database and password are corretly set in a resource
    5456// file called sql.rc and the resource file is found.
    55 //
    56 // To draw sequences belonging to a DataSet in colors for highliting
    57 // change the defintition of 'const char *dataset=0;' in the code to something
    58 // like 'const char *dataset="dataset.txt";' to load your favourite dataset.
    5957//
    6058/////////////////////////////////////////////////////////////////////////////
     
    8078#include "MStatusDisplay.h"
    8179
    82 // Replace this line
    83 const char *dataset=0;
    84 //  by
    85 // const char *dataset = "/magic/datasets/00000/dataset00000003.txt";
    86 //  to mark the sequences of your favourite dataset.
    87 
    8880class MPlot : public MParContainer
    8981{
     
    131123        gz0.SetMarkerStyle(kFullDotLarge);
    132124        gz1.SetMarkerStyle(kFullDotLarge);
    133 
    134         if (fmax>fmin)
    135         {
    136             gt.SetMinimum(fmin);
    137             gt.SetMaximum(fmax);
    138             gz.SetMinimum(fmin);
    139             gz.SetMaximum(fmax);
    140         }
    141125
    142126        Int_t first = -1;
     
    185169            gt.SetPoint(gt.GetN(), t.GetAxisTime(), value);
    186170            gz.SetPoint(gz.GetN(), zenith, value);
     171        }
     172
     173        // If this is done earlier the plots remain empty since root 5.12/00
     174        if (fmax>fmin)
     175        {
     176            gt.SetMinimum(fmin);
     177            gt.SetMaximum(fmax);
     178            gz.SetMinimum(fmin);
     179            gz.SetMaximum(fmax);
    187180        }
    188181
     
    352345        const Bool_t interval = !fRequestFrom.IsNull() && !fRequestTo.IsNull();
    353346
    354         if (!fDataSet && !interval)
     347        if (!fDataSet && !interval && tabled=="Star")
    355348        {
    356349            if (!query.Contains("Star.fSequenceFirst"))
     
    396389    plot.SetDescription("RMS Arrival Time inner Camera;\\sigma_{T,I} [sl]", "RmsArrTmI");
    397390    plot.Plot("Calibration.fArrTimeRmsInner",  0, 2.5, 0.1);
     391    plot.SetDescription("Number of unsuitable pixels inner Camera;N{I}", "UnsuitI");
     392    plot.Plot("Calibration.fUnsuitableInner",  0, 25, 1);
     393
    398394    //from signal*.root
    399395    plot.SetDescription("Mean Pedestal RMS inner Camera;\\sigma_{P,I} [phe]", "PedRmsI");
     
    409405    plot.SetDescription("Rms calibrated PulsePos;T", "PulRms");
    410406    plot.Plot("Calibration.fPulsePosRms", 0, 2.0, 0.1);
     407
     408    plot.SetDescription("Hi-/Lo-Gain offset;", "PulOff");
     409    plot.Plot("Calibration.fPulsePosOffMed", -0.33, 0.33, 0.02);
     410    plot.SetDescription("Hi-/Lo-Gain ratio;", "HiLoRatio");
     411    plot.Plot("Calibration.fHiLoGainRatioMed", 10, 12.5, 0.1);
    411412    //from star*.root
    412413    //muon
    413414    plot.SetDescription("Point Spred Function;PSF [mm]");
    414     plot.Plot("Star.fPSF",                     0,  40, 0.5);
     415    plot.Plot("Star.fPSF",                     0,  30, 0.5);
    415416    plot.SetDescription("Muon Calibration Ratio Data/MC;r [1]", "MuonCal");
    416417    plot.Plot("Star.fRatio",                   0, 200, 0.5);
     
    426427    plot.Plot("Star.fEffOnTime",               0, 10000, 150);
    427428    plot.SetDescription("Relative effective on time;T_{eff}/T_{obs} [ratio]", "RelTime");
    428     plot.Plot("Star.fEffOnTime/Sequences.fRunTime",    0, 1.5, 0.01);
     429    plot.Plot("Star.fEffOnTime/Sequences.fRunTime",    0.006, 1.506, 0.01);
    429430    plot.SetDescription("Datarate [Hz]", "Rate");
    430431    plot.Plot("Star.fDataRate",                0, 600, 10);
    431432    plot.SetDescription("Maximum Humidity [%]", "Hum");
    432433    plot.Plot("Star.fMaxHumidity",             0, 100, 1);
     434
    433435    //muon
    434     plot.SetDescription("Number of Muons after Muon Cuts;N [#]");
    435     plot.Plot("Star.fMuonNumber",              0, 10000, 100);
     436    //plot.SetDescription("Number of Muons after Muon Cuts;N [#]");
     437    //plot.Plot("Star.fMuonNumber",              0, 10000, 100);
     438
     439    // starguider
     440    plot.SetDescription("Median No. Stars recognized by the starguider;N_{0}", "StarsMed");
     441    plot.Plot("Star.fNumStarsMed",                          0,  100,  1);
     442    plot.SetDescription("RMS No. Stars recognized by the starguider;\\sigma_{N_{0}}", "StarsRMS");
     443    plot.Plot("Star.fNumStarsRMS",                          0,   25,  1);
     444    plot.SetDescription("Median No. Stars correlated by the starguider;N", "CorMed");
     445    plot.Plot("Star.fNumStarsCorMed",                       0,  100,  1);
     446    plot.SetDescription("RMS No. Stars correlated by the starguider;\\sigma_{N}", "CorRMS");
     447    plot.Plot("Star.fNumStarsCorRMS",                       0,   25,  1);
     448    plot.SetDescription("Relative number of correlated stars;N/N_{0} [%]", "StarsRel");
     449    plot.Plot("Star.fNumStarsCorMed/Star.fNumStarsMed*100", 0, 100, 10);
     450    plot.SetDescription("Median skbrightess measured by the starguider;B [au]", "BrightMed");
     451    plot.Plot("Star.fBrightnessMed",                        0, 111,  1);
     452    plot.SetDescription("RMS skybrightess measured by the starguider;\\sigma_{B} [au]", "BrightRMS");
     453    plot.Plot("Star.fBrightnessRMS",                        0,  64,  1);
     454
    436455    //outer camera
    437456    //from calib*.root
     
    442461    plot.SetDescription("RMS Arrival Time outer Camera;\\sigma_{T,O} [sl]", "RmsArrTmO");
    443462    plot.Plot("Calibration.fArrTimeRmsOuter",  0, 2.5, 0.1);
     463    plot.SetDescription("Number of unsuitable pixels outer Camera;N{O}", "UnsuitO");
     464    plot.Plot("Calibration.fUnsuitableOuter",  0, 25, 1);
    444465    //from signal*.root
    445466    plot.SetDescription("Mean Pedestal RMS outer Camera;\\sigma_{P,O} [phe]", "PedRmsO");
     
    447468    plot.SetDescription("Mean Signal outer Camera;S_{O} [phe]", "SignalO");
    448469    plot.Plot("Calibration.fMeanSignalOuter",  0, 4.0, 0.05);
    449 
    450     plot.SetDescription("Median No. Stars recognized by the starguider;N_{0}", "StarsMed");
    451     plot.Plot("Star.fNumStarsMed",                          0,  70,  1);
    452     plot.SetDescription("RMS No. Stars recognized by the starguider;\\sigma_{N_{0}}", "StarsRMS");
    453     plot.Plot("Star.fNumStarsRMS",                          0,  25,  1);
    454     plot.SetDescription("Median No. Stars correlated by the starguider;N", "CorMed");
    455     plot.Plot("Star.fNumStarsCorMed",                       0,  70,  1);
    456     plot.SetDescription("RMS No. Stars correlated by the starguider;\\sigma_{N}", "CorRMS");
    457     plot.Plot("Star.fNumStarsCorRMS",                       0,  25,  1);
    458     plot.SetDescription("Relative number of correlated stars;N/N_{0} [%]", "StarsRel");
    459     plot.Plot("Star.fNumStarsCorMed/Star.fNumStarsMed*100", 0, 100, 10);
    460     plot.SetDescription("Median skbrightess measured by the starguider;B [au]", "BrightMed");
    461     plot.Plot("Star.fBrightnessMed",                        0, 111,  1);
    462     plot.SetDescription("RMS skybrightess measured by the starguider;\\sigma_{B} [au]", "BrightRMS");
    463     plot.Plot("Star.fBrightnessRMS",                        0,  64,  1);
    464470}
    465471
    466 int plotdb(TString from, TString to)
     472int plotdb(TString from, TString to, const char *dataset=0)
    467473{
    468474    TEnv env("sql.rc");
     
    528534}
    529535
    530 int plotdb(Int_t period)
     536int plotdb(Int_t period, const char *dataset="")
    531537{
    532538    TEnv env("sql.rc");
Note: See TracChangeset for help on using the changeset viewer.