Ignore:
Timestamp:
08/08/02 09:15:26 (22 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r1483 r1488  
    4949ClassImp(MWriteRootFile);
    5050
     51static const TString gsDefName  = "MWriteRootFile";
     52static const TString gsDefTitle = "Task which writes a root-output file";
    5153// --------------------------------------------------------------------------
    5254//
     
    5658MWriteRootFile::MWriteRootFile() : fOut(NULL)
    5759{
    58     fName  = "MWriteRootFile";
    59     fTitle = "Task which writes a root-output file";
     60    fName  = gsDefName;
     61    fTitle = gsDefTitle;
    6062
    6163    fBranches.SetOwner();
     
    7678                               const char *title)
    7779{
    78     fName  = name  ? name  : "MWriteRootFile";
    79     fTitle = title ? title : "Task which writes a root-output file";
     80    fName  = name  ? name  : gsDefName.Data();
     81    fTitle = title ? title : gsDefTitle.Data();
    8082
    8183    //
     
    409411    out << fOut->GetOption() << "\", \"";
    410412    out << fOut->GetTitle() << "\", ";
    411     out << fOut->GetCompressionLevel() << ", \"";
    412     out << fName << "\", \"" << fTitle << "\");" << endl;;
     413    out << fOut->GetCompressionLevel();
     414
     415    if (fName!=gsDefName || fTitle!=gsDefTitle)
     416    {
     417        out << ", \"" << fName << "\"";
     418        if (fTitle!=gsDefTitle)
     419            out << ", \"" << fTitle << "\"";
     420    }
     421    out << ");" << endl;
     422
    413423
    414424    MRootFileBranch *entry;
     
    416426    while ((entry=(MRootFileBranch*)Next()))
    417427    {
     428        out << "   " << GetUniqueName() << ".AddContainer(";
     429
    418430        if  (entry->GetContainer())
    419431        {
     
    424436            out << "\"" << entry->GetContName() << "\"";
    425437
    426         out << ", \"" << entry->GetName() << "\", \"";
    427         out << entry->GetTitle() << "\");" << endl;
     438        out << ", \"" << entry->GetName() << "\"";
     439        if ((TString)entry->GetTitle()!="")
     440            out << ", \"" << entry->GetTitle() << "\"";
     441
     442        out <<");" << endl;
    428443    }
    429444}
Note: See TracChangeset for help on using the changeset viewer.