Changeset 4315


Ignore:
Timestamp:
06/21/04 20:03:41 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mcalib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationCam.h

    r4278 r4315  
    117117
    118118  // Clone
    119   TObject *Clone(const char *) const;
     119  virtual TObject *Clone(const char *) const;
    120120
    121121  // Draw
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeCam.cc

    r4304 r4315  
    314314        hist.GetHGausHist()->SetTitle("Summed FADC slices average HiGain Area Idx ");
    315315        hist.SetNbins(fAverageNbins);
     316        hist.SetLast(2.*hist.GetLast());
    316317        hist.GetHAbsTime()->SetTitle("Absolute Arrival Time average HiGain Area Idx ");
    317318
     
    357358          hist.GetHGausHist()->SetTitle("Summed FADC slices average HiGain Sector ");
    358359          hist.SetNbins(fAverageNbins);
     360          hist.SetLast (2.*hist.GetLast());
    359361          hist.GetHAbsTime()->SetTitle("Absolute Arrival Time average HiGain Sector ");
    360362
     
    830832  for (Int_t i=0; i<nareas;i++)
    831833    {
    832 
    833834      pad->cd(2*(i+1)-1);
    834835      GetAverageHiGainArea(i).Draw("datacheck");
     
    837838    }     
    838839}
     840
     841
     842// --------------------------------------------------------------------------
     843//
     844// Our own clone function is necessary since root 3.01/06 or Mars 0.4
     845// I don't know the reason.
     846//
     847// Creates new MHCalibrationCam
     848//
     849TObject *MHCalibrationChargeCam::Clone(const char *) const
     850{
     851
     852  const Int_t navhi = fAverageHiGainAreas->GetEntries();
     853  const Int_t navlo = fAverageLoGainAreas->GetEntries();
     854  const Int_t nsehi = fAverageHiGainSectors->GetEntries();
     855  const Int_t nselo = fAverageLoGainSectors->GetEntries();
     856 
     857  //
     858  // FIXME, this might be done faster and more elegant, by direct copy.
     859  //
     860  MHCalibrationChargeCam *cam = new MHCalibrationChargeCam();
     861
     862  cam->fAverageHiGainAreas->Expand(navhi);
     863  cam->fAverageLoGainAreas->Expand(navlo);
     864  cam->fAverageHiGainSectors->Expand(nsehi);
     865  cam->fAverageLoGainSectors->Expand(nselo);
     866
     867  cam->fAverageHiGainAreas->Expand(navhi);
     868  cam->fAverageLoGainAreas->Expand(navlo);
     869  cam->fAverageHiGainSectors->Expand(nsehi);
     870  cam->fAverageLoGainSectors->Expand(nselo);
     871
     872  for (int i=0; i<navhi; i++)
     873    {
     874      //      delete (*cam->fAverageHiGainAreas)[i];
     875      (*cam->fAverageHiGainAreas)[i] = (*fAverageHiGainAreas)[i]->Clone();
     876    }
     877  for (int i=0; i<navlo; i++)
     878    {
     879      //      delete (*cam->fAverageLoGainAreas)[i];
     880      (*cam->fAverageLoGainAreas)[i] = (*fAverageLoGainAreas)[i]->Clone();
     881    }
     882  for (int i=0; i<nsehi; i++)
     883    {
     884      //      delete (*cam->fAverageHiGainSectors)[i];
     885      (*cam->fAverageHiGainSectors)[i] = (*fAverageHiGainSectors)[i]->Clone();
     886    }
     887  for (int i=0; i<nselo; i++)
     888    {
     889      //      delete (*cam->fAverageLoGainSectors)[i];
     890      (*cam->fAverageLoGainSectors)[i] = (*fAverageLoGainSectors)[i]->Clone();
     891    }
     892
     893  cam->fAverageAreaNum         = fAverageAreaNum;
     894  cam->fAverageAreaSat         = fAverageAreaSat;
     895  cam->fAverageAreaSigma       = fAverageAreaSigma;     
     896  cam->fAverageAreaSigmaVar    = fAverageAreaSigmaVar;   
     897  cam->fAverageAreaRelSigma    = fAverageAreaRelSigma;
     898  cam->fAverageAreaRelSigmaVar = fAverageAreaRelSigmaVar;   
     899  cam->fAverageSectorNum       = fAverageSectorNum;     
     900  cam->fRunNumbers             = fRunNumbers;
     901
     902  cam->fPulserFrequency        = fPulserFrequency;
     903  cam->fAverageNbins           = fAverageNbins;
     904
     905  return cam;
     906
     907}
     908
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeCam.h

    r4304 r4315  
    4343  ~MHCalibrationChargeCam() {}
    4444 
     45  TObject *Clone(const char *) const;
     46
    4547  void SetTimeLowerLimit    ( const Float_t f=fgTimeLowerLimit         ) { fTimeLowerLimit    = f;   }
    4648  void SetTimeUpperLimit    ( const Float_t f=fgTimeUpperLimit         ) { fTimeUpperLimit    = f;   }
Note: See TracChangeset for help on using the changeset viewer.