Ignore:
Timestamp:
01/24/05 11:07:29 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mbase
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mbase/MContinue.cc

    r5910 r5956  
    7373//
    7474MContinue::MContinue(const TString rule, const char *name, const char *title)
     75    : fTaskList(0)
    7576{
    7677    fName  = name  ? name  : "MContinue";
     
    9596//
    9697MContinue::MContinue(MFilter *f, const char *name, const char *title)
     98    : fTaskList(0)
    9799{
    98100    fName  = name  ? name  : "MContinue";
     
    119121Int_t MContinue::PreProcess(MParList *list)
    120122{
     123    ResetBit(kFilterIsPrivate);
     124
    121125    if (!GetFilter())
    122126    {
     127        if (IsAllowEmpty())
     128        {
     129            *fLog << warn << GetDescriptor() << " - WARNING: Empty filter found... task removed." << endl;
     130            return kSKIP;
     131        }
     132
    123133        *fLog << err << dbginf << "Unknown fatal Error! (fFilter=NULL?!?)" << endl;
    124134        return kFALSE;
     
    144154    }
    145155
     156    // Make sure, that everything is correctly propageted to the childs
    146157    GetFilter()->SetDisplay(fDisplay);
    147158    GetFilter()->SetLogStream(fLog);
    148159
     160    // Remeber that the filter is not already in tasklist
    149161    SetBit(kFilterIsPrivate);
    150162
     
    229241//     MyContinue.0: MHillas.fSize>1000
    230242//     MyContinue.1: MHillas.fSize<10000
     243//   or
     244//     MyContinue.Condition: <MMyClass>
     245//     MMyClass.Variable1: ...
     246//     MMyClass.Variable2: ...
    231247//
    232248// For more details see MF::ReadEnv
     
    234250Int_t MContinue::ReadEnv(const TEnv &env, TString prefix, Bool_t print)
    235251{
     252    if (IsEnvDefined(env, prefix, "Condition", print))
     253    {
     254        TString txt = GetEnvValue(env, prefix, "Condition", "");
     255        txt = txt.Strip(TString::kBoth);
     256        if (txt.BeginsWith("<") && txt.EndsWith(">"))
     257        {
     258            *fLog << err << "NOT YET IMPLEMENTED..." << endl;
     259            return kERROR;
     260        }
     261    }
     262
    236263    MF *f = new MF;
    237264    f->SetName(fName);
  • trunk/MagicSoft/Mars/mbase/MContinue.h

    r5910 r5956  
    3030    Int_t PostProcess();
    3131
    32     enum { kIsOwner = BIT(14), kFilterIsPrivate = BIT(15) };
     32    enum { kIsOwner = BIT(14), kFilterIsPrivate = BIT(15), kAllowEmpty = BIT(16) };
    3333
    3434public:
     
    3636    MContinue(MFilter *f, const char *name=NULL, const char *title=NULL);
    3737    ~MContinue();
     38
     39    // MContinue
     40    void SetAllowEmpty(Bool_t b=kTRUE) { b ? SetBit(kAllowEmpty) : ResetBit(kAllowEmpty); }
     41    Bool_t IsAllowEmpty() const { return TestBit(kAllowEmpty); }
     42
    3843
    3944    void SetInverted(Bool_t i=kTRUE);
  • trunk/MagicSoft/Mars/mbase/MMath.cc

    r5901 r5956  
    135135}
    136136
     137// --------------------------------------------------------------------------
     138//
     139// This function truncates the precision to roughly 0.5% of a Float_t by
     140// changing its bit-pattern (Be carefull, in rare cases this function must
     141// be adapted to different machines!). This is usefull to enforce better
     142// compression by eg. gzip.
     143//
     144void MMath::TruncatePrecision(Float_t &val)
     145{
     146    UInt_t &f = (UInt_t&)val;
     147
     148    f += 0x00004000;
     149    f &= 0xffff8000;
     150}
     151
    137152// -------------------------------------------------------------------------
    138153//
  • trunk/MagicSoft/Mars/mbase/MMath.h

    r5832 r5956  
    1818    Double_t SignificanceLiMaSigned(Double_t s, Double_t b, Double_t alpha=1);
    1919
     20    void TruncatePrecision(Float_t &val);
     21
    2022    TVector3 GetParab(const TVector3 &x, const TVector3 &y);
    2123    Double_t InterpolParabLin(const TVector3 &vx, const TVector3 &vy, Double_t x);
Note: See TracChangeset for help on using the changeset viewer.