Ignore:
Timestamp:
09/16/05 11:58:09 (19 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mcalib
Files:
2 edited

Legend:

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

    r7189 r7353  
    542542              {
    543543                skip++;
    544                 calibConv = -1.;
    545                 continue;
     544                continue; // calibConv will remain 0
    546545             }
    547546           
     
    679678            calibConv    = -1.;
    680679            calibFFactor = -1.;
    681             *fLog << warn << "Conversion factor of Pixel " << pixidx << " out of range " << endl;
     680            *fLog << warn << GetDescriptor()
     681                << ": WARNING - Conversion factor of Pixel " << pixidx << " out of range... set to 0. " << endl;
    682682          }
    683683        cpix.SetCalibConst(calibConv);
  • trunk/MagicSoft/Mars/mcalib/MCalibrateRelTimes.cc

    r7134 r7353  
    8686Int_t MCalibrateRelTimes::PreProcess(MParList *pList)
    8787{
    88 
    8988    fSignals = (MArrivalTimeCam*)pList->FindObject(AddSerialNumber("MArrivalTimeCam"));
    9089
    9190    if (!fSignals)
    9291    {
    93       *fLog << err << AddSerialNumber("MArrivalTimeCam") << " not found ... aborting" << endl;
     92        *fLog << err << AddSerialNumber("MArrivalTimeCam") << " not found ... aborting" << endl;
    9493        return kFALSE;
    9594    }
     
    9796    fBadPixels = (MBadPixelsCam*)pList->FindObject(AddSerialNumber("MBadPixelsCam"));
    9897    if (!fBadPixels)
    99       *fLog << warn << AddSerialNumber("MBadPixelsCam") << " not found ... no action" << endl;
    100    
     98        *fLog << warn << AddSerialNumber("MBadPixelsCam") << " not found ... ignoring." << endl;
    10199
    102100    fCalibrations = (MCalibrationRelTimeCam*)pList->FindObject(AddSerialNumber("MCalibrationRelTimeCam"));
     
    106104        return kFALSE;
    107105      }
    108 
    109106
    110107    fArrivalTime = (MSignalCam*)pList->FindCreateObj(AddSerialNumber("MSignalCam"));
     
    124121    const UInt_t npix = fSignals->GetSize();
    125122
    126     for (UInt_t pixidx=0; pixidx<npix; pixidx++)
     123    for (UInt_t idx=0; idx<npix; idx++)
    127124    {
    128         MCalibrationRelTimePix &pix = (MCalibrationRelTimePix&)(*fCalibrations)[pixidx];
    129 
    130         if (fBadPixels && (*fBadPixels)[pixidx].IsUnsuitable(MBadPixelsPix::kUnsuitableRun))
     125        if (fBadPixels && (*fBadPixels)[idx].IsUnsuitable(MBadPixelsPix::kUnsuitableRun))
    131126            continue;
    132127
    133         const Float_t offset    = pix.GetTimeOffset();
     128        const MCalibrationRelTimePix &pix = (MCalibrationRelTimePix&)(*fCalibrations)[idx];
     129        const MArrivalTimePix        &sig = (*fSignals)[idx];
    134130
    135         MArrivalTimePix &sig = (*fSignals)[pixidx];
     131        const Float_t signal = sig.GetArrivalTime();
     132        const Float_t offset = pix.GetTimeOffset();
    136133
    137         Float_t signal;
    138 
    139         if (sig.IsLoGainUsed())
    140           signal = sig.GetArrivalTimeLoGain();
    141         else
    142           signal = sig.GetArrivalTimeHiGain();
    143 
    144         const Float_t time = signal - offset;
    145 
    146         (*fArrivalTime)[pixidx].SetArrivalTime(time);
    147 
    148     } /* for (UInt_t pixidx=0; pixidx<npix; pixidx++) */
     134        (*fArrivalTime)[idx].SetArrivalTime(signal - offset);
     135    }
    149136
    150137    fArrivalTime->SetReadyToSave();
Note: See TracChangeset for help on using the changeset viewer.