Ignore:
Timestamp:
09/15/04 14:53:06 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mcalib
Files:
6 edited

Legend:

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

    r4934 r5030  
    163163  if(fCalibrationMode == kBlindPixel && !fQEs->IsBlindPixelMethodValid())
    164164    {
    165       *fLog << warn << GetDescriptor()
    166             << "Warning: Blind pixel calibration method not valid, switching to F-factor method" << endl;
     165      *fLog << warn << "WARNING - Blind pixel calibration method not valid, switching to F-factor method" << endl;
    167166      fCalibrationMode = kFfactor;
    168167    }
     
    170169  if(fCalibrationMode == kPinDiode && !fQEs->IsPINDiodeMethodValid())
    171170    {
    172       *fLog << warn << GetDescriptor()
    173             << "Warning: PIN diode calibration method not valid, switching to F-factor method" << endl;
     171      *fLog << warn << "WARNING - PIN diode calibration method not valid, switching to F-factor method" << endl;
    174172      fCalibrationMode = kFfactor;
    175173    }
     
    177175  if(fCalibrationMode == kCombined && !fQEs->IsCombinedMethodValid())
    178176    {
    179       *fLog << warn << GetDescriptor()
    180             << "Warning: Combined calibration method not valid, switching to F-factor method" << endl;
     177      *fLog << warn << "WARNING - Combined calibration method not valid, switching to F-factor method" << endl;
    181178      fCalibrationMode = kFfactor;
    182179    }
     
    201198      break;
    202199    case kPinDiode:
    203       *fLog << err << GetDescriptor()
    204                     << ": PIN Diode Calibration mode not yet available " << endl;
     200      *fLog << err << "PIN Diode Calibration mode not yet available " << endl;
    205201      return kFALSE;
    206202      break;
    207203    case kCombined:
    208       *fLog << err << GetDescriptor()
    209                     << ": Combined Calibration mode not yet available " << endl;
     204      *fLog << err << "Combined Calibration mode not yet available " << endl;
    210205      return kFALSE;
    211206      break;
    212207        case kFlatCharge:
    213       *fLog << warn << GetDescriptor()
    214                     << ": WARNING: Flat-fielding charges - only for Keiichi!!" << endl;
     208      *fLog << warn << "WARNING - Flat-fielding charges - only for Keiichi!!" << endl;
    215209      break;
    216210    case kDummy:
    217       *fLog << warn << GetDescriptor()
    218                     << ": WARNING: Dummy calibration, no calibration applied!!" << endl;
     211      *fLog << warn << "WARNING - Dummy calibration, no calibration applied!!" << endl;
    219212      break;
    220213    case kNone:
    221       *fLog << warn << GetDescriptor()
    222                     << ": WARNING: No calibration applied!!" << endl;
     214      *fLog << warn << "WARNING - No calibration applied!!" << endl;
    223215      break;
    224216    default:
    225       *fLog << warn << GetDescriptor()
    226             << ": WARNING: Calibration mode value ("
    227             <<fCalibrationMode<<") not known" << endl;
     217      *fLog << warn << "WARNING - Calibration mode value (" <<fCalibrationMode<<") not known" << endl;
    228218      return kFALSE;
    229219    }
  • trunk/MagicSoft/Mars/mcalib/MCalibrateData.cc

    r4766 r5030  
    356356        hiloconverr= pix.GetConversionHiLoErr();
    357357
    358         if (fBadPixels)
    359         {
    360             MBadPixelsPix &bad = (*fBadPixels)[pixidx];
    361             if (bad.IsUnsuitable())
    362                 return kFALSE;
    363         }
     358        if ((*fBadPixels)[pixidx].IsUnsuitable())
     359            return kFALSE;
    364360
    365361        calibConv    = pix.GetMeanConvFADC2Phe();
     
    367363        calibFFactor = pix.GetMeanFFactorFADC2Phot();
    368364
    369         MCalibrationQEPix &qe  = (MCalibrationQEPix&) (*fQEs)[pixidx];
     365        MCalibrationQEPix &qe = (MCalibrationQEPix&) (*fQEs)[pixidx];
    370366
    371367        switch(fCalibrationMode)
     
    439435}
    440436
    441 void MCalibrateData::Calibrate(Bool_t data, Bool_t pedestal) const
     437Int_t MCalibrateData::Calibrate(Bool_t data, Bool_t pedestal) const
    442438{
    443439    if (!data && !pedestal)
    444         return;
     440        return kTRUE;
    445441
    446442    const UInt_t  npix       = fSignals->GetSize();
     
    454450    Float_t calibFFactor;
    455451
     452    UInt_t skip = 0;
    456453    for (UInt_t pixidx=0; pixidx<npix; pixidx++)
    457454    {
    458455        if (!GetConversionFactor(pixidx, hiloconv, hiloconverr,
    459456                                 calibConv, calibConvErr, calibFFactor))
     457        {
     458            skip++;
    460459            continue;
     460        }
    461461
    462462        if (data)
     
    517517    }
    518518
     519    if (skip>npix*0.9)
     520    {
     521        *fLog << warn << "WARNING - GetConversionFactor has skipped more than 90% of the pixels... skip." << endl;
     522        return kCONTINUE;
     523    }
     524
    519525    if (pedestal)
    520526        fPedPhot->SetReadyToSave();
     
    525531        fCerPhotEvt->SetReadyToSave();
    526532    }
     533    return kTRUE;
    527534}
    528535
     
    546553     */
    547554
    548     Calibrate(fCalibrationMode!=kSkip, TestPedestalFlag(kEvent));
    549     return kTRUE;
     555    return Calibrate(fCalibrationMode!=kSkip, TestPedestalFlag(kEvent));
    550556}
    551557
  • trunk/MagicSoft/Mars/mcalib/MCalibrateData.h

    r4752 r5030  
    5353  TString  fNamePedPhotContainer;           // name of fPedPhot
    5454
    55   void Calibrate(Bool_t data, Bool_t pedestal) const;
     55  Int_t Calibrate(Bool_t data, Bool_t pedestal) const;
    5656 
    5757  Bool_t GetConversionFactor(UInt_t, Float_t &, Float_t &, Float_t &, Float_t &, Float_t &) const;
     
    9191  void   EnablePedestalType(PedestalType_t i)     { fPedestalFlag |=  i;      }
    9292  void   SetPedestalFlag(PedestalType_t i=kRun)   { fPedestalFlag  =  i;      }
    93   Bool_t TestPedestalFlag(PedestalType_t i) const { return fPedestalFlag & i; }
     93  Bool_t TestPedestalFlag(PedestalType_t i) const { return fPedestalFlag&i ? kTRUE : kFALSE; }
    9494 
    9595  void   SetCalibrationMode ( CalibrationMode_t calmode=kDefault ) { fCalibrationMode=calmode; }
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc

    r5024 r5030  
    466466        {
    467467          *fLog << endl;
    468           *fLog << warn << GetDescriptor()
    469                 << ": No MCalibrationBlindCam found... no Blind Pixel method! " << endl;
     468          *fLog << warn << "No MCalibrationBlindCam found... no Blind Pixel method! " << endl;
    470469          return kFALSE;
    471470        }
     
    492491    {
    493492      *fLog << endl;
    494       *fLog << warn << GetDescriptor()
    495             << ": MCalibrationChargePINDiode not found... no PIN Diode method! " << endl;
     493      *fLog << "MCalibrationChargePINDiode not found... no PIN Diode method! " << endl;
    496494    }
    497495 
  • trunk/MagicSoft/Mars/mcalib/MCalibrationIntensityCam.cc

    r5020 r5030  
    6666  fCams = new TObjArray;
    6767  fCams->SetOwner();
    68  
    69 }
    70 
     68}
    7169
    7270// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mcalib/MCalibrationIntensityRelTimeCam.cc

    r5020 r5030  
    5656  fName  = name  ? name  : "MCalibrationIntensityRelTimeCam";
    5757  fTitle = title ? title : "Results of the Intensity Calibration";
    58 
     58 
    5959  InitSize(1);
    6060}
Note: See TracChangeset for help on using the changeset viewer.