Changeset 8365


Ignore:
Timestamp:
03/04/07 14:46:44 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhcalib/MHCalibrationChargeCam.cc

    r8355 r8365  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MHCalibrationChargeCam.cc,v 1.54 2007-03-03 22:00:25 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MHCalibrationChargeCam.cc,v 1.55 2007-03-04 14:46:44 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    154154#include "MBadPixelsPix.h"
    155155
    156 #include "MRawEvtData.h"
    157156#include "MRawRunHeader.h"
    158157#include "MRawEvtPixelIter.h"
    159158
     159#include "MPedestalSubtractedEvt.h"
     160
    160161#include "MExtractedSignalCam.h"
    161162#include "MExtractedSignalPix.h"
    162 
    163 #include "MArrayI.h"
    164 #include "MArrayD.h"
    165163
    166164ClassImp(MHCalibrationChargeCam);
     
    328326Bool_t MHCalibrationChargeCam::SetupHists(const MParList *pList)
    329327{
    330 
    331   fRawEvt = (MRawEvtData*)pList->FindObject("MRawEvtData");
    332   if (!fRawEvt)
    333   {
    334       *fLog << err << dbginf << "MRawEvtData not found... aborting." << endl;
    335       return kFALSE;
    336   }
    337 
    338   return kTRUE;
     328    fRawEvt = (MPedestalSubtractedEvt*)pList->FindObject("MPedestalSubtractedEvt");
     329    if (!fRawEvt)
     330    {
     331        *fLog << err << dbginf << "MPedestalSubtractedEvt not found... aborting." << endl;
     332        return kFALSE;
     333    }
     334
     335    return kTRUE;
    339336}
    340337
     
    754751  }
    755752
    756   MRawEvtPixelIter pixel(fRawEvt);
    757   while (pixel.Next())
     753  const Int_t npix = fRawEvt->GetNumPixels();
     754  const Int_t nhi  = fRunHeader->GetNumSamplesHiGain();
     755  for (int pixid=0; pixid<npix; pixid++)
    758756  {
    759       const UInt_t pixid = pixel.GetPixelId();
    760 
    761757      MHCalibrationChargePix &histhi = (MHCalibrationChargePix&)(*this)[pixid];
    762 
    763758      if (histhi.IsExcluded())
    764759         continue;
    765      
    766       const Float_t timehi = (Float_t)pixel.GetIdxMaxHiGainSample(hifirst, hilast);
    767 
     760
     761      const Float_t timehi = fRawEvt->GetMax(pixid, hifirst, hilast)+hifirst;
    768762      histhi.FillAbsTime(timehi);
    769763
     
    778772          MHCalibrationChargePix &histlo = (MHCalibrationChargePix&)(*this)(pixid);
    779773
    780           const Float_t timelo = (Float_t)pixel.GetIdxMaxLoGainSample(lofirst, lolast);
     774          const Float_t timelo = fRawEvt->GetMax(pixid, nhi+lofirst, nhi+lolast)+lofirst;
    781775          histlo.FillAbsTime(timelo);
    782776
     
    785779        }
    786780  }
    787  
     781
    788782  for (UInt_t j=0; j<nareas; j++)
    789783    {
     
    795789
    796790      MHCalibrationChargePix &hipix = (MHCalibrationChargePix&)GetAverageHiGainArea(j);
    797      
    798791
    799792      if (IsOscillations())
Note: See TracChangeset for help on using the changeset viewer.