Changeset 8442 for trunk/MagicSoft/Mars/mjobs
- Timestamp:
- 04/24/07 15:28:08 (18 years ago)
- Location:
- trunk/MagicSoft/Mars/mjobs
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mjobs/MDataSet.h
r8441 r8442 120 120 // Setter 121 121 void SetMonteCarlo(Bool_t ismc=kTRUE) { fMonteCarlo=ismc; } 122 void SetWobbleMode(Bool_t wobm=kTRUE) { fWobbleMode=wobm; } 122 123 123 124 static Bool_t AddSequencesFromList(const TList &list, MDirIter &files); -
trunk/MagicSoft/Mars/mjobs/MJCut.cc
r8441 r8442 18 18 ! Author(s): Thomas Bretz, 1/2005 <mailto:tbretz@astro.uni-wuerzburg.de> 19 19 ! 20 ! Copyright: MAGIC Software Development, 2000-200 520 ! Copyright: MAGIC Software Development, 2000-2007 21 21 ! 22 22 ! … … 26 26 // 27 27 // MJCut 28 //29 // FIXME: Preparation for wobble mode missing30 28 // 31 29 ///////////////////////////////////////////////////////////////////////////// … … 86 84 // 87 85 // Default constructor. Set defaults for fStoreSummary, fStoreresult, 88 // fWriteOnly, f IsWobble and fFullDisplay to kFALSE and initialize86 // fWriteOnly, fFullDisplay to kFALSE and initialize 89 87 // /*fEstimateEnergy and*/ fCalcHadronness with NULL. 90 88 // 91 89 MJCut::MJCut(const char *name, const char *title) 92 90 : fStoreSummary(kFALSE), fStoreResult(kTRUE), fWriteOnly(kFALSE), 93 f IsWobble(kFALSE), fFullDisplay(kTRUE),91 fFullDisplay(kTRUE), 94 92 fRndmSrcPos(kFALSE), fNameHist("MHThetaSq"), fCalcHadronness(0), fCalcDisp(0) 95 93 { … … 330 328 EnableStorageOfSummary(GetEnv("SummaryFile", fStoreSummary)); 331 329 EnableStorageOfResult(GetEnv("ResultFile", fStoreResult)); 332 EnableWobbleMode(GetEnv("WobbleMode", fIsWobble));333 330 EnableFullDisplay(GetEnv("FullDisplay", fFullDisplay)); 334 331 EnableRandomSrcPos(GetEnv("RandomSourcePosition", fRndmSrcPos)); … … 551 548 MParList plist; 552 549 553 MHSrcPosCam hsrcpos( fIsWobble);554 if (! fIsWobble&& source.IsInitialized() && fRndmSrcPos)550 MHSrcPosCam hsrcpos(set.IsWobbleMode()); 551 if (!set.IsWobbleMode() && source.IsInitialized() && fRndmSrcPos) 555 552 { 556 553 if (!FillSrcPosCam(set, source, hsrcpos)) … … 614 611 MAlphaFitter fit; 615 612 plist.AddToList(&fit); 616 if ( fIsWobble)613 if (set.IsWobbleMode()) 617 614 fit.SetScaleMode(MAlphaFitter::kNone); 618 615 … … 643 640 644 641 MRead &readoff = set.IsMonteCarlo() ? (MRead&)readoffmc : (MRead&)readoffdata; 645 const Bool_t setrc = fIsWobble? set.AddFilesOn(readoff) : set.AddFilesOff(readoff);642 const Bool_t setrc = set.IsWobbleMode() ? set.AddFilesOn(readoff) : set.AddFilesOff(readoff); 646 643 if (!setrc && set.HasOffSequences()) 647 644 { 648 *fLog << err << "MDataSet::AddFiles" << ( fIsWobble?"On":"Off") << " failed." << endl;645 *fLog << err << "MDataSet::AddFiles" << (set.IsWobbleMode()?"On":"Off") << " failed." << endl; 649 646 return kFALSE; 650 647 } … … 699 696 // How to get source position from off- and on-data? 700 697 MSrcPosCalc scalc; 701 scalc.SetMode( fIsWobble?MSrcPosCalc::kWobble:MSrcPosCalc::kOffData); /********************/698 scalc.SetMode(set.IsWobbleMode()?MSrcPosCalc::kWobble:MSrcPosCalc::kOffData); /********************/ 702 699 703 700 MSrcPosCorrect scor; … … 716 713 tlist2.AddToList(&scor); 717 714 tlist2.AddToList(&srcrndm); 718 //if (fRndmSrcPos && ! fIsWobble)715 //if (fRndmSrcPos && !set.IsWobbleMode()) 719 716 // tlist2.AddToList(&fill0a); 720 717 tlist2.AddToList(&hcalc); 721 if ( fIsWobble)718 if (set.IsWobbleMode()) 722 719 tlist2.AddToList(&hcalc2); 723 720 //tlist2.AddToList(&taskenv1); … … 732 729 tlist2.AddToList(&fill1a); 733 730 tlist2.AddToList(&cont1); 734 if (!fWriteOnly && (! fIsWobble|| !fNameHistFS.IsNull()))731 if (!fWriteOnly && (!set.IsWobbleMode() || !fNameHistFS.IsNull())) 735 732 tlist2.AddToList(&ffs); 736 733 tlist2.AddToList(&cont2); … … 796 793 return kFALSE; 797 794 798 if (set.HasOffSequences() || fIsWobble)795 if (set.HasOffSequences() || set.IsWobbleMode()) 799 796 { 800 797 // Execute first analysis … … 852 849 fill7b.SetNameTab("NewPar"); 853 850 //fill9b.SetNameTab("EffOnT"); 854 fill1b.SetDrawOption(set.HasOffSequences()|| fIsWobble?"same":"");855 fill2b.SetDrawOption(set.HasOffSequences()|| fIsWobble?"same":"");856 fill3b.SetDrawOption(set.HasOffSequences()|| fIsWobble?"same":"");857 fill4b.SetDrawOption(set.HasOffSequences()|| fIsWobble?"same":"");858 fill5b.SetDrawOption(set.HasOffSequences()|| fIsWobble?"same":"");859 fill6b.SetDrawOption(set.HasOffSequences()|| fIsWobble?"same":"");860 fill7b.SetDrawOption(set.HasOffSequences()|| fIsWobble?"same":"");851 fill1b.SetDrawOption(set.HasOffSequences()||set.IsWobbleMode()?"same":""); 852 fill2b.SetDrawOption(set.HasOffSequences()||set.IsWobbleMode()?"same":""); 853 fill3b.SetDrawOption(set.HasOffSequences()||set.IsWobbleMode()?"same":""); 854 fill4b.SetDrawOption(set.HasOffSequences()||set.IsWobbleMode()?"same":""); 855 fill5b.SetDrawOption(set.HasOffSequences()||set.IsWobbleMode()?"same":""); 856 fill6b.SetDrawOption(set.HasOffSequences()||set.IsWobbleMode()?"same":""); 857 fill7b.SetDrawOption(set.HasOffSequences()||set.IsWobbleMode()?"same":""); 861 858 862 859 //fill9b.SetFilter(&fbin); … … 903 900 904 901 tlist.Replace(&readon); 905 if (fRndmSrcPos && ! fIsWobble)902 if (fRndmSrcPos && !set.IsWobbleMode()) 906 903 { 907 904 // tlist2.RemoveFromList(&fill0a); … … 911 908 MFillH fillsrc(&hsrcpos, "MSrcPosCam", "FillSrcPosCam"); 912 909 fillsrc.SetNameTab("SrcPos"); 913 if ( fIsWobble)910 if (set.IsWobbleMode()) 914 911 tlist2.AddToListBefore(&fillsrc, &hcalc); 915 912 … … 936 933 //if (!fIsMonteCarlo) 937 934 // tlist2.Replace(&fill9b); 938 if (! fIsWobble|| !fNameHist.IsNull())935 if (!set.IsWobbleMode() || !fNameHist.IsNull()) 939 936 tlist2.Replace(&ffs2); 940 if ( fIsWobble)937 if (set.IsWobbleMode()) 941 938 { 942 939 tlist2.AddToListAfter(&fillphi, &falpha2); -
trunk/MagicSoft/Mars/mjobs/MJCut.h
r8441 r8442 21 21 Bool_t fStoreResult; 22 22 Bool_t fWriteOnly; 23 Bool_t fIsWobble;24 23 Bool_t fFullDisplay; 25 24 Bool_t fRndmSrcPos; … … 59 58 void EnableStorageOfResult(Bool_t b=kTRUE) { fStoreResult = b; } // See SetNameResult 60 59 void EnableWriteOnly(Bool_t b=kTRUE) { fWriteOnly = b; } 61 void EnableWobbleMode(Bool_t b=kTRUE) { fIsWobble = b; }62 60 void EnableFullDisplay(Bool_t b=kTRUE) { fFullDisplay = b; } 63 61 void EnableRandomSrcPos(Bool_t b=kTRUE) { fRndmSrcPos = b; }
Note:
See TracChangeset
for help on using the changeset viewer.