Ignore:
Timestamp:
09/15/04 20:14:15 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r5019 r5043  
    8282#include "MCalibrationChargeCam.h"
    8383
    84 #include <TObjArray.h>
     84#include <TOrdCollection.h>
    8585
    8686#include "MLog.h"
     
    118118}
    119119
     120// --------------------------------------------------------------------------
     121//
     122// Creates new MCalibrationCam only for the averaged areas:
     123// the rest has to be retrieved directly, e.g. via:
     124//
     125TObject *MCalibrationChargeCam::Clone(const char *) const
     126{
     127
     128  //
     129  // FIXME, this might be done faster and more elegant, by direct copy.
     130  //
     131  MCalibrationChargeCam *cam = new MCalibrationChargeCam(fName,fTitle);
     132
     133  cam->fNumUnsuitable        = fNumUnsuitable;
     134  cam->fNumUnreliable        = fNumUnreliable;
     135  cam->fNumHiGainFADCSlices  = fNumHiGainFADCSlices;
     136  cam->fNumLoGainFADCSlices  = fNumLoGainFADCSlices;
     137  cam->fPulserColor          = fPulserColor;
     138
     139  cam->fFlags                = fFlags;
     140
     141  cam->fNumPhotonsBlindPixelMethod      = fNumPhotonsBlindPixelMethod;
     142  cam->fNumPhotonsFFactorMethod         = fNumPhotonsFFactorMethod;
     143  cam->fNumPhotonsPINDiodeMethod        = fNumPhotonsPINDiodeMethod;
     144  cam->fNumPhotonsBlindPixelMethodErr   = fNumPhotonsBlindPixelMethodErr;
     145  cam->fNumPhotonsFFactorMethodErr      = fNumPhotonsFFactorMethodErr;
     146  cam->fNumPhotonsPINDiodeMethodErr     = fNumPhotonsPINDiodeMethodErr;
     147
     148  for (Int_t i=0; i<GetSize(); i++)
     149    cam->fPixels->AddAt((*this)[i].Clone(),i);
     150 
     151  for (Int_t i=0; i<GetAverageAreas(); i++)
     152    {
     153      cam->fAverageAreas->AddAt(GetAverageArea(i).Clone(),i);
     154      cam->fAverageBadAreas->AddAt(GetAverageBadArea(i).Clone(),i);
     155    }
     156  for (Int_t i=0; i<GetAverageSectors(); i++)
     157    {
     158      cam->fAverageSectors->AddAt(GetAverageSector(i).Clone(),i);
     159      cam->fAverageBadSectors->AddAt(GetAverageBadSector(i).Clone(),i);
     160    }
     161
     162  return cam;
     163}
     164
    120165
    121166void MCalibrationChargeCam::Add(const UInt_t a, const UInt_t b)
    122167{
    123168  for (UInt_t i=a; i<b; i++)
    124     (*fPixels)[i] = new MCalibrationChargePix;
     169    fPixels->AddAt(new MCalibrationChargePix,i);
    125170}
    126171
     
    129174{
    130175  for (UInt_t i=a; i<b; i++)
    131     (*fAverageAreas)[i] = new MCalibrationChargePix;
     176    fAverageAreas->AddAt(new MCalibrationChargePix,i);
    132177}
    133178
     
    135180{
    136181  for (UInt_t i=a; i<b; i++)
    137     (*fAverageSectors)[i] = new MCalibrationChargePix;
     182    fAverageSectors->AddAt(new MCalibrationChargePix,i);
    138183}
    139184
Note: See TracChangeset for help on using the changeset viewer.