Ignore:
Timestamp:
04/18/07 10:00:04 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mmovie/MMoviePrepare.cc

    r8406 r8411  
    4949//   MPedestalSubtractedEvt
    5050//   MPedestalFundamental [MPedestalCam]
    51 //   MCalibrateData
     51//   MCalibConstCam
    5252//   MCalibrationRelTimeCam
    5353//   MRawRunHeader
     
    7575#include "MPedestalPix.h"
    7676
     77#include "MCalibConstCam.h"
     78#include "MCalibConstPix.h"
    7779
    7880#include "MCalibrationRelTimeCam.h"
     
    8284#include "MMovieData.h"
    8385#include "MRawRunHeader.h"
    84 #include "MCalibrateData.h"
    8586#include "MPedestalSubtractedEvt.h"
    8687
     
    143144        return kFALSE;
    144145    }
    145     fCal = (MCalibrateData*)plist->FindTaskListWithTask("MCalibrateData")->FindTask("MCalibrateData");
     146    fCal = (MCalibConstCam*)plist->FindObject("MCalibConstCam");
    146147    if (!fCal)
    147148    {
    148         *fLog << err << "MCalibrateData not found ... aborting." << endl;
     149        *fLog << err << "MCalibConstCam not found ... aborting." << endl;
    149150        return kFALSE;
    150151    }
     
    193194Double_t MMoviePrepare::GetMedianCalibConst() const
    194195{
    195     const MArrayF &calco = fCal->GetCalibConsts();
    196 
    197196    Int_t n = fCam->GetNumPixWithAidx(0);
    198197
     
    201200    for (UInt_t i=0; i<fCam->GetNumPixels(); i++)
    202201        if ((*fCam)[i].GetAidx()==0)
    203             arr[--n] = calco[i];
     202            arr[--n] = (*fCal)[i].GetCalibConst();
    204203
    205204    return TMath::Median(arr.GetSize(), arr.GetArray());
     
    246245
    247246    // For invalid calib constants we can use the sector average
    248     const MArrayF &calco = fCal->GetCalibConsts();
    249247    const UShort_t npix  = fEvt->GetNumPixels();
    250248    const Double_t slope = 1./GetMedianCalibConst();
     
    258256
    259257        const Float_t  offset = tpix.GetTimeOffset();
    260         const Float_t  cal    = calco[p];
     258        const Float_t  cal    = (*fCal)[p].GetCalibConst();
    261259        const Float_t *ptr    = fEvt->GetSamples(p)+fFirstSlice;
    262260        const Float_t  scale  = cal*slope*fCam->GetPixRatio(p);
     
    290288//
    291289// Example:
    292 //   MMoviewPrepare.FirstSlice: 10
    293 //   MMoviewPrepare.LastSlice:  50
     290//   MMoviePrepare.FirstSlice: 10
     291//   MMoviePrepare.LastSlice:  50
    294292//
    295293Int_t MMoviePrepare::ReadEnv(const TEnv &env, TString prefix, Bool_t print)
Note: See TracChangeset for help on using the changeset viewer.