Changeset 10045
- Timestamp:
- 10/28/10 18:18:38 (14 years ago)
- Location:
- trunk/Mars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/Changelog
r10044 r10045 18 18 19 19 -*-*- 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 20 30 21 31 2010/10/28 Daniela Dorner -
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.