Changeset 1493


Ignore:
Timestamp:
08/09/02 09:13:10 (22 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r1489 r1493  
    11                                                                  -*-*- END -*-*-
     2
     3 2002/08/09: Thomas Bretz
     4
     5   * mbase/MIter.[h,cc]:
     6     - added
     7
     8   * mbase/BaseLinkDef.h, mbase/Makefile:
     9     - added MIter
     10
     11   * mdata/MDataChain.cc:
     12     - added sanity check in StreamPrimitive
     13
     14   * mfilter/MF.[h,cc]:
     15     - fixed StreamPrimitive
     16     - don'w stream standard name and title.
     17     - added default constructor
     18
     19   * mfilter/MFDataMeber.cc:
     20     - strip spces from value before returning GetRule
     21
     22   * mfilter/MFilterList.[h,cc]:
     23     - fixed StreamPrimitive
     24     - don'w stream standard name and title.
     25
     26
    227
    328 2002/08/08: Thomas Bretz
     
    4267     - changed layout of plots
    4368     - changed name and title of MakeDefCanvas
     69     - made independant of MHillas
     70     - exchanged the usage of the Fill-argument (MHillasExt) and the
     71       stored pointer (MHillasSrc)
     72     - changed the default binning of asym to be symmetric
    4473
    4574   * mbase/MTask.cc:
     
    5180   * macros/dohtml.C:
    5281     - added starplot.C
     82
     83   * macros/MagicHillas.C, macros/CT1Hillas.C:
     84     - changed to use new stylish Hillas Histograms
     85
     86   * macros/star.C:
     87     - changed to interpolate pixels around hot spots
     88     - write Sourcs and AntoSource to RunHeaders
    5389
    5490
  • trunk/MagicSoft/Mars/mdata/MDataChain.cc

    r1481 r1493  
    490490TString MDataChain::GetRule() const
    491491{
     492    if (!fMember)
     493        return "<n/a>";
     494
    492495    TString str;
    493496
  • trunk/MagicSoft/Mars/mfilter/MF.cc

    r1483 r1493  
    8787ClassImp(MF);
    8888
     89static const TString gsDefName  = "MF";
     90static const TString gsDefTitle = "Filter setup by a text-rule";
     91
     92// --------------------------------------------------------------------------
     93//
     94// Default Constructor. Don't use.
     95//
     96MF::MF() : fFilter(NULL)
     97{
     98    fName  = gsDefName.Data();
     99    fTitle = gsDefTitle.Data();
     100}
     101
    89102// --------------------------------------------------------------------------
    90103//
     
    94107MF::MF(const char *text, const char *name, const char *title)
    95108{
    96     fName  = name  ? name  : "MF";
    97     fTitle = title ? title : "Filter using a text";
     109    fName  = name  ? name  : gsDefName.Data();
     110    fTitle = title ? title : gsDefTitle.Data();
    98111
    99112    *fLog << inf << "Trying to resolve filter rule..." << endl;
     
    372385void MF::StreamPrimitive(ofstream &out) const
    373386{
    374     out << "   MF " << GetUniqueName() << "";
    375 }
    376 
     387    out << "   MF " << GetUniqueName();
     388
     389    if (!fFilter)
     390    {
     391        out << ";" << endl;
     392        return;
     393    }
     394
     395    out << "(\"" << fFilter->GetRule() << "\"";
     396        if (fName!=gsDefName || fTitle!=gsDefTitle)
     397    {
     398        out << "(\"" << fName << "\"";
     399        if (fTitle!=gsDefTitle)
     400            out << ", \"" << fTitle << "\"";
     401    }
     402    out << ");" << endl;
     403
     404}
     405
  • trunk/MagicSoft/Mars/mfilter/MF.h

    r1481 r1493  
    2727
    2828public:
     29    MF();
    2930    MF(const char *text, const char *name=NULL, const char *title=NULL);
    3031    ~MF();
  • trunk/MagicSoft/Mars/mfilter/MFDataMember.cc

    r1483 r1493  
    113113    TString ret = fData.GetRule();
    114114    ret += fFilterType==kELowerThan?"<":">";
    115     ret += fValue;
    116     return ret;
     115
     116    TString str;
     117    str += fValue;
     118
     119    return ret+str.Strip(TString::kBoth);
    117120}
    118121
  • trunk/MagicSoft/Mars/mfilter/MFilterList.cc

    r1486 r1493  
    2828//                                                                         //
    2929/////////////////////////////////////////////////////////////////////////////
    30 
    3130#include "MFilterList.h"
    3231
     
    3837#include "MLogManip.h"
    3938
     39#include "MIter.h"
     40
    4041ClassImp(MFilterList);
     42
     43static const TString gsDefName  = "MFilterList";
     44static const TString gsDefTitle = "List combining filters logically.";
    4145
    4246// --------------------------------------------------------------------------
     
    5761MFilterList::MFilterList(const char *type, const char *name, const char *title)
    5862{
    59     fName  = name  ? name  : "MFilterList";
    60     fTitle = title ? title : "List combining filters logically.";
     63    fName  = name  ? name  : gsDefName.Data();
     64    fTitle = title ? title : gsDefTitle.Data();
    6165
    6266    fFilterType = kEAnd;
     
    277281    }
    278282
    279     out << fName << "\", \"" << fName << "\", \"" << fTitle << "\");" << endl << endl;
    280 
    281     TIter Next(&fFilters);
    282 
    283     TObject *cont = NULL;
     283    out << "\"";
     284
     285    if (fName!=gsDefName || fTitle!=gsDefTitle)
     286    {
     287        out << ", \"" << fName << "\"";
     288        if (fTitle!=gsDefTitle)
     289            out << ", \"" << fTitle << "\"";
     290    }
     291    out << ");" << endl << endl;
     292
     293    MIter Next(&fFilters);
     294
     295    MParContainer *cont = NULL;
    284296    while ((cont=Next()))
    285297    {
     
    287299
    288300        out << "   " << ToLower(fName) << ".AddToList(&";
    289         out << ToLower(cont->GetName()) << ");" << endl << endl;
     301        out << cont->GetUniqueName() << ");" << endl << endl;
    290302    }
    291303}
Note: See TracChangeset for help on using the changeset viewer.