Ignore:
Timestamp:
06/05/02 10:20:05 (23 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mdata
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mdata/MData.cc

    r1304 r1348  
    4848#include "MData.h"
    4949
     50#include <ostream.h>
     51
    5052ClassImp(MData);
     53
     54Bool_t MData::AsciiWrite(ostream &out) const
     55{
     56    out << GetValue() << " ";
     57    return kTRUE;
     58}
     59
  • trunk/MagicSoft/Mars/mdata/MData.h

    r1338 r1348  
    2323    Double_t operator()() { return GetValue(); }
    2424
     25    Bool_t AsciiWrite(ostream &out) const;
     26
    2527    ClassDef(MData, 0) // A Base class for a generalized value
    2628};
  • trunk/MagicSoft/Mars/mdata/MDataChain.cc

    r1339 r1348  
    8181#include "MDataChain.h"
    8282
     83#include <math.h>         // fabs on Alpha
    8384#include <ctype.h>        // isalnum, ...
    8485#include <stdlib.h>       // strtod, ...
     
    131132{
    132133    return fMember ? fMember->PreProcess(pList) : kFALSE;
     134}
     135
     136// --------------------------------------------------------------------------
     137//
     138// Checks whether at least one member has the ready-to-save flag.
     139//
     140Bool_t MDataChain::IsReadyToSave() const
     141{
     142    *fLog << all << "fM=" << fMember << "/" << (int)fMember->IsReadyToSave() << " " << endl;
     143    return fMember ? fMember->IsReadyToSave() : kFALSE;
    133144}
    134145
  • trunk/MagicSoft/Mars/mdata/MDataChain.h

    r1338 r1348  
    5858
    5959    Bool_t IsValid() const { return fMember ? kTRUE : kFALSE; }
     60    Bool_t IsReadyToSave() const;
    6061
    6162    void Print(Option_t *opt = "") const;
  • trunk/MagicSoft/Mars/mdata/MDataList.cc

    r1338 r1348  
    142142// --------------------------------------------------------------------------
    143143//
     144// Checks whether at least one member has the ready-to-save flag.
     145//
     146Bool_t MDataList::IsReadyToSave() const
     147{
     148    TIter Next(&fMembers);
     149
     150    MData *data = NULL;
     151
     152    while ((data=(MData*)Next()))
     153        if (data->IsReadyToSave())
     154            return kTRUE;
     155
     156    return kFALSE;
     157}
     158
     159// --------------------------------------------------------------------------
     160//
    144161// If you want to add a new member to the list call this function with the
    145162// pointer to the member to be added.
  • trunk/MagicSoft/Mars/mdata/MDataList.h

    r1305 r1348  
    4141
    4242    Bool_t IsValid() const { return fMembers.GetSize() ? kTRUE : kFALSE; }
     43    Bool_t IsReadyToSave() const;
    4344
    4445    Double_t GetValue() const;
  • trunk/MagicSoft/Mars/mdata/MDataMember.cc

    r1334 r1348  
    5959    fObject = obj;
    6060    fCall   = call;
     61}
     62
     63// --------------------------------------------------------------------------
     64//
     65//  obj is a pointer to the instance of your class from which the data
     66//  should be requested. TMethodCall (s. root dox) is a pointer
     67//  to a TMethodCall object which should be the getter function for
     68//  the data you want to get.
     69//
     70MDataMember::MDataMember(MParContainer *obj, const TString call)
     71{
     72    fObject = obj;
     73    fCall   = obj->GetterMethod(call);
    6174}
    6275
     
    134147// --------------------------------------------------------------------------
    135148//
     149// Returns the ready-to-save flag of the data member container
     150//
     151Bool_t MDataMember::IsReadyToSave() const
     152{
     153    return IsValid() ? fObject->IsReadyToSave() : kFALSE;
     154}
     155
     156// --------------------------------------------------------------------------
     157//
    136158// Print the name of the data member without an CR.
    137159//
  • trunk/MagicSoft/Mars/mdata/MDataMember.h

    r1305 r1348  
    2424    }
    2525    MDataMember(MParContainer *obj, TMethodCall *call);
     26    MDataMember(MParContainer *obj, const TString call);
    2627
    2728    Double_t GetValue() const;
     
    2930
    3031    Bool_t IsValid() const { return fCall ? kTRUE : kFALSE; }
     32    Bool_t IsReadyToSave() const;
    3133
    3234    void Print(Option_t *opt = "") const;
  • trunk/MagicSoft/Mars/mdata/MDataValue.h

    r1305 r1348  
    2626
    2727    Bool_t IsValid() const { return kTRUE; }
     28    Bool_t IsReadyToSave() const { return kFALSE; }
    2829
    2930    void Print(Option_t *opt = "") const;
Note: See TracChangeset for help on using the changeset viewer.