Changeset 5852


Ignore:
Timestamp:
01/15/05 15:43:54 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mcalib
Files:
2 edited

Legend:

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

    r5821 r5852  
    271271//
    272272MCalibrationChargeCalc::MCalibrationChargeCalc(const char *name, const char *title)
    273     : fGeom(NULL), fSignal(NULL), fHeader(NULL)
     273    : fGeom(NULL), fSignal(NULL), fEvtHeader(NULL)
    274274{
    275275       
     
    349349//
    350350// The following container are searched for and execution aborted if not in MParList:
     351//  - MPedestalCam
    351352//  - MRawEvtHeader
    352 //  - MPedestalCam
    353353//  - MExtractedSignalCam
    354354//
     
    356356{
    357357 
    358   fHeader = (MRawEvtHeader*)pList->FindObject("MRawEvtHeader");
    359   if (!fHeader)
     358  /*
     359  if (IsInterlaced())
     360    {
     361      fTrigPattern = (MTriggerPattern*)pList->FindObject("MTriggerPattern");
     362      if (!fTrigPattern)
     363        {
     364          *fLog << err << "MTriggerPattern not found... abort." << endl;
     365          return kFALSE;
     366        }
     367    }
     368  */
     369
     370  fEvtHeader = (MRawEvtHeader*)pList->FindObject("MRawEvtHeader");
     371  if (!fEvtHeader)
    360372    {
    361373      *fLog << err << "MRawEvtHeader not found... abort." << endl;
     
    550562{
    551563
    552   const MCalibrationCam::PulserColor_t col = fHeader->GetPulserColor();
     564  /*
     565  if (IsInterlaced())
     566    {
     567      if (!(fTrigPattern->GetPrescaled() & MTriggerPattern::kCalibration))
     568        {
     569          if (IsDebug())
     570            {
     571            for (Int_t i=16; i>= 0; i--)
     572              *fLog << err << (fTrigPattern->GetPrescaled() >> i & 1);
     573            *fLog  << endl;
     574            }
     575          return kTRUE;
     576        }
     577      else
     578        {
     579          if (IsDebug())
     580            {
     581              for (Int_t i=16; i>= 0; i--)
     582                *fLog << inf << (fTrigPattern->GetPrescaled() >> i & 1);
     583              *fLog  << endl;
     584            }
     585        }
     586    }
     587  */
     588  const MCalibrationCam::PulserColor_t col = fEvtHeader->GetPulserColor();
    553589
    554590  if (col == fPulserColor)
     
    561597    return kTRUE;
    562598 
     599
    563600  //
    564601  // Now retrieve the colour and check if not various colours have been used
     
    594631    }
    595632
    596   *fLog << inf << " with strength: " << fHeader->GetPulserStrength() << endl;
     633  *fLog << inf << " with strength: " << fEvtHeader->GetPulserStrength() << endl;
    597634 
    598635  if (fPINDiode)
     
    711748  if (nvalid == 0)
    712749  {
    713       *fLog << err << GetDescriptor() << ": All pixels have non-valid calibration. "
    714             << "Did you forget to fill the histograms "
    715             << "(filling MHCalibrationChargeCam from MExtractedSignalCam using MFillH) ? " << endl;
    716       *fLog << err << GetDescriptor() << ": Or, maybe, you have used a pedestal run "
    717             << "instead of a calibration run " << endl;
    718       return kFALSE;
     750    if (!fIntensCam)
     751      {
     752        *fLog << warn << GetDescriptor() << ": All pixels have non-valid calibration. "
     753              << "Did you forget to fill the histograms "
     754              << "(filling MHCalibrationChargeCam from MExtractedSignalCam using MFillH) ? " << endl;
     755        *fLog << warn << GetDescriptor() << ": Or, maybe, you have used a pedestal run "
     756              << "instead of a calibration run " << endl;
     757        return kFALSE;
     758      }
    719759  }
    720760
     
    22102250  return rc;
    22112251}
     2252
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.h

    r5679 r5852  
    5959 
    6060  static const TString fgNamePedestalCam;      //! "MPedestalCam"
    61 
     61 
    6262  // Variables
    6363  Float_t fChargeLimit;                        // Limit acceptance mean charge  (in units of PedRMS)
     
    102102  MGeomCam                       *fGeom;           //!  Camera geometry
    103103  MExtractedSignalCam            *fSignal;         //! Extracted Signal
    104   MRawEvtHeader                  *fHeader;         //! Event header
     104  MRawEvtHeader                  *fEvtHeader;      //! Evt header
    105105  MPedestalCam                   *fPedestals;      //! Pedestals all pixels (calculated previously from ped.file)
    106106
     
    117117  Byte_t fCheckFlags;                          // Bit-field to hold the possible check flags
    118118 
    119   enum  { kDebug, kPheFitOK, kFFactorFitOK, kBlindPixelFitOK, kBlindPixelPedFitOK, kPINDiodeFitOK };
     119  enum  { kDebug,
     120          kPheFitOK, kFFactorFitOK, kBlindPixelFitOK, kBlindPixelPedFitOK, kPINDiodeFitOK };
    120121
    121122  // functions
     
    139140  Bool_t IsCheckExtractionWindow () const { return TESTBIT(fCheckFlags,kCheckExtractionWindow);  }
    140141  Bool_t IsCheckHistOverflow     () const { return TESTBIT(fCheckFlags,kCheckHistOverflow);      }
    141   Bool_t IsCheckOscillations     () const { return TESTBIT(fCheckFlags,kCheckOscillations);      } 
    142  
     142  Bool_t IsCheckOscillations     () const { return TESTBIT(fCheckFlags,kCheckOscillations);      }
     143
    143144  void   PrintUncalibrated( MBadPixelsPix::UncalibratedType_t typ, const char *text) const;
    144145
Note: See TracChangeset for help on using the changeset viewer.