Changeset 6240


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

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r6238 r6240  
    2121                                                 -*-*- END OF LINE -*-*-
    2222
     23 2005/02/03 Thomas Bretz
     24
     25   * mfbase/MFilterList.[h,cc]:
     26     - added new function AddToList(TCollection&)
     27
     28   * mhbase/MFillH.cc:
     29     - print a warning if 'same'-option given without
     30       a corresponding existing tab
     31
     32   * mhflux/MHAlpha.[h,cc]:
     33     - made time bins settable by user
     34
     35
     36
    2337 2005/02/03 Markus Gaug
    2438
     
    2943     - intialize fTimeShiftHiGain and fTimeShiftLoGain by default.
    3044 
     45
    3146
    3247 2005/02/02 Markus Gaug
     
    6984
    7085
     86
    7187 2005/02/01 Raquel de los Reyes
    7288
    7389   * mjobs/MSequence.h
    7490     - Added "Get" functions for the TArrays variables.
     91
    7592
    7693
     
    90107     - return kTRUE in PostProcess if GetNumExecutions is 0
    91108
     109
     110
    92111 2005/02/01 Daniel Mazin
    93112
     
    97116       MDrive tree
    98117
     118
     119
    99120 2005/02/01 Thomas Bretz
    100121
     
    102123     - another fix to make the batch mode working (you can use the batch
    103124       mode to convert a root-file into another format)
     125
     126
    104127
    105128 2005/01/31 Thomas Bretz
  • trunk/MagicSoft/Mars/mfbase/MFilterList.cc

    r5911 r6240  
    237237}
    238238
     239// --------------------------------------------------------------------------
     240//
     241// If you want to add a new filters from a TCollection to the list call
     242// this function.
     243//
     244Bool_t MFilterList::AddToList(const TCollection &col)
     245{
     246    TIter Next(&col);
     247    MFilter *f=0;
     248    Int_t idx=0;
     249    while ((f=(MFilter*)Next()))
     250    {
     251        if (!f->InheritsFrom(MFilter::Class()))
     252        {
     253            *fLog << warn << "WARNING - An object in TCollection doesn't inherit from MFilter... ignored." << endl;
     254            continue;
     255        }
     256
     257        f->SetName(Form("F%d", idx++));
     258        if (!AddToList(f))
     259            return kFALSE;
     260    }
     261    return kTRUE;
     262}
    239263
    240264// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mfbase/MFilterList.h

    r5875 r6240  
    4444
    4545    Bool_t AddToList(MFilter *filter);
     46    Bool_t AddToList(const TCollection &col);
    4647    void SetOwner(Bool_t enable=kTRUE) { enable ? SetBit(kIsOwner) : ResetBit(kIsOwner); }
    4748
  • trunk/MagicSoft/Mars/mhbase/MFillH.cc

    r5994 r6240  
    379379    fCanvas = 0;
    380380    if (fDrawOption.Contains("same", TString::kIgnoreCase))
     381    {
    381382        fCanvas = fDisplay->GetCanvas(tabname);
     383        if (!fCanvas)
     384            *fLog << warn << "WARNING - 'same' option given, but no tab with name '" << tabname << "' found." << endl;
     385    }
     386
    382387    if (!fCanvas)
    383388        fCanvas = &fDisplay->AddTab(tabname);
  • 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.