Changeset 8133 for trunk


Ignore:
Timestamp:
10/19/06 15:28:24 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r8132 r8133  
    4646   * msignal/MArrivalTimeCam.[h,cc]:
    4747     - removed unused data members
     48
     49   * mfileio/MReadTree.cc:
     50     - changed some output text
     51
     52   * mfileio/MWriteRootFile.cc:
     53     - added a fix to allow paths containing a tilde
    4854
    4955
  • trunk/MagicSoft/Mars/mfileio/MReadTree.cc

    r7838 r8133  
    341341    {
    342342        *fLog << err << "MReadTree::AddFile - ERROR: You cannot add a file, because MReadTree" << endl;
    343         *fLog <<        "                            handles a memory based tree or its default" << endl;
    344         *fLog <<        "                            constructor was called." << endl;
     343        *fLog <<        "  is supposed to read its tree from memory or its default or its" << endl;
     344        *fLog <<        "  default constructor was called (no tree name was given)." << endl;
    345345        return 0;
    346346    }
     
    703703    if (!fTaskList)
    704704        *fLog << warn << "WARNING - Standard tasklist MTaskList not found... ignoring Stream-ID." << endl;
     705
     706    if (!fTree || !fChain)
     707    {
     708        *fLog << err << "ERROR - Something went terribly wrong!" << endl;
     709        *fLog <<        "        Maybe you called the default constructor?" << endl;
     710        *fLog <<        "        Did you forget to give a tree name in the constructor?" << endl;
     711        return kFALSE;
     712    }
    705713
    706714    //
  • trunk/MagicSoft/Mars/mfileio/MWriteRootFile.cc

    r7804 r8133  
    114114{
    115115    TFile *file = dynamic_cast<TFile*>(gROOT->GetListOfFiles()->FindObject(name));
     116
     117    // If the file was not found with its name try its expanded name
     118    if (!file)
     119    {
     120        TString fqp(name);
     121        gSystem->ExpandPathName(fqp);
     122        file = dynamic_cast<TFile*>(gROOT->GetListOfFiles()->FindObject(fqp));
     123    }
     124
    116125    if (!file)
    117126    {
     
    725734// --------------------------------------------------------------------------
    726735//
    727 // Open a new file with the ame fname. Move all trees and branches from the
     736// Open a new file with the name fname. Move all trees and branches from the
    728737// old file to the new file.
    729738//
     
    741750        return kTRUE;
    742751    }
    743 
    744752    if (!newfile)
    745753    {
    746754        *fLog << err << "ERROR - Cannot open new file " << fname << endl;
    747755         return kFALSE;
     756    }
     757
     758    if (!fOut)
     759    {
     760        *fLog << err << "ERROR - MWriteRootFile::ChangeFile... something went terribly wrong!" << endl;
     761        *fLog <<        "        Please start debugging!" << endl;
     762        return kFALSE;
    748763    }
    749764
Note: See TracChangeset for help on using the changeset viewer.