Ignore:
Timestamp:
02/03/05 14:23:41 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mhflux
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhflux/MHAlpha.cc

    r5973 r6240  
    3636// PRELIMINARY!
    3737//
     38//
     39// ToDo:
     40// =====
     41//
     42//   - Replace time-binning by histogram (which is enhanced bin-wise)
     43//
     44//
    3845//////////////////////////////////////////////////////////////////////////////
    3946#include "MHAlpha.h"
     
    7885    fPointPos(0), fTimeEffOn(0), fTime(0),
    7986    fSkipHistTime(kFALSE), fSkipHistTheta(kFALSE), fSkipHistEnergy(kFALSE),
    80     //fEnergyMin(-1), fEnergyMax(-1), fSizeMin(-1), fSizeMax(-1),
    81     fMatrix(0)
     87    fNumTimeBins(10), fMatrix(0)
    8288{
    8389    //
     
    299305
    300306    fLastTime = MTime();
     307    fNumRebin = fNumTimeBins;
    301308
    302309    MBinning binst, binse, binsa;
     
    353360        return;
    354361
    355     const Int_t steps = 10;
    356 
    357     static int rebin = steps;
    358 
    359362    if (!final)
    360363    {
     
    368371        {
    369372            fLastTime=*fTimeEffOn;
    370             rebin--;
    371         }
    372 
    373         if (rebin>0)
     373            fNumRebin--;
     374        }
     375
     376        if (fNumRebin>0)
    374377            return;
    375378    }
     
    384387        *fLog << "This should not happen. Maybe you started you eventloop with" << endl;
    385388        *fLog << "an already initialized time stamp MTimeEffectiveOnTime?" << endl;
    386         rebin++;
     389        fNumRebin++;
    387390        return;
    388391    }
     
    426429    *fLog << all << *fTimeEffOn << ": " << fit.GetEventsExcess() << endl;
    427430
    428     rebin = steps;
     431    fNumRebin = fNumTimeBins;
    429432}
    430433
     
    902905    fMatrix = NULL;
    903906}
     907
     908Int_t MHAlpha::ReadEnv(const TEnv &env, TString prefix, Bool_t print)
     909{
     910    Bool_t rc = kFALSE;
     911    if (IsEnvDefined(env, prefix, "NumTimeBins", print))
     912    {
     913        SetNumTimeBins(GetEnvValue(env, prefix, "NumTimeBins", fNumTimeBins));
     914        rc = kTRUE;
     915    }
     916    return rc;
     917}
  • trunk/MagicSoft/Mars/mhflux/MHAlpha.h

    r5692 r6240  
    104104    MTime    fLastTime;         //! Last fTimeEffOn
    105105
    106     //Float_t fEnergyMin;
    107     //Float_t fEnergyMax;
    108     //Float_t fSizeMin;
    109     //Float_t fSizeMax;
    110 
    111106    Bool_t fSkipHistTime;
    112107    Bool_t fSkipHistTheta;
    113108    Bool_t fSkipHistEnergy;
     109
     110    UShort_t fNumTimeBins;      // Number of time bins to fill together
     111    UShort_t fNumRebin;         //!
    114112
    115113    //const TString fNameProjAlpha;  //! This should make sure, that gROOT doen't confuse the projection with something else
     
    144142        fOffData = &h.fHAlpha;
    145143    }
     144    void SetNumTimeBins(UShort_t n) { fNumTimeBins = n; }
    146145/*
    147146    void SetSizeCuts(Float_t min, Float_t max)   { fSizeMin=min; fSizeMax=max; }
     
    162161    void SkipHistEnergy(Bool_t b=kTRUE) { fSkipHistEnergy=b; }
    163162
    164     void Paint(Option_t *opt="");
    165     void Draw(Option_t *option="");
    166 
    167163    void DrawAll(); //*MENU*
    168164
     
    170166    void StopMapping();
    171167
     168    // TObject
     169    void Paint(Option_t *opt="");
     170    void Draw(Option_t *option="");
     171
     172    // MParContainer
     173    Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print=kFALSE);
     174
    172175    ClassDef(MHAlpha, 1) // Alpha-Plot which is fitted online
    173176};
Note: See TracChangeset for help on using the changeset viewer.