Ignore:
Timestamp:
12/14/07 09:59:26 (17 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mpedestal
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mpedestal/MExtractPedestal.cc

    r8744 r8788  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MExtractPedestal.cc,v 1.36 2007-09-07 12:17:16 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MExtractPedestal.cc,v 1.37 2007-12-14 09:56:03 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    197197    : fGeom(NULL), fPedestalsInter(NULL),
    198198    fPedestalsOut(NULL), fExtractor(NULL), fSignal(0),
    199     fExtractWinFirst(0), fExtractWinSize(0), fUseSpecialPixels(kFALSE)
     199    fExtractWinFirst(0), fExtractWinSize(0), fUseSpecialPixels(kFALSE),
     200    fCounter(0)
    200201{
    201202    fName  = name  ? name  : "MExtractPedestal";
     
    468469  }
    469470
     471  fCounter = 0;
     472
    470473  return fExtractor ? fExtractor->CallPreProcess(pList) : kTRUE;
    471474}
     
    621624Int_t MExtractPedestal::PostProcess()
    622625{
     626    fPedestalsOut->SetNumEvents(fCounter);
     627
    623628    return fExtractor ? fExtractor->CallPostProcess() : kTRUE;
    624629}
  • trunk/MagicSoft/Mars/mpedestal/MExtractPedestal.h

    r8571 r8788  
    9090  MArrayI fNumEventsUsed;            // Number of events used for pedestal calc for each pixel
    9191
     92  UInt_t  fCounter;                  // Counter for events processed
     93
    9294  // MTask virtual functions
    9395  Int_t  PreProcess(MParList *pList);
  • trunk/MagicSoft/Mars/mpedestal/MPedCalcFromLoGain.cc

    r8490 r8788  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MPedCalcFromLoGain.cc,v 1.38 2007-05-11 10:25:45 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MPedCalcFromLoGain.cc,v 1.39 2007-12-14 09:56:03 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    238238    }
    239239
     240    fCounter++;
     241
    240242    if (fPedestalUpdate)
    241243        fPedestalsOut->SetReadyToSave();
  • trunk/MagicSoft/Mars/mpedestal/MPedCalcPedRun.cc

    r8490 r8788  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MPedCalcPedRun.cc,v 1.51 2007-05-11 10:25:45 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MPedCalcPedRun.cc,v 1.52 2007-12-14 09:56:03 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    265265        CalcPixel(pixel, 0, fUseSpecialPixels);
    266266
     267    fCounter++;
     268
    267269    fPedestalsOut->SetReadyToSave();
    268270
  • trunk/MagicSoft/Mars/mpedestal/MPedestalCam.cc

    r8497 r8788  
    3636//  - fTotalEntries
    3737//
     38// Class Version 3:
     39// ----------------
     40//  + fNumEvents
     41//
    3842/////////////////////////////////////////////////////////////////////////////
    3943#include "MPedestalCam.h"
     
    7882//
    7983MPedestalCam::MPedestalCam(const char *name, const char *title)
    80     : fNumSlices(0)
     84    : fNumSlices(0), fNumEvents(0)
    8185{
    8286  fName  = name  ? name  : "MPedestalCam";
     
    122126    (*this)[i].Copy(cam[i]);
    123127
     128  cam.fNumEvents = fNumEvents;
     129  cam.fNumSlices = fNumSlices;
     130
    124131  n = GetNumAverageArea();
    125132  cam.InitAverageAreas(n);
     
    293300}
    294301
    295 void MPedestalCam::Print(Option_t *o) const
    296 {
    297     *fLog << all << GetDescriptor() << ":" << endl;
    298     *fLog << "Pixels:" << endl;   
     302void MPedestalCam::Print(Option_t *option) const
     303{
     304    *fLog << all << GetDescriptor();
     305    *fLog << " - Events=" << fNumEvents << ", Slices=" << fNumSlices << ":" << endl;
    299306    *fLog << endl;
    300307
    301     PrintArr(*fArray);
    302 
    303308    *fLog << endl;
    304     *fLog << "Event-by-event averaged areas:" << endl;   
    305     *fLog << endl;
    306 
     309    *fLog << "Event-by-event averaged areas:" << endl;
    307310    PrintArr(*fAverageAreas);
    308311
    309312    *fLog << endl;
    310313    *fLog << "Event-by-event averaged sectors:" << endl;
    311     *fLog << endl;
    312 
    313314    PrintArr(*fAverageSectors);
    314 }
    315 
     315
     316    if (TString(option).Contains("all", TString::kIgnoreCase))
     317    {
     318        *fLog << "Pixels:" << endl;
     319        PrintArr(*fArray);
     320    }
     321}
     322
     323/*
    316324Float_t MPedestalCam::GetPedestalMin(const MGeomCam *geom) const
    317325{
     
    357365    return maxval;
    358366}
     367*/
    359368
    360369// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mpedestal/MPedestalCam.h

    r8490 r8788  
    2424
    2525  UInt_t fNumSlices;  // Total number of slices
     26  UInt_t fNumEvents;  // Number of events used for pedestal calculation
    2627
    2728  void PrintArr(const TCollection &list) const;
     
    3132  MPedestalCam(const char *name=NULL, const char *title=NULL);
    3233  ~MPedestalCam();
    33  
     34
     35  // TObject
    3436  void Clear(Option_t *o="");
    3537  void Copy(TObject &object) const;
    36  
     38  void Print(Option_t *o="") const; //*MENU*
     39
    3740  // Getters
    3841        MPedestalPix &GetAverageArea   ( UInt_t i );
     
    4245  const MPedestalPix &GetAverageSector ( UInt_t i )            const;
    4346  const Int_t         GetNumAverageSector()                    const;
    44   Float_t             GetPedestalMin   ( const MGeomCam *cam ) const;
    45   Float_t             GetPedestalMax   ( const MGeomCam *cam ) const;
     47  //Float_t             GetPedestalMin   ( const MGeomCam *cam ) const;
     48  //Float_t             GetPedestalMax   ( const MGeomCam *cam ) const;
    4649  Int_t               GetSize          ()                      const;
    4750  ULong_t             GetNumSlices() const { return fNumSlices; }
     51  UInt_t              GetNumEvents() const { return fNumEvents; }
    4852
    4953  TArrayF GetAveragedPedPerArea  ( const MGeomCam &geom, const UInt_t ai=0,  MBadPixelsCam *bad=NULL );
     
    5155  TArrayF GetAveragedRmsPerArea  ( const MGeomCam &geom, const UInt_t ai=0,  MBadPixelsCam *bad=NULL );
    5256  TArrayF GetAveragedRmsPerSector( const MGeomCam &geom, const UInt_t sec=0, MBadPixelsCam *bad=NULL );
    53  
     57
    5458        MPedestalPix &operator[]       ( Int_t i             );
    5559  const MPedestalPix &operator[]       ( Int_t i             ) const;
     
    6064  void  InitAverageSectors             ( const UInt_t i      );
    6165
    62   void Print(Option_t *o="") const;
    63  
    6466  // Setters
    6567  void SetNumSlices(const ULong_t n) { fNumSlices = n; }
    66  
     68  void SetNumEvents(const UInt_t n)  { fNumEvents = n; }
     69
     70  // MCamEvent
    6771  Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
    6872  void DrawPixelContent(Int_t idx) const;
    6973
    70   ClassDef(MPedestalCam, 2)     // Storage Container for all pedestal information of the camera
     74  ClassDef(MPedestalCam, 3)     // Storage Container for all pedestal information of the camera
    7175};
    7276
Note: See TracChangeset for help on using the changeset viewer.