Ignore:
Timestamp:
05/10/05 12:13:12 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r6963 r7005  
    2222!
    2323\* ======================================================================== */
     24
    2425//////////////////////////////////////////////////////////////////////////////
    2526//
     
    8182    : fCalibPattern(NULL), fGeom(NULL), fParList(NULL),
    8283      fIntensCharge(NULL), fIntensRelTime(NULL), fIntensBad(NULL),
    83       fBad(NULL), fChargeCalc(NULL), fRelTimeCalc(NULL)
     84      fBad(NULL), fChargeCalc(NULL), fRelTimeCalc(NULL), fHistCopy(kFALSE)
    8485{
    8586
     
    285286}
    286287
     288// --------------------------------------------------------------------------
     289//
     290// Reads the pattern from MCalibrationPattern and initializes new containers in the
     291// Intensity Cams, if the pattern has changed. Executes Finalize of the
     292// MCalibration*Calc classes in that case.
     293//
     294Int_t MCalibColorSteer::PostProcess()
     295{
     296    //
     297    // Finalize Possible calibration histogram classes...
     298    //
     299    *fLog << inf << "Finalize calibration histograms..." << flush;
     300    if (Finalize("MHCalibrationChargeCam"))      *fLog << inf << "MHCalibrationChargeCam..." << flush;
     301    if (Finalize("MHCalibrationChargeBlindCam")) *fLog << inf << "MHCalibrationChargeBlindCam..." << flush;
     302    if (Finalize("MHCalibrationRelTimeCam"))     *fLog << inf << "MHCalibrationRelTimeCam..." << flush;
     303    if (Finalize("MHCalibrationTestCam"))        *fLog << inf << "MHCalibrationChargeCam..." << flush;
     304    if (Finalize("MHCalibrationTestTimeCam"))    *fLog << inf << "MHCalibrationChargeCam..." << flush;
     305    *fLog << inf << "done." << endl;
     306
     307    return kTRUE;
     308}
    287309
    288310// --------------------------------------------------------------------------
     
    300322
    301323  hist->Finalize();
     324  CopyHist(name);
    302325  hist->ResetHists();
    303326  hist->SetColor( fCalibPattern->GetPulserColor());
     
    331354      MCalibrationChargeCam *cam    = (MCalibrationChargeCam*)fIntensCharge->GetCam();
    332355      cam->SetPulserColor(fCalibPattern->GetPulserColor());
    333       if (!cam->CopyHiLoConversionFactors(*oldcam))
    334         return kFALSE;
     356      if (!cam->MergeHiLoConversionFactors(*oldcam))
     357          return kFALSE;
    335358      *fLog << inf << "New MCalibrationChargeCam with name: " << cam->GetName() << endl;
    336359    }
     
    388411  return result;
    389412}
     413
     414// --------------------------------------------------------------------------
     415//
     416// Copies the histogram classes into the intensity cams
     417//
     418void MCalibColorSteer::CopyHist(const char* name)
     419{
     420  MHCalibrationCam *hcam = (MHCalibrationCam*)fParList->FindObject(name);
     421  TString n(name);
     422  if (n.Contains("ChargeCam"))
     423    {
     424      if (fIntensCharge)
     425          fIntensCharge->AddHist((MHCalibrationCam*)hcam->Clone());
     426    }
     427  if (n.Contains("Blind"))
     428    if (fIntensBlind)
     429          fIntensBlind->AddHist((MHCalibrationCam*)hcam->Clone());
     430
     431  if (n.Contains("RelTime"))
     432    if (fIntensRelTime)
     433          fIntensRelTime->AddHist((MHCalibrationCam*)hcam->Clone());
     434}
     435
     436// --------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.