Changeset 2476 for trunk/MagicSoft/Mars/mhist
- Timestamp:
- 11/05/03 18:20:19 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhist/MHCamera.cc
r2421 r2476 671 671 // 672 672 // Call this function to add a MCamEvent on top of the present contents. 673 // Only 'used' pixels are added.674 673 // 675 674 void MHCamera::AddCamContent(const MCamEvent &event, Int_t type) … … 682 681 { 683 682 Double_t val=0; 684 if (event.GetPixelContent(val, idx, *fGeomCam, type) && !IsUsed(idx))683 if (event.GetPixelContent(val, idx, *fGeomCam, type)/* && !IsUsed(idx)*/) 685 684 SetUsed(idx); 686 685 … … 693 692 // 694 693 // Call this function to add a MHCamera on top of the present contents. 695 // Only 'used' pixels are added.696 694 // Type: 697 695 // 0) bin content … … 731 729 // 732 730 // Call this function to add a TArrayD on top of the present contents. 733 // Only 'used' pixels are added.734 731 // 735 732 void MHCamera::AddCamContent(const TArrayD &event, const TArrayC *used) … … 745 742 Fill(idx, const_cast<TArrayD&>(event)[idx]); // FIXME: Slow! 746 743 747 if ( used &&(*const_cast<TArrayC*>(used))[idx])744 if (!used || (*const_cast<TArrayC*>(used))[idx]) 748 745 SetUsed(idx); 749 746 } … … 764 761 for (Int_t idx=0; idx<fNcells-2; idx++) 765 762 { 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)*/) 768 765 SetUsed(idx); 769 766 … … 1128 1125 if (fNotify && fNotify->GetSize()>0) 1129 1126 { 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? 1131 1148 fNotify->ForEach(MCamEvent, DrawPixelContent)(idx); 1149 gPad->Modified(); 1150 gPad->Update(); 1132 1151 } 1133 1152 }
Note:
See TracChangeset
for help on using the changeset viewer.