Changeset 7349 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
09/12/05 16:35:04 (19 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/NEWS

    r7342 r7349  
    88   * general: added a new game. Start it from the interpreter with
    99        MagicJam j;
     10
     11   * callisto: MBadPixelsCalc now raises an error instead of simply stopping
     12     the eventloop if something went wrong. This is necessary for the
     13     automatic processing
     14
     15   * callisto: Fixed a bug in the treatment of times in the bad pixel
     16     treatment. No neighbors have been taken into account, the new
     17     arrival time was always calculated by the pixels 0 to 5.
     18
     19   * callisto: Fixed a bug which caused the random and peak-search pedestal
     20     extracted with an extractor to be exchanged for the first (roughly)
     21     500 events. (The were simple exchanged in callisto.cc) This bug might
     22     have been introduced in Mars 0.9.4 when the order of calculation of the
     23     two types of pedestal in callisto got exchanged. The bug only effects
     24     the first seconds of data of each sequence.
    1025
    1126
  • trunk/MagicSoft/Mars/callisto.cc

    r7189 r7349  
    598598
    599599        // Where to search for calibration files
    600         if (!job4.Process(job1.GetPedestalCam(), job2.GetPedestalCam(), job3.GetPedestalCam()))
     600        if (!job4.Process(job1.GetPedestalCam(), job3.GetPedestalCam(), job2.GetPedestalCam()))
    601601            return 2;
    602602
  • trunk/MagicSoft/Mars/mbadpixels/MBadPixelsCalc.cc

    r7130 r7349  
    137137// too high pedestal Rms with respect to the mean.
    138138//
    139 Bool_t MBadPixelsCalc::CheckPedestalRms(MBadPixelsPix::UnsuitableType_t type) const
     139Int_t MBadPixelsCalc::CheckPedestalRms(MBadPixelsPix::UnsuitableType_t type) const
    140140{
    141141    const Bool_t checklo = fPedestalLevelVarianceLo>0;
     
    310310Int_t MBadPixelsCalc::Process()
    311311{
    312     return fCheckInProcess ? CheckPedestalRms(MBadPixelsPix::kUnsuitableEvt) : kTRUE;
     312    if (!fCheckInProcess)
     313        return kTRUE;
     314
     315    return CheckPedestalRms(MBadPixelsPix::kUnsuitableEvt) ? kTRUE : kERROR;
    313316}
    314317
  • trunk/MagicSoft/Mars/mbadpixels/MBadPixelsTreat.cc

    r7117 r7349  
    441441        for (unsigned int j=0; j<time.GetSize(); j++)
    442442        {
    443             const Double_t t = (*fEvt)[j].GetArrivalTime();
    444             if (t>=0)
     443            const Int_t nn = gpix.GetNeighbor(j);
     444
     445            const Double_t t = (*fEvt)[nn].GetArrivalTime();
     446            if (t>=0 && !IsPixelBad(nn))
    445447                time[n0++] = t;
    446448        }
  • trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc

    r7178 r7349  
    20452045        //if (!GetCanvas(c->GetName()))
    20462046        if (!tab || c->GetName()==(TString)tab)
    2047             DrawClonePad(AddTab(c->GetName()), *c);
     2047            DrawClonePad(c->GetName(), *c);
    20482048
    20492049    return kTRUE;
  • trunk/MagicSoft/Mars/mbase/MStatusDisplay.h

    r7001 r7349  
    204204     void   Update() { HandleTimer(&fTimer); HandleTimer(&fLogTimer); }
    205205
     206     void DrawClonePad(const char *tab, TCanvas &oldc)
     207     {
     208         DrawClonePad(AddTab(tab), oldc);
     209     }
     210
    206211     void SetNoContextMenu(Bool_t flag=kTRUE);
    207212
  • trunk/MagicSoft/Mars/mgui/MCamEvent.cc

    r4577 r7349  
    5555    InitSize(geom.GetNumPixels());
    5656}
     57
     58// --------------------------------------------------------------------------
     59//
     60// Return the mean of all corresponding GetPixelContent
     61//
     62Double_t MCamEvent::GetCameraMean(const MGeomCam &cam, Int_t type) const
     63{
     64    Int_t    num  = 0;
     65    Double_t mean = 0;
     66    for (unsigned int i=0; i<cam.GetNumPixels(); i++)
     67    {
     68        Double_t val;
     69        if (!GetPixelContent(val, i, cam, type))
     70            continue;
     71
     72        mean += val;
     73        num ++;
     74    }
     75    return num == 0 ? 0 : mean/num;
     76}
  • trunk/MagicSoft/Mars/mgui/MCamEvent.h

    r4577 r7349  
    1717    virtual void   InitSize(const UInt_t i) { } // Used by MGeomApply see Init()
    1818
     19    virtual Double_t GetCameraMean(const MGeomCam &cam, Int_t type=0) const;
     20
    1921    ClassDef(MCamEvent, 0) // A camera event
    2022};
  • trunk/MagicSoft/Mars/mhflux/MHThreshold.h

    r7170 r7349  
    1515{
    1616private:
    17     const MMcEvt *fMcEvt; //! POinter to MC energy
     17    const MMcEvt *fMcEvt; //! Pointer to MC energy
    1818
    1919    TH1D fHEnergy;
  • trunk/MagicSoft/Mars/mhvstime/MHSectorVsTime.cc

    r7223 r7349  
    8686using namespace std;
    8787
    88 const TString MHSectorVsTime::gsDefName  = "MSectorHVsTime";
     88const TString MHSectorVsTime::gsDefName  = "MHSectorVsTime";
    8989const TString MHSectorVsTime::gsDefTitle = "Graph of sector mean vs. time";
    9090
  • trunk/MagicSoft/Mars/mjobs/MDataSet.cc

    r7286 r7349  
    110110    while (!runs.IsNull())
    111111    {
    112         TString num = runs(regexp);
     112        const TString num = runs(regexp);
     113
     114        if (num.IsNull())
     115        {
     116            *fLog << warn << "WARNING - Sequence is NaN (not a number): " << runs << endl;
     117            break;
     118        }
    113119
    114120        const Int_t seq = atoi(num.Data());
     
    122128
    123129        if (i<n)
    124             *fLog << warn << "WARNING - Sequence #" << seq << " alraedy in list... skipped." << endl;
     130            *fLog << warn << "WARNING - Sequence #" << seq << " already in list... skipped." << endl;
    125131        else
    126132        {
  • trunk/MagicSoft/Mars/mjobs/MJCut.cc

    r7287 r7349  
    171171    p += "/";
    172172    p += fNameOutput.IsNull() ? Form("ganymed%08d.root", num) : fNameOutput.Data();
     173    gSystem->ExpandPathName(p);
    173174    return p;
    174175}
  • trunk/MagicSoft/Mars/mjobs/MSequence.cc

    r7220 r7349  
    166166    while (!runs.IsNull())
    167167    {
    168         TString num = runs(regexp);
     168        const TString num = runs(regexp);
     169
     170        if (num.IsNull())
     171        {
     172            *fLog << warn << "WARNING - Run is NaN (not a number): " << runs << endl;
     173            break;
     174        }
    169175
    170176        const Int_t run = atoi(num.Data());
     
    178184
    179185        if (i<n)
    180             *fLog << warn << "WARNING - Run #" << run << " alraedy in list... skipped." << endl;
     186            *fLog << warn << "WARNING - Run #" << run << " already in list... skipped." << endl;
    181187        else
    182188        {
  • trunk/MagicSoft/Mars/mpedestal/MPedPhotCam.cc

    r7223 r7349  
    357357        break;
    358358    case 5:
    359         val = (*this)[idx].GetRms()*TMath::Sqrt(cam.GetPixRatio(idx));
     359        val = (*this)[idx].GetRms()*cam.GetPixRatioSqrt(idx);
    360360        break;
    361361    default:
  • trunk/MagicSoft/Mars/msignal/MSignalCam.cc

    r7297 r7349  
    252252        Float_t testval = pix.GetNumPhotons()/pix.GetErrorPhot();
    253253        if (geom)
    254             testval *= TMath::Sqrt(geom->GetPixRatio(i/*pix.GetPixId()*/));
     254            testval *= geom->GetPixRatioSqrt(i/*pix.GetPixId()*/);
    255255
    256256        if (testval < minval)
     
    280280        Float_t testval = pix.GetNumPhotons()/pix.GetErrorPhot();
    281281        if (geom)
    282             testval *= TMath::Sqrt(geom->GetPixRatio(i/*pix.GetPixId()*/));
     282            testval *= geom->GetPixRatioSqrt(i/*pix.GetPixId()*/);
    283283
    284284        if (testval > maxval)
  • trunk/MagicSoft/Mars/msignal/MSignalCam.h

    r6856 r7349  
    4646    }
    4747
     48    // Setter functions for use in image cleaning classes only
     49    void SetSinglePixels(Short_t num, Float_t size)  { fNumSinglePixels=num; fSizeSinglePixels=size; }
     50    void SetNumPixelsSaturated(UInt_t hi, UInt_t lo) { fNumPixelsSaturatedHiGain=hi;fNumPixelsSaturatedLoGain=lo; }
     51
    4852    // Getter functions
    4953    UInt_t  GetNumPixels() const { return fPixels->GetEntriesFast(); }
     
    5559    Int_t   GetNumPixelsSaturatedHiGain() const { return fNumPixelsSaturatedHiGain; }
    5660    Int_t   GetNumPixelsSaturatedLoGain() const { return fNumPixelsSaturatedLoGain; }
    57 
    58     // Setter functions for use in image cleaning classes only
    59     void SetSinglePixels(Short_t num, Float_t size)  { fNumSinglePixels=num; fSizeSinglePixels=size; }
    60     void SetNumPixelsSaturated(UInt_t hi, UInt_t lo) { fNumPixelsSaturatedHiGain=hi;fNumPixelsSaturatedLoGain=lo; }
    6161
    6262    Bool_t  IsPixelExisting(Int_t id) const;
Note: See TracChangeset for help on using the changeset viewer.