Changeset 6857 for trunk/MagicSoft/Mars/mpedestal
- Timestamp:
- 03/18/05 17:54:02 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mpedestal
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mpedestal/MPedPhotCalc.cc
r5354 r6857 20 20 ! Author(s): Markus Gaug 4/2004 <mailto:markus@ifae.es> 21 21 ! 22 ! Copyright: MAGIC Software Development, 2000-200 422 ! Copyright: MAGIC Software Development, 2000-2005 23 23 ! 24 24 ! … … 36 36 // 37 37 // Input Containers: 38 // M CerPhotEvt38 // MSignalCam 39 39 // 40 40 // Output Containers: … … 50 50 #include "MRawRunHeader.h" 51 51 52 #include "M CerPhotPix.h"53 #include "M CerPhotEvt.h"52 #include "MSignalPix.h" 53 #include "MSignalCam.h" 54 54 55 55 #include "MPedPhotPix.h" … … 77 77 // Look for the following input containers: 78 78 // 79 // - M CerPhotEvt79 // - MSignalCam 80 80 // - MBadPixelsCam 81 81 // … … 88 88 { 89 89 // Look for input container 90 fCerPhot = (M CerPhotEvt*)pList->FindObject("MCerPhotEvt");90 fCerPhot = (MSignalCam*)pList->FindObject("MSignalCam"); 91 91 if (!fCerPhot) 92 92 { 93 *fLog << err << "M PedPhotCalc::PreProcess Error: MCerPhotEvtnot found... aborting." << endl;93 *fLog << err << "MSignalCam not found... aborting." << endl; 94 94 return kFALSE; 95 95 } … … 98 98 fBadPixels = (MBadPixelsCam*)pList->FindObject("MBadPixelsCam"); 99 99 if (!fBadPixels) 100 { 101 *fLog << warn << "MPedPhotCalc::PreProcess Warning: No MBadPixelsCam found." << endl; 102 } 100 *fLog << warn << "WARNING - MBadPixelsCam not found... ignored." << endl; 103 101 104 102 // Create output container … … 143 141 Int_t MPedPhotCalc::Process() 144 142 { 145 for(UInt_t i=0;i<fCerPhot->GetNumPixels();i++) 143 const UInt_t n = fCerPhot->GetNumPixels(); 144 for(UInt_t idx=0; idx<n; idx++) 146 145 { 147 const MCerPhotPix &pix = (*fCerPhot)[i]; 148 const Int_t pixidx = pix.GetPixId(); 149 150 const Float_t nphot = pix.GetNumPhotons(); 146 const Float_t nphot = (*fCerPhot)[idx].GetNumPhotons(); 151 147 152 fSumx[ pixidx] += nphot;153 fSumx2[ pixidx] += nphot*nphot;148 fSumx[idx] += nphot; 149 fSumx2[idx] += nphot*nphot; 154 150 } 155 151 -
trunk/MagicSoft/Mars/mpedestal/MPedPhotCalc.h
r3803 r6857 11 11 12 12 class MPedPhotCam; 13 class M CerPhotEvt;13 class MSignalCam; 14 14 class MBadPixelsCam; 15 15 class MPedPhotCalc : public MTask … … 17 17 18 18 MPedPhotCam *fPedestals; // Pedestals of all pixels in the camera 19 M CerPhotEvt *fCerPhot; // Calibrated Cherenkov events19 MSignalCam *fCerPhot; // Calibrated Cherenkov events 20 20 MBadPixelsCam *fBadPixels; // Bad Pixels 21 21
Note:
See TracChangeset
for help on using the changeset viewer.