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

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mfileio/MReadTree.cc

    r1465 r1471  
    801801    *fLog << " Next Entry to read: " << fNumEntry << endl;
    802802}
     803
     804void MReadTree::SavePrimitive(ofstream &out, Option_t *o="")
     805{
     806    TString name = ToLower(fName);
     807
     808    out << "   " << ClassName() << " " << name << "(";
     809    out << fChain->GetName() << ", \"" << fName << "\", \"" << fTitle << "\");" << endl;
     810
     811    TIter Next(fChain->GetListOfFiles());
     812    TObject *obj = NULL;
     813    while ((obj=Next()))
     814        out << "   " << name << ".AddFile(\"" << obj->GetTitle() << "\");" << endl;
     815
     816    if (!fAutoEnable)
     817        out << "   " << name << ".DisableAutoScheme();" << endl;
     818
     819    if (fNumEntry!=0)
     820       out << "   " << name << ".SetEventNum(" << fNumEntry << ");" << endl;
     821
     822
     823}
  • trunk/MagicSoft/Mars/mfileio/MReadTree.h

    r1381 r1471  
    7171
    7272    virtual Bool_t Notify();
     73    virtual void   SavePrimitive(ofstream &out, Option_t *o="");
    7374
    7475    ClassDef(MReadTree, 0)      // Reads a tree from file(s)
  • trunk/MagicSoft/Mars/mfileio/MWriteRootFile.cc

    r1381 r1471  
    3434//                                                                         //
    3535/////////////////////////////////////////////////////////////////////////////
    36 
    3736#include "MWriteRootFile.h"
     37
     38#include <fstream.h>
    3839
    3940#include <TFile.h>
     
    383384}
    384385
     386void MWriteRootFile::SavePrimitive(ofstream &out, Option_t *o="")
     387{
     388    out << "   MWriteRootFile " << ToLower(fName) << "(\"";
     389    out << fOut->GetName() << "\", \"";
     390    out << fOut->GetOption() << "\", \"";
     391    out << fOut->GetTitle() << "\", ";
     392    out << fOut->GetCompressionLevel() << ", \"";
     393    out << fName << "\", " << fTitle << "\");" << endl;;
     394
     395    MRootFileBranch *entry;
     396    TIter Next(&fBranches);
     397    while ((entry=(MRootFileBranch*)Next()))
     398    {
     399        out << "   " << ToLower(fName) << ".AddContainer(\"";
     400        out << entry->GetContName() << "\", \"";
     401        out << entry->GetName() << "\", \"";
     402        out << entry->GetTitle() << "\")" << endl;
     403    }
     404}
  • trunk/MagicSoft/Mars/mfileio/MWriteRootFile.h

    r1381 r1471  
    8585
    8686    void Print(Option_t *t=NULL) const;
     87    void SavePrimitive(ofstream &out, Option_t *o="");
    8788
    8889    ClassDef(MWriteRootFile, 0) // Class to write one container to a root file
Note: See TracChangeset for help on using the changeset viewer.