Changeset 4723 for trunk/MagicSoft/Mars/mjobs/MJPedestal.cc
- Timestamp:
- 08/24/04 18:15:29 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mjobs/MJPedestal.cc
r4722 r4723 440 440 441 441 } 442 443 444 Bool_t MJPedestal::WriteResult() 442 /* 443 Bool_t MJPedestal::WriteEventloop(MEvtLoop &evtloop) const 445 444 { 446 445 if (fOutputPath.IsNull()) … … 452 451 453 452 TFile file(oname, fOverwrite?"RECREATE":"NEW", "File created by MJPedestal", 9); 453 if (!file.IsOpen()) 454 { 455 *fLog << err << "ERROR - Couldn't open file " << oname << " for writing..." << endl; 456 return kFALSE; 457 } 458 459 if (evtloop.Write(fName)<=0) 460 { 461 *fLog << err << "Unable to write MEvtloop to " << oname << endl; 462 return kFALSE; 463 } 464 465 return kTRUE; 466 } 467 */ 468 Bool_t MJPedestal::WriteResult() 469 { 470 if (fOutputPath.IsNull()) 471 return kTRUE; 472 473 const TString oname(GetOutputFile()); 474 475 *fLog << inf << "Writing to file: " << oname << endl; 476 477 TFile file(oname, "UPDATE", "File created by MJPedestal", 9); 454 478 if (!file.IsOpen()) 455 479 { … … 527 551 return; 528 552 529 TString e1 = fEnv->GetValue( "MJPedestal.OutputPath", "");553 TString e1 = fEnv->GetValue(Form("%s.OutputPath", fName.Data()), ""); 530 554 if (!e1.IsNull()) 531 555 { … … 534 558 } 535 559 536 SetMaxEvents(fEnv->GetValue( "MJPedestal.MaxEvents", fMaxEvents));537 SetOverwrite(fEnv->GetValue( "MJPedestal.AllowOverwrite", fOverwrite));538 539 fUseData = fEnv->GetValue( "MJPedestal.UseData", fUseData);560 SetMaxEvents(fEnv->GetValue(Form("%s.MaxEvents", fName.Data()), fMaxEvents)); 561 SetOverwrite(fEnv->GetValue(Form("%s.AllowOverwrite", fName.Data()), fOverwrite)); 562 563 fUseData = fEnv->GetValue(Form("%s.UseData", fName.Data()), fUseData); 540 564 } 541 565 … … 570 594 MTaskList tlist; 571 595 plist.AddToList(&tlist); 596 plist.AddToList(this); // take care of fDisplay! 572 597 573 598 MReadMarsFile read("Events"); … … 640 665 evtloop.ReadEnv(*fEnv); 641 666 667 // if (!WriteEventloop(evtloop)) 668 // return kFALSE; 669 642 670 // Execute first analysis 643 671 if (!evtloop.Eventloop(fMaxEvents)) … … 654 682 return kFALSE; 655 683 656 *fLog << inf<< GetDescriptor() << ": Done." << endl;684 *fLog << all << GetDescriptor() << ": Done." << endl; 657 685 658 686 return kTRUE;
Note:
See TracChangeset
for help on using the changeset viewer.