Ignore:
Timestamp:
07/26/06 11:46:55 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mbase
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mbase/MAGIC.h

    r3710 r7804  
    2121#endif
    2222
     23#ifndef R__FOR_EACH
     24#define R__FOR_EACH ForEach
     25#endif
     26
     27
    2328//
    2429// Values for the eventloop control
  • trunk/MagicSoft/Mars/mbase/MEvtLoop.cc

    r7130 r7804  
    736736// gui elements to a macro-file.
    737737//
    738 void MEvtLoop::StreamPrimitive(ofstream &out) const
     738void MEvtLoop::StreamPrimitive(ostream &out) const
    739739{
    740740    out << "   MEvtLoop " << GetUniqueName();
     
    747747//
    748748//
    749 void MEvtLoop::SavePrimitive(ofstream &out, Option_t *opt)
     749void MEvtLoop::SavePrimitive(ostream &out, Option_t *opt)
    750750{
    751751    TString options = opt;
     
    767767        {
    768768            *fLog << err << "MEvtLoop::SavePrimitive - Error: old file not closed." << endl;
    769             gListOfPrimitives->ForEach(TObject, ResetBit)(BIT(15));
     769            gListOfPrimitives->R__FOR_EACH(TObject, ResetBit)(BIT(15));
    770770            delete gListOfPrimitives;
    771771        }
     
    788788        return;
    789789
    790     gListOfPrimitives->ForEach(TObject, ResetBit)(BIT(15));
     790    gListOfPrimitives->R__FOR_EACH(TObject, ResetBit)(BIT(15));
    791791    delete gListOfPrimitives;
    792792    gListOfPrimitives = 0;
     793}
     794
     795void MEvtLoop::SavePrimitive(ofstream &out, Option_t *o)
     796{
     797    SavePrimitive(static_cast<ostream&>(out), o);
    793798}
    794799
     
    10411046    }
    10421047
    1043     return ReadEnv(TEnv(config), "", print);
     1048    const TEnv env(config);
     1049    return ReadEnv(env, "", print);
    10441050}
    10451051
  • trunk/MagicSoft/Mars/mbase/MEvtLoop.h

    r7071 r7804  
    3737    Bool_t HasDuplicateNames(TObjArray &arr, const TString txt) const;
    3838
    39     void StreamPrimitive(ofstream &out) const;
     39    void StreamPrimitive(ostream &out) const;
    4040
    4141    Bool_t ProcessGuiEvents(Int_t num);
     
    7878    void MakeMacro(const char *filename="evtloop.C");
    7979
     80    void SavePrimitive(ostream &out, Option_t *o="");
    8081    void SavePrimitive(ofstream &out, Option_t *o="");
    8182
  • trunk/MagicSoft/Mars/mbase/MLog.cc

    r7438 r7804  
    264264    SetBit(kIsUnderlined);
    265265
    266     fPlugins->ForEach(MLogPlugin, Underline)();
     266    fPlugins->R__FOR_EACH(MLogPlugin, Underline)();
    267267
    268268    if (TestBit(eNoColors))
     
    353353        fOut->write(fBase, len);
    354354
    355     fPlugins->ForEach(MLogPlugin, SetColor)(fOutputLevel);
    356     fPlugins->ForEach(MLogPlugin, WriteBuffer)(fBase, len);
     355    fPlugins->R__FOR_EACH(MLogPlugin, SetColor)(fOutputLevel);
     356    fPlugins->R__FOR_EACH(MLogPlugin, WriteBuffer)(fBase, len);
    357357
    358358    if (fDevice&eGui && fGui)
  • trunk/MagicSoft/Mars/mbase/MParContainer.cc

    r7179 r7804  
    682682// gui elements to a macro-file.
    683683//
    684 void MParContainer::SavePrimitive(ofstream &out, Option_t *o)
     684void MParContainer::SavePrimitive(ostream &out, Option_t *o)
    685685{
    686686    static UInt_t uid = 0;
     
    698698}
    699699
     700void MParContainer::SavePrimitive(ofstream &out, Option_t *o)
     701{
     702    SavePrimitive(static_cast<ostream&>(out));
     703}
     704
    700705// --------------------------------------------------------------------------
    701706//
    702707// Creates the string written by SavePrimitive and returns it.
    703708//
    704 void MParContainer::StreamPrimitive(ofstream &out) const
     709void MParContainer::StreamPrimitive(ostream &out) const
    705710{
    706711    out << "   // Using MParContainer::StreamPrimitive" << endl;
  • trunk/MagicSoft/Mars/mbase/MParContainer.h

    r6949 r7804  
    9494    virtual void   Print(Option_t *option="") const;
    9595    virtual Int_t  Sizeof() const;
     96    virtual void   SavePrimitive(ostream &out, Option_t *o="");
    9697    virtual void   SavePrimitive(ofstream &out, Option_t *o="");
    9798
     
    108109    virtual void SetDisplay(MStatusDisplay *d) { fDisplay = d; }
    109110
    110     // FIXME: Change to ostream! Seems to be difficult, because
    111     //        MTaskListStreamPrimitive calls SavePrimitive(ofstream&).
    112     //        Maybe with a cast?
    113     virtual void StreamPrimitive(ofstream &out) const;
     111    virtual void StreamPrimitive(ostream &out) const;
    114112
    115113    TMethodCall *GetterMethod(const char *name) const;
  • trunk/MagicSoft/Mars/mbase/MParList.cc

    r7413 r7804  
    160160void MParList::SetLogStream(MLog *log)
    161161{
    162     fContainer->ForEach(MParContainer, SetLogStream)(log);
     162    fContainer->R__FOR_EACH(MParContainer, SetLogStream)(log);
    163163    MParContainer::SetLogStream(log);
    164164}
     
    166166void MParList::SetDisplay(MStatusDisplay *d)
    167167{
    168     fContainer->ForEach(MParContainer, SetDisplay)(d);
     168    fContainer->R__FOR_EACH(MParContainer, SetDisplay)(d);
    169169    MParContainer::SetDisplay(d);
    170170}
     
    659659void MParList::SetReadyToSave(Bool_t flag)
    660660{
    661     fContainer->ForEach(MParContainer, SetReadyToSave)(flag);
     661    fContainer->R__FOR_EACH(MParContainer, SetReadyToSave)(flag);
    662662    MParContainer::SetReadyToSave(flag);
    663663}
     
    669669void MParList::Reset()
    670670{
    671     fContainer->ForEach(MParContainer, Reset)();
     671    fContainer->R__FOR_EACH(MParContainer, Reset)();
    672672}
    673673
     
    841841}
    842842
    843 void MParList::SavePrimitive(ofstream &out, Option_t *o)
     843void MParList::SavePrimitive(ostream &out, Option_t *o)
    844844{
    845845    Bool_t saved = IsSavedAsPrimitive();
     
    867867}
    868868
     869void MParList::SavePrimitive(ofstream &out, Option_t *o)
     870{
     871    SavePrimitive(static_cast<ostream&>(out), o);
     872}
     873
    869874// --------------------------------------------------------------------------
    870875//
     
    873878// gui elements to a macro-file.
    874879//
    875 void MParList::StreamPrimitive(ofstream &out) const
     880void MParList::StreamPrimitive(ostream &out) const
    876881{
    877882    out << "   MParList " << GetUniqueName();
     
    894899{
    895900    MParContainer::GetNames(arr);
    896     fContainer->ForEach(MParContainer, GetNames)(arr);
     901    fContainer->R__FOR_EACH(MParContainer, GetNames)(arr);
    897902}
    898903
     
    905910{
    906911    MParContainer::SetNames(arr);
    907     fContainer->ForEach(MParContainer, SetNames)(arr);
     912    fContainer->R__FOR_EACH(MParContainer, SetNames)(arr);
    908913}
    909914
  • trunk/MagicSoft/Mars/mbase/MParList.h

    r7413 r7804  
    3535    enum { kIsOwner = BIT(14) };
    3636
    37     void StreamPrimitive(ofstream &out) const;
     37    void StreamPrimitive(ostream &out) const;
    3838
    3939    void Init(const char *name, const char *title);
     
    9797    void SetNames(TObjArray &arr);
    9898
     99    void SavePrimitive(ostream &out, Option_t *o="");
    99100    void SavePrimitive(ofstream &out, Option_t *o="");
    100101
  • trunk/MagicSoft/Mars/mbase/MString.h

    r7179 r7804  
    1313public:
    1414    MString(const char *txt=0)  : TString(txt) { }
    15     MString(const TString &txt) : TString(txt) { }
     15    MString(const MString &txt) : TString(txt) { }
    1616
    1717    MString &Print(const char *fmt, va_list &ap);
    1818    MString &Print(const char *fmt, ...);
     19
     20#ifndef __CINT__
    1921    static MString Form(const char *fmt, ...);
     22#endif
    2023
    2124    ClassDef(MString, 1) // Tool to make Form() thread safe against other TStrings
  • trunk/MagicSoft/Mars/mbase/MTask.cc

    r7601 r7804  
    455455// and afterwards set the filter for this task.
    456456//
    457 void MTask::SavePrimitive(ofstream &out, Option_t *o)
     457void MTask::SavePrimitive(ostream &out, Option_t *o)
    458458{
    459459    MParContainer::SavePrimitive(out);
     
    471471    if (fSerialNumber>0)
    472472        out << "   " << GetUniqueName() << ".SetSerialNumber(" << fSerialNumber <<");" << endl;
     473}
     474
     475void MTask::SavePrimitive(ofstream &out, Option_t *o)
     476{
     477    SavePrimitive(static_cast<ostream&>(out), o);
    473478}
    474479
  • trunk/MagicSoft/Mars/mbase/MTask.h

    r7601 r7804  
    120120    virtual Int_t CallPostProcess();
    121121
     122    void SavePrimitive(ostream &out, Option_t *o="");
    122123    void SavePrimitive(ofstream &out, Option_t *o="");
    123124
  • trunk/MagicSoft/Mars/mbase/MTaskList.cc

    r7688 r7804  
    144144void MTaskList::SetLogStream(MLog *log)
    145145{
    146     fTasks->ForEach(MTask, SetLogStream)(log);
     146    fTasks->R__FOR_EACH(MTask, SetLogStream)(log);
    147147    MTask::SetLogStream(log);
    148148}
     
    154154void MTaskList::SetDisplay(MStatusDisplay *d)
    155155{
    156     fTasks->ForEach(MTask, SetDisplay)(d);
     156    fTasks->R__FOR_EACH(MTask, SetDisplay)(d);
    157157    MTask::SetDisplay(d);
    158158}
     
    160160void MTaskList::SetAccelerator(Byte_t acc)
    161161{
    162     fTasks->ForEach(MTask, SetAccelerator)(acc);
     162    fTasks->R__FOR_EACH(MTask, SetAccelerator)(acc);
    163163    MTask::SetAccelerator(acc);
    164164}
     
    171171void MTaskList::SetSerialNumber(Byte_t num)
    172172{
    173     fTasks->ForEach(MTask, SetSerialNumber)(num);
     173    fTasks->R__FOR_EACH(MTask, SetSerialNumber)(num);
    174174    MTask::SetSerialNumber(num);
    175175}
     
    802802    //  create the Iterator for the TaskList
    803803    //
    804     fTasks->ForEach(MTask, PrintStatistics)(lvl+1, title, GetCpuTime());
     804    fTasks->R__FOR_EACH(MTask, PrintStatistics)(lvl+1, title, GetCpuTime());
    805805
    806806    if (lvl==0)
     
    827827// gui elements to a macro-file.
    828828//
    829 void MTaskList::StreamPrimitive(ofstream &out) const
     829void MTaskList::StreamPrimitive(ostream &out) const
    830830{
    831831    out << "   MTaskList " << GetUniqueName();
     
    853853{
    854854    MParContainer::GetNames(arr);
    855     fTasks->ForEach(MParContainer, GetNames)(arr);
     855    fTasks->R__FOR_EACH(MParContainer, GetNames)(arr);
    856856}
    857857
     
    859859{
    860860    MParContainer::SetNames(arr);
    861     fTasks->ForEach(MParContainer, SetNames)(arr);
     861    fTasks->R__FOR_EACH(MParContainer, SetNames)(arr);
    862862}
    863863
  • trunk/MagicSoft/Mars/mbase/MTaskList.h

    r7688 r7804  
    3131
    3232    void   Remove(MTask *task);
    33     void   StreamPrimitive(ofstream &out) const;
     33    void   StreamPrimitive(ostream &out) const;
    3434    Bool_t CheckAddToList(MTask *task, const char *tType, const MTask *where=NULL) const;
    3535
Note: See TracChangeset for help on using the changeset viewer.