Ignore:
Timestamp:
11/05/03 18:20:19 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhist/MHCamera.cc

    r2421 r2476  
    671671//
    672672// Call this function to add a MCamEvent on top of the present contents.
    673 // Only 'used' pixels are added.
    674673//
    675674void MHCamera::AddCamContent(const MCamEvent &event, Int_t type)
     
    682681    {
    683682        Double_t val=0;
    684         if (event.GetPixelContent(val, idx, *fGeomCam, type) && !IsUsed(idx))
     683        if (event.GetPixelContent(val, idx, *fGeomCam, type)/* && !IsUsed(idx)*/)
    685684            SetUsed(idx);
    686685
     
    693692//
    694693// Call this function to add a MHCamera on top of the present contents.
    695 // Only 'used' pixels are added.
    696694// Type:
    697695//  0) bin content
     
    731729//
    732730// Call this function to add a TArrayD on top of the present contents.
    733 // Only 'used' pixels are added.
    734731//
    735732void MHCamera::AddCamContent(const TArrayD &event, const TArrayC *used)
     
    745742        Fill(idx, const_cast<TArrayD&>(event)[idx]); // FIXME: Slow!
    746743
    747         if (used && (*const_cast<TArrayC*>(used))[idx])
     744        if (!used || (*const_cast<TArrayC*>(used))[idx])
    748745            SetUsed(idx);
    749746    }
     
    764761    for (Int_t idx=0; idx<fNcells-2; idx++)
    765762    {
    766         Double_t val=0;
    767         if (event.GetPixelContent(val, idx, *fGeomCam, type) && !IsUsed(idx))
     763        Double_t val=threshold;
     764        if (event.GetPixelContent(val, idx, *fGeomCam, type)/* && !IsUsed(idx)*/)
    768765            SetUsed(idx);
    769766
     
    11281125    if (fNotify && fNotify->GetSize()>0)
    11291126    {
    1130         new TCanvas;
     1127        // FIXME: Is there a simpler and more convinient way?
     1128
     1129        // The name which is created here depends on the instance of
     1130        // MHCamera and on the pad on which it is drawn --> The name
     1131        // is unique. For ExecuteEvent gPad is always correctly set.
     1132        const TString name = Form("%p;%p;PixelContent", this, gPad);
     1133
     1134        TCanvas *old = (TCanvas*)gROOT->GetListOfCanvases()->FindObject(name);
     1135        if (old)
     1136            old->cd();
     1137        else
     1138            new TCanvas(name);
     1139
     1140        /*
     1141         TIter Next(gPad->GetListOfPrimitives());
     1142         TObject *o;
     1143         while (o=Next()) cout << o->GetName() << " " << o->IsA()->GetName() << endl;
     1144         */
     1145
     1146        // FIXME: Make sure, that the old histograms are really deleted.
     1147        //        Are they already deleted?
    11311148        fNotify->ForEach(MCamEvent, DrawPixelContent)(idx);
     1149        gPad->Modified();
     1150        gPad->Update();
    11321151    }
    11331152}
Note: See TracChangeset for help on using the changeset viewer.