Ignore:
Timestamp:
09/12/04 22:56:39 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhcalib/MHCalibrationChargeBlindPix.cc

    r4943 r4963  
    7575#include <TPaveText.h>
    7676#include <TPaveStats.h>
     77#include <TGraph.h>
    7778
    7879#include <TVector.h>
     
    264265}
    265266
    266 // --------------------------------------------------------------------------
    267 //
    268 // Empty function to overload MHCalibrationChargePix::Reset()
    269 //
    270 void MHCalibrationChargeBlindPix::Reset()
    271 {
    272 }
    273 
    274 
    275 // --------------------------------------------------------------------------
    276 //
    277 // Use the MHGausEvents::Clone function and clone additionally the rest of the
    278 // data members.
    279 //
     267#if 0
     268// --------------------------------------------------------------------------
     269//
     270// ATTENTION: This nasty Clone function is necessary since the ROOT cloning
     271//            lead to crashes on SOME machines (unfortunately not mine...).
     272//            This function is a workaround in order to achieve the correct
     273//            DrawClone() behaviour.
     274//
    280275TObject *MHCalibrationChargeBlindPix::Clone(const char *name) const
    281276{
    282277
    283   MHCalibrationChargeBlindPix &pix = (MHCalibrationChargeBlindPix&)*MHCalibrationPix::Clone(name);
     278  MHCalibrationChargeBlindPix &pix =
     279    *new MHCalibrationChargeBlindPix(name ? name : fName.Data(),fTitle.Data());
     280
    284281  //
    285   // Copy data members
     282  // Copy MHGausEvents data members
     283  //
     284  pix.fBinsAfterStripping   = fBinsAfterStripping;
     285  pix.fCurrentSize          = fCurrentSize;
     286  pix.fFlags                = fFlags;
     287  pix.fPowerProbabilityBins = fPowerProbabilityBins;
     288
     289  if (fHPowerProbability)
     290    pix.fHPowerProbability=(TH1I*)fHPowerProbability->Clone();
     291 
     292  if (fPowerSpectrum)
     293    pix.fPowerSpectrum = new TArrayF(*fPowerSpectrum);
     294
     295  pix.fEvents = fEvents;
     296
     297  if (fFGausFit)
     298    pix.fFGausFit=(TF1*)fFGausFit->Clone();
     299  if (fFExpFit)
     300    pix.fFExpFit=(TF1*)fFExpFit->Clone();
     301
     302  pix.fFirst = fFirst;
     303
     304  if (fGraphEvents)
     305    pix.fGraphEvents=(TGraph*)fGraphEvents->Clone();
     306  if (fGraphPowerSpectrum)
     307    pix.fGraphPowerSpectrum=(TGraph*)fGraphPowerSpectrum->Clone();
     308
     309  pix.fHGausHist = fHGausHist;
     310
     311  pix.fLast      = fLast;
     312  pix.fMean      = fMean;
     313  pix.fMeanErr   = fMeanErr;
     314  pix.fNbins     = fNbins;
     315  pix.fNDFLimit  = fNDFLimit;
     316  pix.fSigma     = fSigma;
     317  pix.fSigmaErr  = fSigmaErr;
     318  pix.fProb      = fProb;
     319  pix.fProbLimit = fProbLimit;
     320
     321  //
     322  // Copy MHCalibrationPix data members
     323  //
     324  pix.fEventFrequency       = fEventFrequency;
     325  pix.fBlackoutLimit        = fBlackoutLimit;
     326  pix.fSaturated            = fSaturated;     
     327  pix.fPickupLimit          = fPickupLimit;   
     328  pix.fPixId                = fPixId;       
     329
     330  //
     331  // Copy MHCalibrationChargeBlindPix data members
    286332  //
    287333  pix.fSinglePheCut         =  fSinglePheCut;
    288334  pix.fNumSinglePheLimit    =  fNumSinglePheLimit;   
    289335
    290   pix.fASinglePheFADCSlices =  fASinglePheFADCSlices;
    291   pix.fAPedestalFADCSlices  =  fAPedestalFADCSlices
     336  fASinglePheFADCSlices.Copy(pix.fASinglePheFADCSlices);
     337  fAPedestalFADCSlices.Copy( pix.fAPedestalFADCSlices)
    292338 
    293   pix.fSinglePheFit = (TF1*)fSinglePheFit->Clone();
     339  pix.fSinglePheFit   = (TF1*)fSinglePheFit->Clone();
    294340
    295341  pix.fNumSinglePhes  = fNumSinglePhes; 
     
    314360  pix.fMeanPedestalErr  = fMeanPedestalErr; 
    315361  pix.fSigmaPedestalErr = fSigmaPedestalErr;
    316   pix.fFlags            = fFlags;           
    317362
    318363  return &pix;
    319364}
     365#endif
    320366
    321367/*
Note: See TracChangeset for help on using the changeset viewer.