Changeset 7349 for trunk/MagicSoft/Mars/mgui
- Timestamp:
- 09/12/05 16:35:04 (19 years ago)
- Location:
- trunk/MagicSoft/Mars/mgui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mgui/MCamEvent.cc
r4577 r7349 55 55 InitSize(geom.GetNumPixels()); 56 56 } 57 58 // -------------------------------------------------------------------------- 59 // 60 // Return the mean of all corresponding GetPixelContent 61 // 62 Double_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 17 17 virtual void InitSize(const UInt_t i) { } // Used by MGeomApply see Init() 18 18 19 virtual Double_t GetCameraMean(const MGeomCam &cam, Int_t type=0) const; 20 19 21 ClassDef(MCamEvent, 0) // A camera event 20 22 };
Note:
See TracChangeset
for help on using the changeset viewer.