Ignore:
Timestamp:
11/07/01 11:50:28 (23 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/manalysis
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/manalysis/MCT1ReadAscii.cc

    r1011 r1048  
    232232    // too the list with it's id, number of photons and error
    233233    //
     234    fNphot->InitSize(127);
     235
    234236    for (Int_t i = 0; i<127; i++ )
    235237    {
  • trunk/MagicSoft/Mars/manalysis/MCerPhotCalc.cc

    r1032 r1048  
    4545#include "MLogManip.h"
    4646
    47 #include "MRawEvtPixelIter.h"
     47#include "MRawEvtData.h"       // MRawEvtData::GetNumPixels
    4848#include "MCerPhotEvt.h"
    4949#include "MPedestalPix.h"
    5050#include "MPedestalCam.h"
     51#include "MRawEvtPixelIter.h"
    5152
    5253ClassImp(MCerPhotCalc);
     
    6566    AddToBranchList("fHiGainFadcSamples");
    6667    AddToBranchList("fLoGainFadcSamples");
    67 
    6868}
    6969
     
    108108Bool_t MCerPhotCalc::Process()
    109109{
     110    fCerPhotEvt->InitSize(fRawEvt->GetNumPixels());
     111
    110112    MRawEvtPixelIter pixel(fRawEvt);
    111 
    112113    while (pixel.Next())
    113114    {
    114 
    115115        const UInt_t pixid = pixel.GetPixelId();
    116116
  • trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.cc

    r1032 r1048  
    4747    fTitle = title ? title : "(Number of Photon)-Event Information";
    4848
    49     fPixels = new TClonesArray ("MCerPhotPix", 577);
    50 
    51     //
    52     // FIXME: is this really necessary?
    53     //
    54     Reset();
     49    fPixels = new TClonesArray ("MCerPhotPix", 0);
    5550}
    5651
     
    8277    // TClonesArray -> 'operator new with placement' should be used
    8378
    84     fPixels->ExpandCreate(fNumPixels);
     79    //    fPixels->ExpandCreate(fNumPixels);
    8580    new ((*fPixels)[fNumPixels++]) MCerPhotPix(id, nph, err);
    8681}
     
    9388{
    9489    fNumPixels = 0;
    95 //    fPixels->Delete();
     90    fPixels->Delete();
    9691}
    9792
  • trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.h

    r1032 r1048  
    2222
    2323    UInt_t GetNumPixels() const { return fNumPixels; }
     24    void   InitSize(UInt_t num) { fPixels->Expand(num); }
     25
    2426    void   AddPixel(Int_t id, Float_t nph, Float_t err);
    2527
     
    3133    Float_t GetNumPhotonsMax() const;
    3234
    33     MCerPhotPix &operator[](int i)       { return *(MCerPhotPix*)(fPixels->At(i)); }
    34     MCerPhotPix &operator[](int i) const { return *(MCerPhotPix*)(fPixels->At(i)); }
     35    MCerPhotPix &operator[](int i)       { return *(MCerPhotPix*)(fPixels->UncheckedAt(i)); }
     36    MCerPhotPix &operator[](int i) const { return *(MCerPhotPix*)(fPixels->UncheckedAt(i)); }
    3537
    3638    void Reset();
  • trunk/MagicSoft/Mars/manalysis/MPedestalCam.h

    r1014 r1048  
    2323    ~MPedestalCam();
    2424
    25     void InitSize(const UInt_t i) { fArray->ExpandCreateFast(i); }
     25    void InitSize(const UInt_t i) { fArray->ExpandCreate(i); }
    2626
    27     MPedestalPix &operator[](Int_t i)       { return *(MPedestalPix*)fArray->At(i); }
    28     MPedestalPix &operator[](Int_t i) const { return *(MPedestalPix*)fArray->At(i); }
     27    MPedestalPix &operator[](Int_t i)       { return *(MPedestalPix*)fArray->UncheckedAt(i); }
     28    MPedestalPix &operator[](Int_t i) const { return *(MPedestalPix*)fArray->UncheckedAt(i); }
    2929
    3030    ClassDef(MPedestalCam, 1)   // Storage Container for all pedestal information of the camera
Note: See TracChangeset for help on using the changeset viewer.