Ignore:
Timestamp:
03/18/05 17:54:02 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mpedestal
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mpedestal/MPedPhotCalc.cc

    r5354 r6857  
    2020!   Author(s): Markus Gaug 4/2004 <mailto:markus@ifae.es>
    2121!
    22 !   Copyright: MAGIC Software Development, 2000-2004
     22!   Copyright: MAGIC Software Development, 2000-2005
    2323!
    2424!
     
    3636//
    3737//  Input Containers:
    38 //   MCerPhotEvt
     38//   MSignalCam
    3939//
    4040//  Output Containers:
     
    5050#include "MRawRunHeader.h"
    5151
    52 #include "MCerPhotPix.h"
    53 #include "MCerPhotEvt.h"
     52#include "MSignalPix.h"
     53#include "MSignalCam.h"
    5454
    5555#include "MPedPhotPix.h"
     
    7777// Look for the following input containers:
    7878//
    79 //  - MCerPhotEvt
     79//  - MSignalCam
    8080//  - MBadPixelsCam
    8181//
     
    8888{     
    8989  // Look for input container
    90   fCerPhot = (MCerPhotEvt*)pList->FindObject("MCerPhotEvt");
     90  fCerPhot = (MSignalCam*)pList->FindObject("MSignalCam");
    9191  if (!fCerPhot)
    9292    {
    93       *fLog << err << "MPedPhotCalc::PreProcess Error: MCerPhotEvt not found... aborting." << endl;
     93      *fLog << err << "MSignalCam not found... aborting." << endl;
    9494      return kFALSE;
    9595    }
     
    9898  fBadPixels = (MBadPixelsCam*)pList->FindObject("MBadPixelsCam");
    9999  if (!fBadPixels)
    100     {
    101       *fLog << warn << "MPedPhotCalc::PreProcess Warning: No MBadPixelsCam found." << endl;
    102     }
     100      *fLog << warn << "WARNING - MBadPixelsCam not found... ignored." << endl;
    103101
    104102  // Create output container
     
    143141Int_t MPedPhotCalc::Process()
    144142{
    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++)
    146145    {
    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();
    151147       
    152        fSumx[pixidx]  += nphot;
    153        fSumx2[pixidx] += nphot*nphot;
     148       fSumx[idx]  += nphot;
     149       fSumx2[idx] += nphot*nphot;
    154150    }
    155151
  • trunk/MagicSoft/Mars/mpedestal/MPedPhotCalc.h

    r3803 r6857  
    1111
    1212class MPedPhotCam;
    13 class MCerPhotEvt;
     13class MSignalCam;
    1414class MBadPixelsCam;
    1515class MPedPhotCalc : public MTask
     
    1717
    1818  MPedPhotCam   *fPedestals;  // Pedestals of all pixels in the camera
    19   MCerPhotEvt   *fCerPhot;    // Calibrated Cherenkov events
     19  MSignalCam    *fCerPhot;    // Calibrated Cherenkov events
    2020  MBadPixelsCam *fBadPixels;  // Bad Pixels
    2121 
Note: See TracChangeset for help on using the changeset viewer.