Ignore:
Timestamp:
02/16/04 15:37:25 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/manalysis
Files:
3 edited

Legend:

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

    r3039 r3199  
    108108//
    109109MPedCalcPedRun::MPedCalcPedRun(const char *name, const char *title)
    110     : fRawEvt(NULL), fPedestals(NULL), fSignals(NULL)
     110    : fRawEvt(NULL), fPedestals(NULL)
    111111{
    112112    fName  = name  ? name  : "MPedCalcPedRun";
     
    121121void MPedCalcPedRun::Clear(const Option_t *o)
    122122{
    123 
    124   fNumHiGainSamples = 0;
    125   fNumPixels        = 0;
    126   fNumSamplesTot    = 0;
    127  
    128   fRawEvt    = NULL;
    129   fPedestals = NULL;
    130   fSignals   = NULL;
    131 
    132   return;
    133  
     123    fNumHiGainSamples = 0;
     124    fNumSamplesTot    = 0;
     125
     126    fRawEvt    = NULL;
     127    fPedestals = NULL;
    134128}
    135129
     
    148142Int_t MPedCalcPedRun::PreProcess( MParList *pList )
    149143{
     144    Clear();
     145
    150146    fRawEvt = (MRawEvtData*)pList->FindObject("MRawEvtData");
    151147    if (!fRawEvt)
     
    159155        return kFALSE;
    160156
    161     fSignals = (MExtractedSignalCam*)pList->FindObject("MExtractedSignalCam");
    162 
    163     fNumSamplesTot=0;
    164 
    165157    return kTRUE;
    166158}
     
    186178            return kTRUE;
    187179
    188     fNumPixels = fPedestals->GetSize();
    189 
    190     if(fSumx.GetSize()==0)
    191       {
    192         fSumx.Set(fNumPixels);
    193         fSumx2.Set(fNumPixels);
     180    Int_t n = fPedestals->GetSize();
     181
     182    if (fSumx.GetSize()==0)
     183    {
     184        fSumx.Set(n);
     185        fSumx2.Set(n);
    194186
    195187        fSumx.Reset();
    196188        fSumx2.Reset();
    197       }
     189    }
    198190
    199191    // Calculate an even number for the hi gain samples to avoid
  • trunk/MagicSoft/Mars/manalysis/MPedCalcPedRun.h

    r3190 r3199  
    11#ifndef MARS_MPedCalcPedRun
    22#define MARS_MPedCalcPedRun
    3 
    4 /////////////////////////////////////////////////////////////////////////////
    5 //                                                                         //
    6 // MPedCalcPedRun                                                          //
    7 //                                                                         //
    8 // Evaluate the pedestals from pedestal runs                               //
    9 //                                                                         //
    10 /////////////////////////////////////////////////////////////////////////////
    113
    124#ifndef MARS_MTask
     
    146#endif
    157
     8#ifndef ROOT_TArrayF
    169#include <TArrayF.h>
     10#endif
    1711
    1812class MRawEvtData;
    1913class MPedestalCam;
    20 class MExtractedSignalCam;
    2114
    2215class MPedCalcPedRun : public MTask
    2316{
    24     Byte_t   fNumHiGainSamples;
    25     UShort_t fNumPixels;
    26     UInt_t   fNumSamplesTot;
     17    Byte_t fNumHiGainSamples;
     18    UInt_t fNumSamplesTot;
    2719
    28     MRawEvtData         *fRawEvt;     // raw event data (time slices)
    29     MPedestalCam        *fPedestals;  // Pedestals of all pixels in the camera
    30     MExtractedSignalCam *fSignals;    // Signals of all pixels in the camera   
     20    MRawEvtData  *fRawEvt;     // raw event data (time slices)
     21    MPedestalCam *fPedestals;  // Pedestals of all pixels in the camera
    3122
    3223    TArrayF fSumx;   // sum of values
  • trunk/MagicSoft/Mars/manalysis/MPedestalCam.h

    r3190 r3199  
    1313class MGeomCam;
    1414class MPedestalPix;
     15
    1516class MPedestalCam : public MCamEvent, public MParContainer
    1617{
    1718private:
     19    TClonesArray *fArray;  //-> FIXME: Change TClonesArray away from a pointer?
     20    UInt_t fTotalEntries;  // Total number of times, the Process was executed (to estimate the error of pedestal)
    1821
    19   TClonesArray *fArray;  // FIXME: Change TClonesArray away from a pointer?
    20   UInt_t fTotalEntries;  // Total number of times, the Process was executed (to estimate the error of pedestal)
    21  
    2222public:
    23   MPedestalCam(const char *name=NULL, const char *title=NULL);
    24   ~MPedestalCam();
    25  
    26   void Clear(Option_t *o="");
    27  
    28   void InitSize(const UInt_t i);
    29  
    30   MPedestalPix &operator[](Int_t i);
    31   const MPedestalPix &operator[](Int_t i) const;
     23    MPedestalCam(const char *name=NULL, const char *title=NULL);
     24    ~MPedestalCam();
    3225
    33   // Setters
    34   void SetTotalEntries(const UInt_t n)    { fTotalEntries = n; }
     26    void Clear(Option_t *o="");
    3527
    36   // Getters
    37   UInt_t GetSize()                          const;
    38   UInt_t GetTotalEntries()                  const { return fTotalEntries; }
     28    void InitSize(const UInt_t i);
    3929
    40   Float_t GetPedestalMin(const MGeomCam *cam) const;
    41   Float_t GetPedestalMax(const MGeomCam *cam) const;
    42  
    43   void Print(Option_t *o="") const;
    44  
    45   Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
    46   void DrawPixelContent(Int_t idx) const;
    47  
    48   ClassDef(MPedestalCam, 1)     // Storage Container for all pedestal information of the camera
     30    MPedestalPix &operator[](Int_t i);
     31    const MPedestalPix &operator[](Int_t i) const;
     32
     33    // Setters
     34    void SetTotalEntries(const ULong_t n) { fTotalEntries = n; }
     35
     36    // Getters
     37    Int_t   GetSize()         const;
     38    ULong_t GetTotalEntries() const { return fTotalEntries; }
     39
     40    Float_t GetPedestalMin(const MGeomCam *cam) const;
     41    Float_t GetPedestalMax(const MGeomCam *cam) const;
     42
     43    void Print(Option_t *o="") const;
     44
     45    Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
     46    void DrawPixelContent(Int_t idx) const;
     47
     48    ClassDef(MPedestalCam, 1)   // Storage Container for all pedestal information of the camera
    4949};
    5050
    5151#endif
    52 
Note: See TracChangeset for help on using the changeset viewer.