Changeset 3437 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
03/07/04 21:00:11 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mcalib
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mcalib/MCalibrate.cc

    r3425 r3437  
    8585// Default constructor.
    8686//
    87 MCalibrate::MCalibrate(CalibrationMode_t calmode,const char *name, const char *title) : fCalibrationMode(calmode)
     87MCalibrate::MCalibrate(CalibrationMode_t calmode,const char *name, const char *title)
     88    : fGeomCam(NULL), fCalibrations(NULL), fBadPixels(NULL), fSignals(NULL),
     89      fCerPhotEvt(NULL), fCalibrationMode(calmode)
    8890{
    8991    fName  = name  ? name  : "MCalibrate";
     
    111113    {
    112114      *fLog << err << AddSerialNumber("MExtractedSignalCam") << " not found ... aborting" << endl;
     115        return kFALSE;
     116    }
     117
     118    fBadPixels = (MBadPixelsCam*)pList->FindObject(AddSerialNumber("MBadPixelsCam"));
     119
     120    if (!fBadPixels)
     121    {
     122      *fLog << err << AddSerialNumber("MBadPixelsCam") << " not found ... aborting" << endl;
    113123        return kFALSE;
    114124    }
     
    217227      if(fCalibrationMode!=kNone)
    218228        {
     229
    219230          MCalibrationChargePix &pix = (*fCalibrations)[pixidx];       
    220          
    221 
    222           //
    223           // Will be replaced by a call to MBadPixels
    224           //if (!pix.IsChargeValid())
    225           //continue;
     231          MBadPixelsPix         &bad = (*fBadPixels)[pixidx];
     232
     233          if (!bad.IsCalibrationResultOK())
     234            continue;
    226235         
    227236          switch(fCalibrationMode)
  • trunk/MagicSoft/Mars/mcalib/MCalibrate.h

    r3249 r3437  
    1515
    1616class MGeomCam;
     17class MBadPixelsCam;
    1718class MCalibrationChargeCam;
    1819class MExtractedSignalCam;
     
    2324private:
    2425    MGeomCam              *fGeomCam;      // Camera geometry container
    25     MCalibrationChargeCam *fCalibrations; // Calibration constants
     26    MCalibrationChargeCam *fCalibrations; // Calibration constants
     27    MBadPixelsCam         *fBadPixels;    // Bad Pixels information
    2628    MExtractedSignalCam   *fSignals;      // Integrated charge in FADCs counts
    2729    MCerPhotEvt           *fCerPhotEvt;   // Cerenkov Photon Event used for calculation
  • trunk/MagicSoft/Mars/mcalib/MCalibrateData.cc

    r3425 r3437  
    6969#include "MPedPhotPix.h"
    7070
     71#include "MBadPixelsCam.h"
     72#include "MBadPixelsPix.h"
     73
    7174#include "MCerPhotEvt.h"
    7275
     
    7881// Default constructor.
    7982//
    80 MCalibrateData::MCalibrateData(CalibrationMode_t calmode,const char *name, const char *title) : fCalibrationMode(calmode)
     83MCalibrateData::MCalibrateData(CalibrationMode_t calmode,const char *name, const char *title)
     84    : fCam(NULL), fPedestal(NULL), fBadPixels(NULL), fCalibrations(NULL), fSignals(NULL),
     85      fPedPhot(NULL), fCerPhotEvt(NULL), fCalibrationMode(calmode)
    8186{
    8287    fName  = name  ? name  : "MCalibrateData";
     
    112117    {
    113118      *fLog << err << AddSerialNumber("MExtractedSignalCam") << " not found ... aborting" << endl;
     119        return kFALSE;
     120    }
     121
     122    fBadPixels = (MBadPixelsCam*)pList->FindObject(AddSerialNumber("MBadPixelsCam"));
     123
     124    if (!fBadPixels)
     125    {
     126      *fLog << err << AddSerialNumber("MBadPixelsCam") << " not found ... aborting" << endl;
    114127        return kFALSE;
    115128    }
     
    236249  {
    237250    MCalibrationChargePix &pix = (*fCalibrations)[pixidx];       
    238          
    239     //
    240     // Will be replaced by call to MBadPixels
    241     //
    242     //if (!pix.IsChargeValid())
    243     //      return kFALSE;
    244          
     251    MBadPixelsPix         &bad = (*fBadPixels)[pixidx];
     252   
     253    if (!bad.IsCalibrationResultOK())
     254      return kFALSE;
     255   
    245256    hiloconv   = pix.GetConversionHiLo();
    246257    hiloconverr= pix.GetConversionHiLoErr();
  • trunk/MagicSoft/Mars/mcalib/MCalibrateData.h

    r3301 r3437  
    2323
    2424class MGeomCam;
     25class MBadPixelsCam;
    2526class MPedestalCam;
    2627class MCalibrationChargeCam;
     
    3536    MGeomCam              *fCam;
    3637    MPedestalCam          *fPedestal;     // Pedestals/slice [ADC counts]
     38    MBadPixelsCam         *fBadPixels;    // Bad Pixels information
    3739    MCalibrationChargeCam *fCalibrations; // Calibration constants
    3840    MExtractedSignalCam   *fSignals;      // Integrated charge in FADCs counts
Note: See TracChangeset for help on using the changeset viewer.