Changeset 10045


Ignore:
Timestamp:
Oct 28, 2010, 6:18:38 PM (10 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
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/Changelog

    r10044 r10045  
    1818
    1919                                                 -*-*- END OF LINE -*-*-
     20
     21 2010/10/28 Thomas Bretz
     22
     23   * mjobs/MJCuts.cc:
     24     - improved debug output in WriteResults
     25
     26   * mjobs/MJob.cc:
     27     - imporved searching for an open file in WriteContainer
     28
     29
    2030
    2131 2010/10/28 Daniela Dorner
  • 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.