Changeset 8223 for trunk/MagicSoft
- Timestamp:
- 12/11/06 15:30:05 (18 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r8219 r8223 31 31 * mjobs/MJCalibration.cc, mjobs/MJCalibrateSignal.cc, mjobs/MJStar.cc: 32 32 - improved output in case of no files found 33 34 * mjobs/MJPedestal.cc, mjobs/MJCalibTest.cc, mjobs/MJCalibration.cc, 35 mjobs/MJCalibrateSignal.cc, mjobs/MJStar.cc: 36 - moved output in case of invalid number of runs for a sequence 37 to MSequence 38 - stop execution if no or not all files were found 39 40 * mjobs/MSequence.cc: 41 - added some output and return an error if the number of requested 42 files doesn't match the number of files found. 43 44 * mjobs/MDataSet.cc: 45 - when Setting up dat-runs fails now an error is returned 46 47 * mjobs/MJSpectrum.cc, mjobs/MJCut.cc: 48 - if the number of files set from a sequence doesn't match the number 49 of files found stop execution 50 51 * mjoptim/MJOptimize.cc, mjtrain/MJTrainDisp.cc, mjtrain/MJTrainEnergy.cc: 52 - stop execution if number of requested and found files mismatch 53 54 * mjoptim/MJOptimizeCuts.cc, mjoptim/MJOptimizeDisp.cc, 55 mjoptim/MJOptimizeEnergy.cc: 56 - added more informative log output 33 57 34 58 -
trunk/MagicSoft/Mars/NEWS
r8217 r8223 48 48 PLEASE ALWAYS USE THIS PLOT FOR ANY KIND OF PRESENTATION! 49 49 50 - ganymed/optim/train: The cut program, trainings- and optimization 51 macros could run with less files found than expected from the 52 sequence-files. No the execution is stopped in this case. 53 50 54 - sponde: now also allows the uasge of random forest 51 55 -
trunk/MagicSoft/Mars/mjoptim/MJOptimize.cc
r8091 r8223 249 249 if (!seq.IsValid()) 250 250 return kFALSE; 251 252 seq.SetupDatRuns(files, o->GetTitle(), "I");251 if (seq.SetupDatRuns(files, o->GetTitle(), "I")<=0) 252 return kFALSE; 253 253 } 254 254 -
trunk/MagicSoft/Mars/mjoptim/MJOptimizeCuts.cc
r7152 r8223 299 299 return kFALSE; 300 300 301 *fLog << inf << "Finished processing of " << fname << endl; 302 301 303 // Copy the result back to be accessible by the user 302 304 if (fit) -
trunk/MagicSoft/Mars/mjoptim/MJOptimizeDisp.cc
r7413 r8223 202 202 203 203 // Print the result 204 *fLog << inf << "Rule: " << rule << endl; 204 *fLog << inf << "Finished processing of " << fname << endl; 205 *fLog << inf << "With Rule: " << rule << endl; 205 206 hist.GetAlphaFitter().Print("result"); 206 207 -
trunk/MagicSoft/Mars/mjoptim/MJOptimizeEnergy.cc
r7169 r8223 143 143 144 144 // Print the result 145 *fLog << inf << "Rule: " << rule << endl; 145 *fLog << inf << "Finished processing of " << fname << endl; 146 *fLog << inf << "With Rule: " << rule << endl; 146 147 hist.Print(); 147 148 -
trunk/MagicSoft/Mars/mjtrain/MJTrainEnergy.cc
r7700 r8223 101 101 readtst.DisableAutoScheme(); 102 102 103 set.AddFilesOn(readtrn); 104 set.AddFilesOff(readtst); 103 if (!set.AddFilesOn(readtrn)) 104 return kFALSE; 105 if (!set.AddFilesOff(readtst)) 106 return kFALSE; 105 107 106 108 // ----------------------- Setup Matrix ------------------ -
trunk/MagicSoft/Mars/mjtrain/MJTrainSeparation.cc
r8170 r8223 57 57 // tasks 58 58 #include "MReadMarsFile.h" 59 #include "MReadReports.h" 59 60 #include "MContinue.h" 60 61 #include "MFillH.h" … … 77 78 #include "MFEventSelector.h" 78 79 #include "MFilterList.h" 80 81 // wobble 82 #include "MPointingPos.h" 83 #include "MPointingDevCalc.h" 84 #include "../mastro/MObservatory.h" 85 #include "MSrcPosCalc.h" 86 #include "MSrcPosCorrect.h" 87 #include "../mimage/MHillasCalc.h" 88 79 89 80 90 ClassImp(MJTrainSeparation); … … 395 405 { 396 406 TChain chain("OriginalMC"); 397 set.AddFilesOn(chain); 407 if (!set.AddFilesOn(chain)) 408 return kFALSE; 398 409 399 410 min = chain.GetMinimum("MMcEvtBasic.fEnergy"); … … 411 422 { 412 423 TChain chain1("Events"); 413 set.AddFilesOff(chain1); 424 if (!set.AddFilesOff(chain1)) 425 return kFALSE; 414 426 415 427 num = chain1.GetEntries(); … … 421 433 422 434 TChain chain("EffectiveOnTime"); 423 set.AddFilesOff(chain); 435 if (!set.AddFilesOff(chain)) 436 return kFALSE; 424 437 425 438 chain.Draw("MEffectiveOnTime.fVal", "MEffectiveOnTime.fVal", "goff"); … … 447 460 { 448 461 TChain chain1("Events"); 449 set.AddFilesOn(chain1); 462 if (!set.AddFilesOn(chain1)) 463 return kFALSE; 450 464 451 465 const Double_t num = chain1.GetEntries(); … … 610 624 611 625 // --------------------- Setup files -------------------- 612 MRead MarsFile read1("Events");626 MReadReports read1;//("Events"); 613 627 MReadMarsFile read2("Events"); 614 628 MReadMarsFile read3("Events"); 615 MRead MarsFile read4("Events");616 read1.DisableAutoScheme();629 MReadReports read4;//("Events"); 630 //read1.DisableAutoScheme(); 617 631 read2.DisableAutoScheme(); 618 632 read3.DisableAutoScheme(); 619 read4.DisableAutoScheme(); 633 //read4.DisableAutoScheme(); 634 635 read1.AddTree("Events", "MTime.", MReadReports::kMaster); 636 read4.AddTree("Events", "MTime.", MReadReports::kMaster); 637 read1.AddTree("Drive", MReadReports::kRequired); 638 read4.AddTree("Drive", MReadReports::kRequired); 639 read1.AddTree("Starguider", MReadReports::kRequired); 640 read4.AddTree("Starguider", MReadReports::kRequired); 620 641 621 642 // Setup four reading tasks with the on- and off-data of the two datasets 622 fDataSetTrain.AddFilesOn(read1); 623 fDataSetTrain.AddFilesOff(read3); 624 625 fDataSetTest.AddFilesOff(read2); 626 fDataSetTest.AddFilesOn(read4); 643 if (!fDataSetTrain.AddFilesOn(read1)) 644 return kFALSE; 645 const Bool_t setrc1 = fDataSetTrain.IsWobbleMode() ? 646 fDataSetTrain.AddFilesOn(read3) : fDataSetTrain.AddFilesOff(read3); 647 const Bool_t setrc2 = fDataSetTest.IsWobbleMode() ? 648 fDataSetTest.AddFilesOn(read2) : fDataSetTest.AddFilesOff(read2); 649 if (!setrc1 || !setrc2) 650 return kFALSE; 651 if (!fDataSetTest.AddFilesOn(read4)) 652 return kFALSE; 627 653 628 654 // ----------------------- Setup RF Matrix ---------------------- … … 656 682 had.SetVal(0); 657 683 wgt.SetVal(1); 684 685 // How to get source position from off- and on-data? 686 MPointingPos source("MSourcePos"); 687 MObservatory obs; 688 MSrcPosCalc scalc; 689 MSrcPosCorrect scor; 690 MHillasCalc hcalcw; 691 MHillasCalc hcalcw2; 692 MPointingDevCalc devcalc; 693 scalc.SetMode(MSrcPosCalc::kDefault); // kWobble for off-source 694 hcalcw.SetFlags(MHillasCalc::kCalcHillasSrc); 695 hcalcw2.SetFlags(MHillasCalc::kCalcHillasSrc); 696 hcalcw2.SetNameHillasSrc("MHillasSrcAnti"); 697 hcalcw2.SetNameSrcPosCam("MSrcPosAnti"); 698 if (fDataSetTrain.IsWobbleMode()) 699 { 700 // ******************************************************************* 701 // Possible source position (eg. Wobble Mode) 702 if (fDataSetTrain.HasSource()) 703 { 704 if (!fDataSetTrain.GetSourcePos(source)) 705 return -1; 706 *fLog << all; 707 source.Print("RaDec"); 708 } 709 else 710 *fLog << all << "No source position applied..." << endl; 711 712 // La Palma Magic1 713 plistx.AddToList(&obs); 714 plistx.AddToList(&source); 715 716 TList tlist2; 717 tlist2.Add(&scalc); 718 tlist2.Add(&scor); 719 tlist2.Add(&hcalcw); 720 tlist2.Add(&hcalcw2); 721 722 devcalc.SetStreamId("Starguider"); 723 tlist2.Add(&devcalc); 724 725 fill.AddPreTasks(tlist2); 726 // ******************************************************************* 727 } 658 728 659 729 // Setup the tool class to read the gammas and read them … … 689 759 690 760 MHillasCalc hcalc; 761 MHillasCalc hcalc2; 691 762 hcalc.SetFlags(MHillasCalc::kCalcHillasSrc); 763 hcalc2.SetFlags(MHillasCalc::kCalcHillasSrc); 764 hcalc2.SetNameHillasSrc("MHillasSrcAnti"); 765 hcalc2.SetNameSrcPosCam("MSrcPosAnti"); 692 766 693 767 if (fDataSetTrain.IsWobbleMode()) 694 768 { 769 scalc.SetMode(MSrcPosCalc::kWobble); // kWobble for off-source 770 fPreTasksSet[kTrainOff].AddFirst(&hcalc2); 695 771 fPreTasksSet[kTrainOff].AddFirst(&hcalc); 696 fPreTasksSet[kTrainOff].AddFirst(&srcrndm); 772 //fPreTasksSet[kTrainOff].AddFirst(&srcrndm); 773 fPreTasksSet[kTrainOff].AddFirst(&scor); 774 fPreTasksSet[kTrainOff].AddFirst(&scalc); 697 775 } 698 776 … … 765 843 *fLog << "Run-Time: " << Form("%.1f", clock.RealTime()/60) << "min (CPU: "; 766 844 *fLog << Form("%.1f", clock.CpuTime()/60) << "min)" << endl; 845 *fLog << endl; 767 846 *fLog << "Output file name: " << out << endl; 768 847 … … 837 916 // ----- Setup tasklist ----- 838 917 tlist.AddToList(&read2); 918 if (fDataSetTest.IsWobbleMode()) 919 { 920 tlist.AddToList(&srcrndm); 921 tlist.AddToList(&hcalc); 922 } 839 923 tlist.AddToList(&c1); 840 924 tlist.AddToList(fPreTasksSet[kTestOff]); … … 876 960 // replace the reading task by a new one 877 961 tlist.Replace(&read4); 962 963 if (fDataSetTest.IsWobbleMode()) 964 { 965 // ******************************************************************* 966 // Possible source position (eg. Wobble Mode) 967 if (fDataSetTest.HasSource()) 968 { 969 if (!fDataSetTest.GetSourcePos(source)) 970 return -1; 971 *fLog << all; 972 source.Print("RaDec"); 973 } 974 else 975 *fLog << all << "No source position applied..." << endl; 976 977 // La Palma Magic1 978 plist.AddToList(&obs); 979 plist.AddToList(&source); 980 981 // How to get source position from off- and on-data? 982 tlist.AddToListAfter(&scalc, &read4); 983 tlist.AddToListAfter(&scor, &scalc); 984 tlist.AddToListAfter(&hcalcw, &scor); 985 986 tlist.AddToList(&devcalc, "Starguider"); 987 // ******************************************************************* 988 } 878 989 879 990 // Add the PreTasksOn directly after the reading task
Note:
See TracChangeset
for help on using the changeset viewer.