Changeset 10045 for trunk/Mars/mjobs
- Timestamp:
- 10/28/10 18:18:38 (14 years ago)
- Location:
- trunk/Mars/mjobs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/mjobs/MJCut.cc
r9497 r10045 330 330 if (fNameResult.IsNull() && fStoreResult) 331 331 { 332 *fLog << inf2 << "Searching for open file " << fname << "... " << flush; 333 332 334 TFile *file = (TFile*)gROOT->GetListOfFiles()->FindObject(fname); 333 335 if (file) 334 336 { 337 *fLog << "found." << endl; 335 338 file->cd(); 336 339 return WriteContainer(arr); 337 340 } 341 *fLog << "not found." << endl; 338 342 } 339 343 -
trunk/Mars/mjobs/MJob.cc
r9552 r10045 523 523 } 524 524 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); 531 526 532 527 // In case the update-option is selected check whether … … 535 530 { 536 531 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 537 538 if (file && file->IsOpen() && !file->IsZombie()) 538 539 { 539 *fLog << inf << " Open file found." << endl;540 *fLog << inf << "Updating open file " << oname << "." << endl; 540 541 file->cd(); 541 542 return WriteContainer(cont); 542 543 } 543 544 } 545 546 *fLog << inf << "Writing to file " << oname << "." << endl; 547 548 TString title("File written by "); 549 title += fName; 544 550 545 551 // Open a new file with the defined option for writing
Note:
See TracChangeset
for help on using the changeset viewer.