Ignore:
Timestamp:
02/01/07 11:24:19 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mhvstime
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhvstime/MHSectorVsTime.cc

    r8022 r8281  
    11/* ======================================================================== *\
     2! $Name: not supported by cvs2svn $:$Id: MHSectorVsTime.cc,v 1.13 2007-02-01 11:24:19 tbretz Exp $
     3! --------------------------------------------------------------------------
    24!
    35! *
     
    1820!   Author(s): Thomas Bretz, 3/2004 <mailto:tbretz@astro.uni-wuerzburg.de>
    1921!
    20 !   Copyright: MAGIC Software Development, 2000-2004
     22!   Copyright: MAGIC Software Development, 2000-2006
    2123!
    2224!
     
    7072//  + Double_t fMaximum;      // User defined maximum
    7173//
     74// Class Version 3:
     75// ----------------
     76//  + Bool_t fUseMedian;     
     77//
    7278//
    7379/////////////////////////////////////////////////////////////////////////////
     
    101107//
    102108MHSectorVsTime::MHSectorVsTime(const char *name, const char *title)
    103     : fGraph(0), fEvt(NULL), fMinimum(-1111), fMaximum(-1111),
     109    : fGraph(0), fEvt(NULL), fMinimum(-1111), fMaximum(-1111), fUseMedian(kFALSE),
    104110    fType(0), fTypeErr(-1)
    105111{
     
    226232    fHCamera.SetCamContent(*evt, fType);
    227233
    228     const Double_t val0 = fHCamera.GetMeanSectors(fSectors, fAreaIndex);
     234    const Double_t val0 = fUseMedian ?
     235        fHCamera.GetMedianSectors(fSectors, fAreaIndex) :
     236        fHCamera.GetMeanSectors(fSectors, fAreaIndex);
    229237
    230238    if (!TMath::Finite(val0))
     
    235243    if (fTypeErr>=0)
    236244    {
    237         const Double_t rms0 = fHCamera.GetRmsSectors(fSectors, fAreaIndex);
     245        const Double_t rms0 = fUseMedian ?
     246            fHCamera.GetDevSectors(fSectors, fAreaIndex) :
     247
     248            fHCamera.GetRmsSectors(fSectors, fAreaIndex);
    238249        if (!TMath::Finite(rms0))
    239250            return kTRUE;
     251
    240252        ((TGraphErrors*)fGraph)->SetPointError(fGraph->GetN()-1, 0, rms0);
    241253    }
     
    334346    TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(fGraph);
    335347    pad->SetBorderMode(0);
     348    pad->SetGridx();
     349    pad->SetGridy();
    336350    AppendPad(opt);
    337351}
  • trunk/MagicSoft/Mars/mhvstime/MHSectorVsTime.h

    r7358 r8281  
     1/* ======================================================================== *\
     2!  $Name: not supported by cvs2svn $:$Id: MHSectorVsTime.h,v 1.7 2007-02-01 11:24:19 tbretz Exp $
     3\* ======================================================================== */
    14#ifndef MARS_MHSectorVsTime
    25#define MARS_MHSectorVsTime
     
    2528
    2629private:
    27     TGraph *fGraph;
     30    TGraph *fGraph;         // The TGraph output to the display
    2831
    29     MCamEvent *fEvt;        //! the current event
    30     MGeomCam  *fCam;        //! the camera geometry
     32    MCamEvent *fEvt;        //! pointer to the current event
     33    MGeomCam  *fCam;        //! pointer the camera geometry
    3134
    32     MRawEvtHeader *fHeader; //!
    33     MTime         *fTime;   //!
     35    MRawEvtHeader *fHeader; //! pointer to the event header (DAQ Evt number instead of counter)
     36    MTime         *fTime;   //! pointer to event time (time instead of number)
    3437
    35     MHCamera fHCamera;      //!
     38    MHCamera fHCamera;      //! The camera to be used for calculation
    3639
    3740    Double_t fMin;          //! Calculation of minimum
     
    4144    Double_t fMaximum;      // User defined maximum
    4245
    43     TString fNameEvt;
    44     TString fNameTime;
     46    Bool_t fUseMedian;      // Whether to display median/dev instead of mean/rms
    4547
    46     Int_t fType;
    47     Int_t fTypeErr;
     48    TString fNameEvt;       // Name of MCamEvent to be displayed
     49    TString fNameTime;      // Name of MTime container to be used
    4850
    49     TArrayI fSectors;
    50     TArrayI fAreaIndex;
     51    Int_t fType;            // Type for mean  used in GetPixelContent
     52    Int_t fTypeErr;         // Type for error used in GetPixelContent (-1 = no error)
     53
     54    TArrayI fSectors;       // Which sectors shell be displayed
     55    TArrayI fAreaIndex;     // Which pixel sized should be displayed
    5156
    5257    // MH
     
    6974    void SetMaximum(Double_t max=-1111) { fMaximum = max; }
    7075
     76    void SetUseMedian(Bool_t b=kTRUE) { fUseMedian=b; }
     77
    7178    // Getter
    7279    TH1 *GetHistByName(const TString name="") const;
     
    8087    void Paint(Option_t *o=NULL);
    8188
    82     ClassDef(MHSectorVsTime, 2) // Histogram to sum camera events
     89    ClassDef(MHSectorVsTime, 3) // Histogram to sum camera events
    8390};
    8491
Note: See TracChangeset for help on using the changeset viewer.