Ignore:
Timestamp:
08/01/02 12:31:56 (23 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mbase
Files:
8 edited

Legend:

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

    r1191 r1471  
    5454#include "MEvtLoop.h"
    5555
     56#include <fstream.h>     // ofstream, SavePrimitive
    5657#include <iostream.h>
    5758
     
    274275}
    275276
     277void MEvtLoop::SavePrimitive(ofstream &out, Option_t *)
     278{
     279    fParList->SavePrimitive(out);
     280
     281    out << "   MEvtLoop evtloop;" << endl;
     282    out << "   evtloop.SetParList(&" << ToLower(fParList->GetName()) << ")" << endl;
     283    out << "   if (!evtloop.Eventloop())" << endl;
     284    out << "      return;" << endl;
     285}
  • trunk/MagicSoft/Mars/mbase/MEvtLoop.h

    r1268 r1471  
    4646    Bool_t Eventloop(Int_t maxcnt=-1, const char *tlist="MTaskList");
    4747
     48    void SavePrimitive(ofstream &out, Option_t *o="");
     49
    4850    ClassDef(MEvtLoop, 0) // Class to execute the tasks in a tasklist
    4951};
  • trunk/MagicSoft/Mars/mbase/MParContainer.cc

    r1299 r1471  
    346346    return call;
    347347}
     348
     349void MParContainer::SavePrimitive(ofstream &out, Option_t *o="")
     350{
     351    out << "   // SavePrimitive not overloaded... using default." << endl;
     352    out << "   " << ClassName() << " " << ToLower(fName) << "(\"";
     353    out << fName << "\", \"" << fTitle << "\");" << endl;
     354}
     355
  • trunk/MagicSoft/Mars/mbase/MParContainer.h

    r1348 r1471  
    6161    virtual void        Print(Option_t *option="") const;
    6262    virtual Int_t       Sizeof() const;
     63    virtual void        SavePrimitive(ofstream &out, Option_t *o="");
    6364
    6465    virtual void   SetLogStream(MLog *lg) { fLog = lg; }
  • trunk/MagicSoft/Mars/mbase/MParList.cc

    r1337 r1471  
    4141#include "MParList.h"
    4242
     43#include <fstream.h>     // ofstream, SavePrimitive
     44
    4345#include <TNamed.h>
    4446#include <TClass.h>
     
    657659    return list;
    658660}
     661
     662void MParList::SavePrimitive(ofstream &out, Option_t *o="")
     663{
     664    out << "   MParList " << ToLower(fName) << ";" << endl << endl;
     665
     666    TIter Next(fContainer);
     667
     668    TObject *cont = NULL;
     669    while ((cont=Next()))
     670    {
     671        cont->SavePrimitive(out, "");
     672        out << "   " << ToLower(fName) << ".AddToList(&";
     673        out << ToLower(cont->GetName()) << ");" << endl << endl;
     674    }
     675}
  • trunk/MagicSoft/Mars/mbase/MParList.h

    r1337 r1471  
    7878
    7979    void Print(Option_t *t = NULL) const;
     80    void SavePrimitive(ofstream &out, Option_t *o="");
    8081
    8182    ClassDef(MParList, 0) // list of parameter containers (MParContainer)
  • trunk/MagicSoft/Mars/mbase/MTaskList.cc

    r1337 r1471  
    5757#include "MTaskList.h"
    5858
     59#include <fstream.h>     // ofstream, SavePrimitive
     60
    5961#include <TClass.h>
    6062#include <TBaseClass.h>
     
    512514}
    513515
     516
     517void MTaskList::SavePrimitive(ofstream &out, Option_t *o="")
     518{
     519    out << "   MTaskList " << ToLower(fName) << ";" << endl << endl;
     520
     521    TIter Next(fTasks);
     522
     523    TObject *cont = NULL;
     524    while ((cont=Next()))
     525    {
     526        cont->SavePrimitive(out, "");
     527        out << "   " << ToLower(fName) << ".AddToList(&";
     528        out << ToLower(cont->GetName()) << ");" << endl << endl;
     529    }
     530}
  • trunk/MagicSoft/Mars/mbase/MTaskList.h

    r1283 r1471  
    5656    void SetOwner(Bool_t enable=kTRUE);
    5757
     58    void SavePrimitive(ofstream &out, Option_t *o="");
     59
    5860    const TList *GetList() const { return fTasks; }
    5961
Note: See TracChangeset for help on using the changeset viewer.