Changeset 5013


Ignore:
Timestamp:
09/14/04 19:04:10 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r5011 r5013  
    3232
    3333 2004/09/14: Markus Gaug
     34
     35   * mbadpixels/MBadPixelsIntensityCam.[h,cc]
     36   * mcalib/MCalibrationIntensityCam.[h,cc]
     37     - replace TClonesArray by TObjArray
    3438
    3539   * mjobs/MJCalibration.cc
  • trunk/MagicSoft/Mars/mbadpixels/MBadPixelsIntensityCam.cc

    r4957 r5013  
    5454// Default constructor.
    5555//
    56 // Set the following pointer to NULL:
     56// Initializes and sets owner of:
    5757// - fCams
     58// - Initializes fCams to entry
    5859//
    5960MBadPixelsIntensityCam::MBadPixelsIntensityCam(const char *name, const char *title)
    60     : fCams(NULL)
    6161{
    6262
     
    6464  fTitle = title ? title : "Base container for the Intensity Calibration";
    6565 
    66 }
    67 
    68 // --------------------------------------------------------------------------
    69 //
    70 // Deletes the histograms if they exist
     66  fCams = new TObjArray;
     67  fCams->SetOwner();
     68
     69  InitSize(1);
     70}
     71
     72// --------------------------------------------------------------------------
     73//
     74// Deletes the cameras if they exist
    7175//
    7276MBadPixelsIntensityCam::~MBadPixelsIntensityCam()
     
    8488{
    8589
    86   fCams->ExpandCreate(GetSize()+1);
     90  const Int_t size = GetSize();
     91  fCams->Expand(size+1);
     92
     93  (*fCams)[size] = new MBadPixelsCam;
    8794
    8895  GetCam()->SetName(name);
     
    141148void MBadPixelsIntensityCam::InitSize(const UInt_t n)
    142149{
    143   fCams->ExpandCreate(n);
     150
     151  fCams->Expand(n);
     152
     153  for (Int_t i=0; i<fCams->GetSize(); i++)
     154    (*fCams)[i] = new MBadPixelsCam;
    144155}
    145156
     
    153164  if (GetSize() == 0)
    154165    InitSize(1);
     166
    155167  fCams->ForEach(MBadPixelsCam,Init)(geom);
    156168}
     
    164176Int_t MBadPixelsIntensityCam::GetSize() const
    165177{
    166   return fCams->GetEntriesFast();
     178  return fCams->GetEntries();
    167179}
    168180
  • trunk/MagicSoft/Mars/mbadpixels/MBadPixelsIntensityCam.h

    r4957 r5013  
    1212#endif
    1313
    14 class TClonesArray;
     14class TObjArray;
    1515class MGeomCam;
    1616class MBadPixelsIntensityCam : public MParContainer, public MCamEvent
     
    2222protected: 
    2323
    24   TClonesArray *fCams;        //-> Array of MBadPixelsCams, one per pulse colour and intensity
     24  TObjArray *fCams;        //-> Array of MBadPixelsCams, one per pulse colour and intensity
    2525
    2626public:
Note: See TracChangeset for help on using the changeset viewer.