Changeset 5875 for trunk


Ignore:
Timestamp:
01/17/05 15:23:41 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r5873 r5875  
    4747     - added some comment about file version
    4848
     49   * mbase/MFilter.h:
     50     - implemented new virtual function GetDataMember like in MData
     51
     52   * mbase/MTask.[h,cc]:
     53     - when filter is added ass GetDataMember to branch list (should be
     54       obsolete, because filter is in the tasklist, but it should not hurt)
     55
     56   * mfbase/MF.[h,cc], mfbase/MFDataChain.[h,cc], mfbase/MFDataMember.[h,cc],
     57     mfbase/MFilterList.[h,cc]:
     58     - implemented new function GetDataMember
     59
    4960
    5061
     
    6475   * callisto.rc
    6576     - fixed default weights files for pedestal extraction for cosmcis
     77
     78
    6679
    6780 2005/01/16 Markus Gaug
  • trunk/MagicSoft/Mars/mbase/MFilter.h

    r4991 r5875  
    1919
    2020    virtual TString GetRule() const;
     21    virtual TString GetDataMember() const { return ""; }
    2122
    2223    Bool_t IsConditionTrue() const { return fInverted ? !IsExpressionTrue() : IsExpressionTrue(); }
  • trunk/MagicSoft/Mars/mbase/MTask.cc

    r5869 r5875  
    132132}
    133133
     134void MTask::SetFilter(MFilter *filter)
     135{
     136    fFilter=filter;
     137    if (filter)
     138        AddToBranchList(filter->GetDataMember());
     139}
     140
    134141// --------------------------------------------------------------------------
    135142//
  • trunk/MagicSoft/Mars/mbase/MTask.h

    r5713 r5875  
    7373
    7474    // Filter functions
    75     virtual void SetFilter(MFilter *filter) { fFilter=filter; }
     75    virtual void SetFilter(MFilter *filter);
    7676    const MFilter *GetFilter() const        { return fFilter; }
    7777    MFilter *GetFilter()                    { return fFilter; } // for MContinue only
  • trunk/MagicSoft/Mars/mfbase/MF.cc

    r5692 r5875  
    391391}
    392392
     393// --------------------------------------------------------------------------
     394//
     395// Return a comma seperated list of all data members used in the chain.
     396// This is mainly used in MTask::AddToBranchList
     397//
     398TString MF::GetDataMember() const
     399{
     400    *fLog << dbg << "MF::GetDataMember" << endl;
     401    return fF->GetDataMember();
     402}
     403
    393404void MF::StreamPrimitive(ofstream &out) const
    394405{
  • trunk/MagicSoft/Mars/mfbase/MF.h

    r5100 r5875  
    3838
    3939    TString GetRule() const { return fF ? fF->GetRule() : MFilter::GetRule(); }
     40    TString GetDataMember() const;
    4041
    4142    Bool_t IsExpressionTrue() const;
  • trunk/MagicSoft/Mars/mfbase/MFDataChain.cc

    r3573 r5875  
    142142}
    143143
     144// --------------------------------------------------------------------------
     145//
     146//  Crahses if default constructor called.
     147//
    144148void MFDataChain::StreamPrimitive(ofstream &out) const
    145149{
     
    157161}
    158162
     163// --------------------------------------------------------------------------
     164//
     165//  Crahses if default constructor called.
     166//
    159167TString MFDataChain::GetRule() const
    160168{
    161     TString ret;// = "{";
    162     ret += fData.GetRule();
    163     //ret += "}";
     169    TString ret(fData.GetRule());
    164170    ret += fFilterType==kELowerThan?"<":">";
    165171
     
    169175    return ret;
    170176}
     177
     178// --------------------------------------------------------------------------
     179//
     180//  Crahses if default constructor called.
     181//
     182TString MFDataChain::GetDataMember() const
     183{
     184    TString ret(fData.GetDataMember());
     185    ret += ",";
     186    ret += fCond->GetDataMember();
     187    return ret;
     188}
  • trunk/MagicSoft/Mars/mfbase/MFDataChain.h

    r3573 r5875  
    4444
    4545    void Print(Option_t *opt = "") const;
     46
    4647    TString GetRule() const;
     48    TString GetDataMember() const;
    4749
    4850    void SetVariables(const TArrayD &arr)
  • trunk/MagicSoft/Mars/mfbase/MFDataMember.cc

    r3573 r5875  
    167167    return ret+str.Strip(TString::kBoth);
    168168}
     169
     170TString MFDataMember::GetDataMember() const
     171{
     172    return fData.GetDataMember();
     173}
  • trunk/MagicSoft/Mars/mfbase/MFDataMember.h

    r3573 r5875  
    3737
    3838    void Print(Option_t *opt = "") const;
     39
    3940    TString GetRule() const;
     41    TString GetDataMember() const;
    4042
    4143    void SetVariables(const TArrayD &arr) { fData.SetVariables(arr); }
  • trunk/MagicSoft/Mars/mfbase/MFilterList.cc

    r3788 r5875  
    232232    *fLog << "Done." << endl;
    233233
     234    AddToBranchList(filter->GetDataMember());
     235
    234236    return kTRUE;
    235237}
     
    415417}
    416418
     419// --------------------------------------------------------------------------
     420//
     421// Return the data members existing in this array in a comma-seperated list
     422// (This is mainly used for MTask::AddToBranchList)
     423//
     424TString MFilterList::GetDataMember() const
     425{
     426    TString str;
     427
     428    TIter Next(&fFilters);
     429    MFilter *filter = NULL;
     430    while ((filter=(MFilter*)Next()))
     431    {
     432        if (filter->GetDataMember().IsNull())
     433            continue;
     434
     435        str += ",";
     436        str += filter->GetDataMember();
     437    }
     438    return str;
     439}
     440
     441
    417442void MFilterList::SetVariables(const TArrayD &arr)
    418443{
  • trunk/MagicSoft/Mars/mfbase/MFilterList.h

    r3788 r5875  
    4949
    5050    void Print(Option_t *opt = "") const;
     51
    5152    TString GetRule() const { return GetRule(""); }
    5253    TString GetRule(Option_t *opt) const;
     54    TString GetDataMember() const;
    5355
    5456    Int_t PreProcess(MParList *pList);
Note: See TracChangeset for help on using the changeset viewer.