Changeset 5841
- Timestamp:
- 01/14/05 14:50:06 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r5839 r5841 31 31 32 32 33 33 34 2005/01/14 Thomas Bretz 34 35 … … 69 70 * msignal/MExtractTimeFastSpline.cc: 70 71 - fixed delete --> delete[] 72 73 * mbadpixels/MBadPixelsCalc.cc: 74 - slight change to some output 75 76 * mbase/MTaskEnv.h: 77 - set name of default task when pointer is given 78 79 * mjobs/MJCalibrateSignal.cc: 80 - fixed handling of extraction range for various cases 81 - fixed handling in case no arrival times are calculated 82 83 * mjobs/MJCalibration.cc: 84 - write at least a default arrival time calibration container 85 to make further processing easier 86 87 * mjobs/MJPedestal.[h,cc]: 88 - fixed handling of extraction range for various cases 89 71 90 72 91 -
trunk/MagicSoft/Mars/NEWS
r5796 r5841 37 37 MTriggerPattern, MTriggerPatternDecode and MFTriggerPattern 38 38 39 - changed callisto to calculate two kinds of pedestals and pedestal rms: 39 - implemented filters to callisto to skip calibration events 40 41 - changed callisto to calculate three kinds of pedestals and pedestal rms: 40 42 + fundamental pedestal (MPedPhotFundamental): extracted directly from 41 43 the slices by statistics 42 44 + pedestal from extractor (MPedPhotFromExtractor): extracted with the 43 45 signal extractor without randomization 46 + random pedestal from extractor (MPedPhotFromExtractorRndm): extracted 47 with the signal extractor with randomization (extraction window is 48 randomly fixed) 44 49 The thir kind of pedestal is not yet implemented (for speed reasons) as 45 50 long as nobody really needs it: -
trunk/MagicSoft/Mars/mbadpixels/MBadPixelsCalc.cc
r5777 r5841 120 120 } 121 121 122 *fLog << inf << "Name of MPedPhotCam to get 'pedestal rms' from used: " << fNamePedPhotCam << endl;122 *fLog << inf << "Name of MPedPhotCam to get pedestal rms from: " << fNamePedPhotCam << endl; 123 123 if (fPedestalLevel) 124 124 *fLog << "Checking mean 'pedestal rms' against absolute value with level " << fPedestalLevel << endl; -
trunk/MagicSoft/Mars/mbase/MTaskEnv.h
r5557 r5841 32 32 void SetOwner(Bool_t b=kTRUE) { b ? SetBit(kIsOwner) : ResetBit(kIsOwner); } 33 33 34 void SetDefault(MTask *task) { fTask = task; if ( !task)SetBit(kIsDummy); }34 void SetDefault(MTask *task) { fTask = task; if (fTask) fTask->SetName(fName); else SetBit(kIsDummy); } 35 35 void SetDefault(const char *def); 36 36 -
trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc
r5810 r5841 177 177 // 178 178 // For more details see the class description and the corresponding Getters 179 // 179 // 180 180 Bool_t MJCalibrateSignal::CheckEnvLocal() 181 181 { … … 282 282 plist.AddToList(&calibcont); 283 283 284 pedcamab.SetName("MPedestalFundamental");285 plist.AddToList(&pedcamab);286 287 284 // Setup Tasklist 288 285 MTaskList tlist; … … 364 361 if (extractor1) 365 362 { 366 // FIXME: How to get the fixed value 15 automatically? 367 const Float_t win = extractor1->GetNumHiGainSamples(); 368 pedlo1.SetExtractWindow(15, (UShort_t)TMath::Nint(win)); 369 pedlo2.SetExtractWindow(15, (UShort_t)TMath::Nint(win)); 370 pedlo3.SetExtractWindow(15, (UShort_t)TMath::Nint(win)); 363 extractor1->SetPedestals(&pedcamab); 371 364 372 365 if (extractor1->InheritsFrom("MExtractTimeAndCharge")) … … 374 367 pedlo2.SetExtractor((MExtractTimeAndCharge*)extractor1); 375 368 pedlo3.SetExtractor((MExtractTimeAndCharge*)extractor1); 376 extractor1->SetPedestals(&pedcamab); 369 pedlo1.SetExtractWindow(15, 0/*obsolete*/); 370 pedlo2.SetExtractWindow(15, 0/*obsolete*/); 371 pedlo3.SetExtractWindow(15, 0/*obsolete*/); 377 372 } 378 } 373 else 374 { 375 // FIXME: How to get the fixed value 15 automatically? 376 const Int_t f = (Int_t)(15.5+extractor1->GetHiGainFirst()); 377 const Int_t n = (Int_t)(15.5+extractor1->GetNumHiGainSamples()); 378 pedlo1.SetExtractWindow(f, n); 379 pedlo2.SetExtractWindow(f, n); 380 pedlo3.SetExtractWindow(f, n); 381 } 382 } 383 if (extractor2) 384 extractor2->SetPedestals(&pedcamab); 379 385 380 386 MFCosmics fcosmics; … … 414 420 treat.AddNamePedPhotCam("MPedPhotFromExtractor"); 415 421 treat.AddNamePedPhotCam("MPedPhotFromExtractorRndm"); 422 if (!extractor2 && !extractor1->InheritsFrom("MExtractTimeAndCharge")) 423 treat.SetProcessTimes(kFALSE); 416 424 417 425 … … 461 469 write.AddContainer("MTime", "Events", kFALSE); 462 470 write.AddContainer("MRawEvtHeader", "Events"); 463 write.AddContainer("MArrivalTime", "Events" );471 write.AddContainer("MArrivalTime", "Events", kFALSE); 464 472 // Slow-Control: Current 465 473 write.AddContainer("MTimeCurrents", "Currents", kFALSE); … … 509 517 tlist2.AddToList(&fill2); 510 518 tlist2.AddToList(&calib); 511 tlist2.AddToList(&caltm); 519 if (extractor2 || extractor1->InheritsFrom("MExtractTimeAndCharge")) 520 tlist2.AddToList(&caltm); 512 521 tlist2.AddToList(&bpcal); 513 522 tlist2.AddToList(&treat); … … 516 525 tlist2.AddToList(&fill4); 517 526 tlist2.AddToList(&fill5); 518 tlist2.AddToList(&fill7); 527 if (extractor2 || extractor1->InheritsFrom("MExtractTimeAndCharge")) 528 tlist2.AddToList(&fill7); 519 529 520 530 // Setup List for Drive-tree -
trunk/MagicSoft/Mars/mjobs/MJCalibration.cc
r5810 r5841 1711 1711 { 1712 1712 taskenv2.SetDefault(fTimeExtractor); 1713 1713 1714 1714 if (IsRelTimes()) 1715 1715 tlist.AddToList(&taskenv2); … … 1760 1760 } 1761 1761 1762 if (!WriteTasks(taskenv.GetTask(), taskenv2.GetTask()))1762 if (!WriteTasks(taskenv.GetTask(), IsRelTimes() ? taskenv2.GetTask() : 0)) 1763 1763 return kFALSE; 1764 1764 … … 1995 1995 cont.Add(&fCalibrationPINDiode); 1996 1996 1997 if (IsRelTimes())1998 1997 //if (IsRelTimes()) 1998 cont.Add(IsIntensity() ? (TObject*)&fIntensRelTimeCam : (TObject*)&fRelTimeCam); 1999 1999 2000 2000 if (!geom) -
trunk/MagicSoft/Mars/mjobs/MJPedestal.cc
r5810 r5841 783 783 } 784 784 785 Bool_t MJPedestal::SetupExtractor(MParList &plist, MExtractPedestal &extped)786 {787 if (!fExtractor)788 return kTRUE;789 790 if (fExtractionType==kFundamental || !fExtractor->InheritsFrom("MExtractTimeAndCharge"))791 return kFALSE;792 793 extped.SetPedestalsIn(&fPedestalCamIn);794 extped.SetExtractor((MExtractTimeAndCharge*)fExtractor);795 extped.SetRandomCalculation(fExtractionType==kWithExtractorRndm);796 797 return kTRUE;798 }799 800 785 Bool_t MJPedestal::ProcessFile() 801 786 { … … 908 893 } 909 894 895 // ---------------------------------------------------------------------- 896 // Now we make sure, that in all cases the ranges are setup correctly 897 // ---------------------------------------------------------------------- 910 898 MTaskEnv taskenv("ExtractPedestal"); 911 899 switch (fExtractType) 912 900 { 901 case kUsePedRun: 902 // In case other than 'fundamental' second argument is obsolete 903 pedcalc.SetExtractWindow(0, 13); // kUsePedRun 904 taskenv.SetDefault(&pedcalc); 905 tlist.AddToList(&taskenv); 906 break; 907 913 908 case kUseData: 909 // In case other than 'fundamental' second argument is obsolete 910 pedlogain.SetExtractWindow(15, 28); // kUseData 914 911 taskenv.SetDefault(&pedlogain); 915 912 tlist.AddToList(&taskenv); 916 917 if (!SetupExtractor(plist, pedlogain))918 pedlogain.SetExtractWindow(15, (Int_t)TMath::Nint(fExtractor->GetNumHiGainSamples()));919 break;920 921 case kUsePedRun:922 taskenv.SetDefault(&pedcalc);923 tlist.AddToList(&taskenv);924 925 if (!SetupExtractor(plist, pedcalc))926 pedcalc.SetExtractWindow(fExtractor->GetHiGainFirst(), TMath::Nint(fExtractor->GetNumHiGainSamples()));927 913 break; 928 914 … … 940 926 } 941 927 928 pedcalc.SetPedestalsIn(&fPedestalCamIn); 929 pedlogain.SetPedestalsIn(&fPedestalCamIn); 930 931 // kFundamental 932 if (fExtractor) 933 { 934 if (!fExtractor->InheritsFrom("MExtractTimeAndCharge")) 935 { 936 const Float_t f = 0.5+fExtractor->GetHiGainFirst(); 937 const Float_t n = 0.5+fExtractor->GetNumHiGainSamples(); 938 pedcalc.SetExtractWindow((Int_t)f, (Int_t)n); 939 pedlogain.SetExtractWindow((Int_t)(15+f), (Int_t)(15+n)); 940 941 if (fExtractionType!=kFundamental) 942 { 943 *fLog << inf; 944 *fLog << "Signal extractor doesn't inherit from MExtractTimeAndCharge..." << endl; 945 *fLog << " --> falling back to fundamental pedestal extraction." << endl; 946 fExtractionType=kFundamental; 947 } 948 } 949 else 950 { 951 pedcalc.SetExtractor((MExtractTimeAndCharge*)fExtractor); 952 pedlogain.SetExtractor((MExtractTimeAndCharge*)fExtractor); 953 } 954 955 if (fExtractionType!=kFundamental) 956 { 957 pedcalc.SetRandomCalculation(fExtractionType==kWithExtractorRndm); 958 pedlogain.SetRandomCalculation(fExtractionType==kWithExtractorRndm); 959 } 960 } 961 962 /* 963 switch (fExtractType) 964 { 965 case kUseData: 966 *fLog << all << "TYPE: USEDATA " << fExtractor << endl; 967 taskenv.SetDefault(&pedlogain); 968 tlist.AddToList(&taskenv); 969 970 if (!SetupExtractor(plist, pedlogain)) 971 { 972 *fLog << all << "SETTING TO: " << fExtractor << " " << fExtractor->GetNumHiGainSamples() << endl; 973 fExtractor->Print(); 974 pedlogain.SetExtractWindow(15, (Int_t)TMath::Nint(fExtractor->GetNumHiGainSamples())); 975 } 976 break; 977 978 case kUsePedRun: 979 *fLog << all << "TYPE: USEPEDRUN " << fExtractor << endl; 980 taskenv.SetDefault(&pedcalc); 981 tlist.AddToList(&taskenv); 982 983 if (!SetupExtractor(plist, pedcalc)) 984 pedcalc.SetExtractWindow(fExtractor->GetHiGainFirst(), TMath::Nint(fExtractor->GetNumHiGainSamples())); 985 break; 986 987 case kUseHists: 988 if (!fExtractor) 989 { 990 *fLog << err << GetDescriptor() << " - ERROR: "; 991 *fLog << "Extraction Type is kUseHists, but no extractor was set" << endl; 992 return kFALSE; 993 } 994 995 tlist.AddToList(fExtractor); 996 tlist.AddToList(&fillped); 997 break; 998 } */ 999 942 1000 /* 943 1001 if (!fPathIn.IsNull())
Note:
See TracChangeset
for help on using the changeset viewer.