Changeset 10045 for trunk/Mars/mjobs


Ignore:
Timestamp:
10/28/10 18:18:38 (14 years ago)
Author:
tbretz
Message:
Fixed a problem in ganymed which made the use of the tilde in pathnames in --out= impossible.
Location:
trunk/Mars/mjobs
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/mjobs/MJCut.cc

    r9497 r10045  
    330330    if (fNameResult.IsNull() && fStoreResult)
    331331    {
     332        *fLog << inf2 << "Searching for open file " << fname << "... " << flush;
     333
    332334        TFile *file = (TFile*)gROOT->GetListOfFiles()->FindObject(fname);
    333335        if (file)
    334336        {
     337            *fLog << "found." << endl;
    335338            file->cd();
    336339            return WriteContainer(arr);
    337340        }
     341        *fLog << "not found." << endl;
    338342    }
    339343
  • trunk/Mars/mjobs/MJob.cc

    r9552 r10045  
    523523    }
    524524
    525     const TString oname = CombinePath(fPathOut, name);
    526 
    527     *fLog << inf << "Writing to file: " << oname << endl;
    528 
    529     TString title("File written by ");
    530     title += fName;
     525    TString oname = CombinePath(fPathOut, name);
    531526
    532527    // In case the update-option is selected check whether
     
    535530    {
    536531        TFile *file = dynamic_cast<TFile*>(gROOT->GetListOfFiles()->FindObject(oname));
     532        if (!file || !file->IsOpen() || file->IsZombie())
     533        {
     534            gSystem->ExpandPathName(oname);
     535            file = dynamic_cast<TFile*>(gROOT->GetListOfFiles()->FindObject(oname));
     536        }
     537
    537538        if (file && file->IsOpen() && !file->IsZombie())
    538539        {
    539             *fLog << inf << "Open file found." << endl;
     540            *fLog << inf << "Updating open file " << oname << "." << endl;
    540541            file->cd();
    541542            return WriteContainer(cont);
    542543        }
    543544    }
     545
     546    *fLog << inf << "Writing to file " << oname << "." << endl;
     547
     548    TString title("File written by ");
     549    title += fName;
    544550
    545551    // Open a new file with the defined option for writing
Note: See TracChangeset for help on using the changeset viewer.