Changeset 7358 for trunk/MagicSoft


Ignore:
Timestamp:
09/21/05 14:26:45 (19 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r7357 r7358  
    1818
    1919                                                 -*-*- END OF LINE -*-*-
     20 2005/09/21 Thomas Bretz
     21
     22   * datacenter/macros/plotdb.C:
     23     - changed some resolution values
     24
     25   * mfileio/MWriteRootFile.cc:
     26     - added a FIXME comment
     27
     28   * mhvstime/MHSectorVsTime.h:
     29     - added new function GetGraph
     30     - increased version number (increase was forgotten some time ago)
     31
     32   * mimage/MImgCleanStd.cc:
     33     - added some comments
     34     - replaced IsPixelUsed/Core(int) by [int].IsPixelUsed/Core for
     35       acceleration (some obsolete range checks are skipped)
     36     - now the core status is explicily set in any case
     37     - removed an obsolete range check in the ring cleaning
     38     - the range checks became obsolete because with the new format
     39       all pixels must exist.
     40
     41   * mjobs/MDataSet.cc:
     42     - sort the sequence numbers instead of the file names (the file
     43       name sort might be biased due to different paths)
     44
     45   * mjobs/MJob.[h,cc]:
     46     - new ststic functions: SortArray
     47
     48   * mjobs/MSequence.cc:
     49     - sort run-numbers as the sequences are sorted in MDataSet
     50
     51
     52
    2053 2005/09/20 Daniela Dorner
    2154
  • trunk/MagicSoft/Mars/NEWS

    r7355 r7358  
    3030     two types of pedestal in callisto got exchanged. The bug only effects
    3131     the first seconds of data of each sequence.
     32
     33   - ganymed: The sequences were still not sorted correctly in any case,
     34     because they were sorted by the full qualified path name. Now they
     35     are sorted by their sequence number.
    3236
    3337
  • trunk/MagicSoft/Mars/datacenter/macros/plotdb.C

    r7142 r7358  
    292292    //from signal*.root
    293293    plot.SetDescription("Mean Pedestal RMS inner Camera;\\sigma_{P,I} [phe]", "PedRmsI");
    294     plot.Plot("Calibration.fMeanPedRmsInner",  0, 3.5, 0.1);
     294    plot.Plot("Calibration.fMeanPedRmsInner",  0, 3.5, 0.05);
    295295    //from star*.root
    296296    //muon
     
    303303    //imgpar
    304304    plot.SetDescription("Mean Number of Islands after cleaning;N [#]", "NumIsl");
    305     plot.Plot("Star.fMeanNumberIslands",       0.5, 4.5, 0.1);
     305    plot.Plot("Star.fMeanNumberIslands",       0.5, 4.5, 0.01);
    306306    plot.SetDescription("Measures effective on time;T_{eff} [s]", "EffOn");
    307     plot.Plot("Star.fEffOnTime",               0, 10000, 60);
     307    plot.Plot("Star.fEffOnTime",               0, 10000, 150);
    308308    plot.SetDescription("Datarate [Hz]", "Rate");
    309309    plot.Plot("Star.fDataRate",                0, 600, 10);
     
    323323    //from signal*.root
    324324    plot.SetDescription("Mean Pedestal RMS outer Camera;\\sigma_{P,O} [phe]", "PedRmsO");
    325     plot.Plot("Calibration.fMeanPedRmsOuter",  0, 4.0, 0.1);
     325    plot.Plot("Calibration.fMeanPedRmsOuter",  0, 4.0, 0.05);
    326326}
    327327
  • trunk/MagicSoft/Mars/mfileio/MWriteRootFile.cc

    r6994 r7358  
    711711        return kTRUE;
    712712
     713    // FIXME: THIS IS EMITTED FOR ALL CONSEQUTIVE EVENTS!
    713714    *fLog << warn << endl;
    714715    *fLog << "WARNING - MWriteRootFile:   Root's  TTree/TFile   has  opened   a  new  file" << endl;
  • trunk/MagicSoft/Mars/mhvstime/MHSectorVsTime.h

    r7223 r7358  
    7171    // Getter
    7272    TH1 *GetHistByName(const TString name="") const;
    73     //TGraph *GetGraph() { return fGraph; }
     73    TGraph *GetGraph() { return fGraph; }
    7474
    7575    // TObject
     
    8080    void Paint(Option_t *o=NULL);
    8181
    82     ClassDef(MHSectorVsTime, 1) // Histogram to sum camera events
     82    ClassDef(MHSectorVsTime, 2) // Histogram to sum camera events
    8383};
    8484
    8585#endif
    86 
    87 
    88 
  • trunk/MagicSoft/Mars/mimage/MImgCleanStd.cc

    r7208 r7358  
    377377    for (UInt_t idx=0; idx<npixevt; idx++)
    378378    {
     379        // The default for pixels is "used" set by
     380        // MParContainer::Reset before processing
    379381        if (data[idx]>fCleanLvl1)
    380382            continue;
    381383
     384        // Setting a pixel to unused if it is unmapped would overwrite
     385        // the unmapped-status. Therefor this pixels are excluded.
    382386        MSignalPix &pix = (*fEvt)[idx];
    383387        if (!pix.IsPixelUnmapped())
     
    401405    for (UInt_t idx=0; idx<npixevt; idx++)
    402406    {
     407        // Exclude all unused (this includes all unmapped) pixels
    403408        MSignalPix &pix = (*fEvt)[idx];
    404409        if (!pix.IsPixelUsed())
     
    416421            const Int_t idx2 = gpix.GetNeighbor(j);
    417422
    418             // when you find an used neighbor, break the loop
    419             if (fEvt->IsPixelUsed(idx2))
     423            // when you find an used neighbor (this excludes unused
     424            // and unmapped pixels) break the loop
     425            if ((*fEvt)[idx2].IsPixelUsed())
    420426            {
    421427                hasNeighbor = kTRUE;
     
    424430        }
    425431
    426         if (hasNeighbor == kFALSE)
    427         {
    428             if (!fKeepSinglePixels)
    429                 pix.SetPixelUnused();
    430             size += pix.GetNumPhotons();
    431             n++;
    432         }
    433     }
    434 
     432        // If the pixel has at least one core-neighbor
     433        // go on with the next pixel
     434        if (hasNeighbor)
     435            continue;
     436
     437        // If the pixel has no neighbors and the single pixels
     438        // should not be kept turn the used- into an unused-status
     439        if (!fKeepSinglePixels)
     440            pix.SetPixelUnused();
     441
     442        // count size and number of single core-pixels
     443        size += pix.GetNumPhotons();
     444        n++;
     445    }
     446
     447    // Now turn the used-status into the core-status
     448    // (FIXME: A more intelligent handling of used/core in clean step1/2
     449    //         would make this loop obsolete!)
    435450    for (UInt_t idx=0; idx<npixevt; idx++)
    436451    {
    437452        MSignalPix &pix = (*fEvt)[idx];
    438         if (pix.IsPixelUsed())
    439             pix.SetPixelCore();
     453        pix.SetPixelCore(pix.IsPixelUsed());
    440454    }
    441455
     
    458472        const Int_t idx2 = gpix.GetNeighbor(j);
    459473
    460         if (!fEvt->IsPixelCore(idx2))
     474        // Check if the neighbor pixel is a core pixel. (Rem: Unampped
     475        // pixels are never assigned the core-pixel status)
     476        if (!(*fEvt)[idx2].IsPixelCore())
    461477            continue;
    462478
     
    475491//   If a value<2 for fCleanRings is used, no CleanStep4 is done.
    476492//
    477 void MImgCleanStd::CleanStep4(UShort_t r, Int_t idx/*MSignalPix &pix*/)
     493void MImgCleanStd::CleanStep4(UShort_t r, Int_t idx)
    478494{
    479495    MSignalPix &pix = (*fEvt)[idx];
     
    490506    // and tell to which ring it belongs to.
    491507    //
    492     MGeomPix  &gpix  = (*fCam)[idx];
     508    MGeomPix  &gpix = (*fCam)[idx];
    493509
    494510    const Int_t nnmax = gpix.GetNumNeighbors();
     
    498514        const Int_t idx2 = gpix.GetNeighbor(j);
    499515
    500         MSignalPix *npix = fEvt->GetPixById(idx2);
    501         if (!npix || !npix->IsPixelUsed() || npix->GetRing()>r-1 )
     516        const MSignalPix &npix = (*fEvt)[idx2];
     517        if (!npix.IsPixelUsed() || npix.GetRing()>r-1 )
    502518            continue;
    503519
  • trunk/MagicSoft/Mars/mjobs/MDataSet.cc

    r7349 r7358  
    8686
    8787#include "MRead.h"
     88#include "MJob.h"
    8889#include "MAstro.h"
    8990#include "MDirIter.h"
     
    139140        runs.Remove(0, runs.First(num)+num.Length());
    140141    }
     142
     143    MJob::SortArray(data);
    141144}
    142145
     
    175178    // For the synchronization we must make sure, that all sequences are
    176179    // in the correct order...
    177     list.Sort();
     180    // list.Sort();
    178181}
    179182
     
    298301    // Filenames MUST begin with an appropriate string which allow
    299302    // to order them correctly in time!
    300     files.Sort();
     303    // files.Sort();
    301304
    302305    if (gLog.GetDebugLevel()>4)
  • trunk/MagicSoft/Mars/mjobs/MJob.cc

    r7099 r7358  
    359359    return path;
    360360}
     361
     362void MJob::SortArray(TArrayI &arr)
     363{
     364    TArrayI idx(arr.GetSize());
     365    TArrayI srt(arr);
     366
     367    TMath::Sort(arr.GetSize(), srt.GetArray(), idx.GetArray(), kFALSE);
     368
     369    for (int i=0; i<arr.GetSize(); i++)
     370        arr[i] = srt[idx[i]];
     371}
  • trunk/MagicSoft/Mars/mjobs/MJob.h

    r7096 r7358  
    7777
    7878    static TString ExpandPath(TString fname);
     79    static void SortArray(TArrayI &arr);
    7980
    8081    ClassDef(MJob, 0) // Bas class for Jobs
  • trunk/MagicSoft/Mars/mjobs/MSequence.cc

    r7349 r7358  
    130130#include "MLogManip.h"
    131131
     132#include "MJob.h"
    132133#include "MAstro.h"
    133134#include "MString.h"
     
    194195        runs.Remove(0, runs.First(num)+num.Length());
    195196    }
     197
     198    MJob::SortArray(data);
    196199}
    197200
Note: See TracChangeset for help on using the changeset viewer.