Changeset 3721 for trunk


Ignore:
Timestamp:
04/13/04 18:21:31 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r3720 r3721  
    4545   * msignal/MExtractedSignalCam.cc
    4646     - intialize variables by default to 0.
     47
     48   * mcalib/MHCalibrationChargeCam.[h,cc]
     49     - pointer to fSig is not stored, somehow, when running MJCalibration
     50       Don't know why. Removed and stored some variables instead
    4751
    4852
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeCam.cc

    r3697 r3721  
    160160//
    161161MHCalibrationChargeCam::MHCalibrationChargeCam(const char *name, const char *title)
    162     : fRawEvt(NULL), fSig(NULL)
     162    : fRawEvt(NULL)
    163163{
    164164  fName  = name  ? name  : "MHCalibrationChargeCam";
     
    175175// Gets the pointers to:
    176176// - MRawEvtData
    177 // - MExtractedSignalCam
    178177//
    179178Bool_t MHCalibrationChargeCam::SetupHists(const MParList *pList)
    180179{
    181  
     180
    182181  fRawEvt = (MRawEvtData*)pList->FindObject("MRawEvtData");
    183182  if (!fRawEvt)
     
    187186  }
    188187
    189   MExtractedSignalCam *fSig = (MExtractedSignalCam*)pList->FindObject("MExtractedSignalCam");
    190   if (!fSig)
    191   {
    192       *fLog << err << "MExtractedSignalCam not found... abort." << endl;
    193       return kFALSE;
    194   }
    195 
    196188  return kTRUE;
    197189}
     
    200192//
    201193// Gets or creates the pointers to:
     194// - MExtractedSignalCam
    202195// - MCalibrationChargeCam
    203196// - MBadPixelsCam
     
    231224{
    232225
     226  MExtractedSignalCam *signal = (MExtractedSignalCam*)pList->FindObject("MExtractedSignalCam");
     227  if (!signal)
     228  {
     229      *fLog << err << "MExtractedSignalCam not found... abort." << endl;
     230      return kFALSE;
     231  }
     232
    233233  fCam = (MCalibrationCam*)pList->FindObject("MCalibrationChargeCam");
    234234  if (!fCam)
     
    244244    }
    245245
    246   const Float_t numhigain = fSig->GetNumUsedHiGainFADCSlices();
    247   const Float_t numlogain = fSig->GetNumUsedLoGainFADCSlices(); 
     246  fFirstHiGain = signal->GetFirstUsedSliceHiGain();
     247  fLastHiGain  = signal->GetLastUsedSliceHiGain();
     248  fFirstLoGain = signal->GetFirstUsedSliceLoGain();
     249  fLastLoGain  = signal->GetLastUsedSliceLoGain();
     250
     251  const Float_t numhigain = signal->GetNumUsedHiGainFADCSlices();
     252  const Float_t numlogain = signal->GetNumUsedLoGainFADCSlices(); 
    248253
    249254  if (fCam->GetNumHiGainFADCSlices() == 0.)
     
    252257    {
    253258      *fLog << err << GetDescriptor()
    254             << ": Number of High Gain FADC extraction slices has changes, abort..." << endl;
     259            << ": Number of High Gain FADC extraction slices has changed, abort..." << endl;
    255260      return kFALSE;
    256261    }
    257  
     262
    258263  if (fCam->GetNumLoGainFADCSlices() == 0.)
    259264    fCam->SetNumLoGainFADCSlices ( numlogain );
     
    310315      }
    311316  }
     317
    312318
    313319  if (fAverageLoGainAreas->GetEntries()==0)
     
    561567{
    562568
    563   const Byte_t firsthi = fSig->GetFirstUsedSliceHiGain();
    564   const Byte_t lasthi  = fSig->GetLastUsedSliceHiGain();
    565   const Byte_t firstlo = fSig->GetFirstUsedSliceLoGain();
    566   const Byte_t lastlo  = fSig->GetLastUsedSliceLoGain();
    567 
    568 
    569569  for (Int_t i=0; i<fHiGainArray->GetSize(); i++)
    570570    {
     
    584584        }
    585585
    586       FinalizeAbsTimes(histhi, pix, bad, firsthi, lasthi);
     586      FinalizeAbsTimes(histhi, pix, bad, fFirstHiGain, fLastHiGain);
    587587    }
    588588
     
    607607     
    608608      if (pix.IsHiGainSaturation())
    609         FinalizeAbsTimes(histlo, pix, bad, firstlo, lastlo);
     609        FinalizeAbsTimes(histlo, pix, bad, fFirstLoGain, fLastLoGain);
    610610    }
    611611
     
    624624        }
    625625
    626       FinalizeAbsTimes(histhi, pix, bad, firsthi, lasthi);
     626      FinalizeAbsTimes(histhi, pix, bad, fFirstHiGain, fLastHiGain);
    627627   }
    628628 
     
    642642
    643643      if (pix.IsHiGainSaturation())
    644         FinalizeAbsTimes(histlo, pix, bad, firstlo, lastlo);
     644        FinalizeAbsTimes(histlo, pix, bad, fFirstLoGain, fLastLoGain);
    645645    }
    646646
     
    659659        }
    660660
    661       FinalizeAbsTimes(histhi, pix, bad, firsthi, lasthi);
     661      FinalizeAbsTimes(histhi, pix, bad, fFirstHiGain, fLastHiGain);
    662662    }
    663663 
     
    678678
    679679      if (pix.IsHiGainSaturation())
    680         FinalizeAbsTimes(histlo, pix, bad, firstlo, lastlo);
     680        FinalizeAbsTimes(histlo, pix, bad, fFirstLoGain, fLastLoGain);
    681681    }
    682682 
     
    721721    {
    722722      *fLog << warn << GetDescriptor()
    723             << Form("%s%3.1f%s%2i%s%4i",": Mean ArrivalTime: ",mean," smaller than ",fTimeLowerLimit,
     723            << Form("%s%3.1f%s%2.0f%s%4i",": Mean ArrivalTime: ",mean," smaller than ",fTimeLowerLimit,
    724724                    " FADC slices from lower edge in pixel ",hist.GetPixId()) << endl;
    725725      bad.SetUncalibrated( MBadPixelsPix::kMeanTimeInFirstBin );
     
    729729    {
    730730      *fLog << warn << GetDescriptor()
    731             << Form("%s%3.1f%s%2i%s%4i",": Mean ArrivalTime: ",mean," greater than ",fTimeUpperLimit,
     731            << Form("%s%3.1f%s%2.0f%s%4i",": Mean ArrivalTime: ",mean," greater than ",fTimeUpperLimit,
    732732                    " FADC slices from upper edge in pixel ",hist.GetPixId()) << endl;
    733733      bad.SetUncalibrated( MBadPixelsPix::kMeanTimeInLast2Bins );
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeCam.h

    r3696 r3721  
    2323  Float_t fTimeLowerLimit;            // Limit dist. to first signal slice (in units of FADC slices)
    2424  Float_t fTimeUpperLimit;            // Limit dist. to last signal slice  (in units of FADC slices)
    25 
     25  Byte_t  fFirstHiGain;               // First used slice High Gain
     26  Byte_t  fLastHiGain;                // Last used slice High Gain
     27  Byte_t  fFirstLoGain;               // First used slice Low Gain
     28  Byte_t  fLastLoGain;                // Last used slice Low Gain
     29 
    2630  MRawEvtData         *fRawEvt;       //!  Raw event data
    27   MExtractedSignalCam *fSig;          //!  Signal Extractor
    2831
    2932  Bool_t SetupHists(const MParList *pList);
Note: See TracChangeset for help on using the changeset viewer.