Changeset 6924 for trunk/MagicSoft/Mars/mjobs
- Timestamp:
- 04/11/05 16:15:08 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mjobs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mjobs/MJOptimize.cc
r6907 r6924 228 228 } 229 229 230 MJOptimize::MJOptimize() : fDebug(-1), fNumEvents(0), fType(kSimplex), fNumMaxCalls(0), fTolerance(0) 230 MJOptimize::MJOptimize() : fDebug(-1), fNumEvents(0), fType(kSimplex), fNumMaxCalls(0), fTolerance(0), fTestTrain(kFALSE) 231 231 { 232 232 fRules.SetOwner(); … … 642 642 } 643 643 644 MMatrixLoop *loop = dynamic_cast<MMatrixLoop*>(parlist.FindTask("MRead")); 645 644 646 TString txt("Starting "); 645 647 switch (fType) … … 666 668 *fLog << inf << "Number of Parameters: " << fParameters.GetSize() << endl; 667 669 670 // In case the reader is the matrix loop and testrain is enabled 671 // switch on even mode... 672 if (loop && fTestTrain) 673 loop->SetOperationMode(MMatrixLoop::kEven); 674 668 675 if (!Optimize(evtloop)) 669 676 return kFALSE; … … 672 679 673 680 fEvtLoop->SetDisplay(fDisplay); 674 return Fcn(fParameters); 681 if (!Fcn(fParameters)) 682 return kFALSE; 683 684 // In case the reader is the matrix loop and testrain is enabled 685 // switch on odd mode... 686 if (!loop || !fTestTrain) 687 return kTRUE; 688 689 loop->SetOperationMode(MMatrixLoop::kOdd); 690 675 691 // Done already in Fcn 676 692 // list.SetVariables(fParameters); 693 return Fcn(fParameters); 677 694 } 678 695 -
trunk/MagicSoft/Mars/mjobs/MJOptimize.h
r6896 r6924 84 84 UInt_t fNumMaxCalls; 85 85 Float_t fTolerance; 86 Bool_t fTestTrain; 86 87 87 88 Bool_t Optimize(MEvtLoop &evtloop); … … 108 109 void SetNumMaxCalls(UInt_t num=0) { fNumMaxCalls=num; } 109 110 void SetTolerance(Float_t tol=0) { fTolerance=tol; } 111 void EnableTestTrain(Bool_t b=kTRUE) { fTestTrain=b; } 110 112 111 113 // Parameter access
Note:
See TracChangeset
for help on using the changeset viewer.