Changeset 5760 for trunk/MagicSoft/Mars/mjobs
- Timestamp:
- 01/10/05 10:45:07 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mjobs
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc
r5732 r5760 180 180 } 181 181 182 Bool_t MJCalibrateSignal::ProcessFile(MPedestalCam &pedcamab, MPedestalCam &pedcam )182 Bool_t MJCalibrateSignal::ProcessFile(MPedestalCam &pedcamab, MPedestalCam &pedcam2/*, MPedestalCam &pedcam*/) 183 183 { 184 184 if (!fSequence.IsValid()) … … 276 276 plist.AddToList(this); // take care of fDisplay! 277 277 plist.AddToList(&badcam); 278 plist.AddToList(&pedcam);279 278 plist.AddToList(&calibcont); 280 279 … … 323 322 MBadPixelsMerge merge(&badpix); 324 323 325 MPedCalcFromLoGain pedlo1("MPedCalcMeanFromLoGain"); 324 // Make sure that pedcamab has the correct name 325 pedcamab.SetName("MPedestalFundamental"); 326 //pedcam.SetName("MPedestalFromExtractorRndm"); 327 pedcam2.SetName("MPedestalFromExtractor"); 328 //plist.AddToList(&pedcam); 329 plist.AddToList(&pedcam2); 330 plist.AddToList(&pedcamab); 331 332 MPedCalcFromLoGain pedlo1("MPedCalcFundamental"); 326 333 pedlo1.SetPedestalUpdate(kTRUE); 327 pedlo1.SetPedestalsOut(&pedcamab); 328 329 MPedCalcFromLoGain pedlo2("MPedCalcRmsFromLoGain"); 330 pedlo2.SetPedestalUpdate(kTRUE); 331 pedlo2.SetPedestalsIn(&pedcamab); 334 pedlo1.SetNamePedestalCamOut("MPedestalFundamental"); 335 /* 336 MPedCalcFromLoGain pedlo2("MPedCalcWithExtractorRndm"); 337 pedlo2.SetPedestalUpdate(kTRUE); 338 pedlo2.SetRandomCalculation(kTRUE); 339 pedlo2.SetNamePedestalCamIn("MPedestalFundamental"); 340 pedlo2.SetNamePedestalCamOut("MPedestalFromExtractorRndm"); 341 */ 342 343 MPedCalcFromLoGain pedlo3("MPedCalcWithExtractor"); 344 pedlo3.SetPedestalUpdate(kTRUE); 345 pedlo3.SetRandomCalculation(kFALSE); 346 pedlo3.SetNamePedestalCamIn("MPedestalFundamental"); 347 pedlo3.SetNamePedestalCamOut("MPedestalFromExtractor"); 332 348 333 349 if (extractor1) … … 336 352 const Float_t win = extractor1->GetNumHiGainSamples(); 337 353 pedlo1.SetExtractWindow(15, (UShort_t)TMath::Nint(win)); 338 pedlo2.SetExtractWindow(15, (UShort_t)TMath::Nint(win)); 354 //pedlo2.SetExtractWindow(15, (UShort_t)TMath::Nint(win)); 355 pedlo3.SetExtractWindow(15, (UShort_t)TMath::Nint(win)); 339 356 340 357 if (extractor1->InheritsFrom("MExtractTimeAndCharge")) 341 358 { 342 pedlo2.SetExtractor((MExtractTimeAndCharge*)extractor1); 359 //pedlo2.SetExtractor((MExtractTimeAndCharge*)extractor1); 360 pedlo3.SetExtractor((MExtractTimeAndCharge*)extractor1); 343 361 extractor1->SetPedestals(&pedcamab); 344 362 } … … 355 373 calib.SetCalibrationMode(MCalibrateData::kFfactor); 356 374 calib.SetPedestalFlag(MCalibrateData::kRun); 375 // FIXME: What to do for MC files??? 376 calib.AddPedestal("MPedestalCam", "MPedPhotFundamental"); 377 calib.AddPedestal("MPedestalCam", "MPedPhotFromExtractor"); 378 //calib.AddPedestal("MPedestalCam", "MPedPhotFromExtractorRndm"); 357 379 } 358 380 else 359 381 { 360 calib.AddPedestal("MPedestalCam", "MPedPhotFromExtractorRndm");361 382 calib.AddPedestal("Fundamental"); 383 calib.AddPedestal("FromExtractor"); 384 //calib.AddPedestal("FromExtractorRndm"); 362 385 calib.SetPedestalFlag(MCalibrateData::kEvent); 363 386 } … … 366 389 MBadPixelsCalc bpcal; 367 390 MBadPixelsTreat treat; 391 392 bpcal.SetNamePedPhotCam("MPedPhotFromExtractor"); 393 treat.AddNamePedPhotCam("MPedPhotFundamental"); 394 treat.AddNamePedPhotCam("MPedPhotFromExtractor"); 395 //treat.AddNamePedPhotCam("MPedPhotFromExtractorRndm"); 396 368 397 369 398 MHCamEvent evt0(0, "PedFLG", "Pedestal from Lo Gain;;P [fadc/sl]"); … … 383 412 evt7.EnableVariance(); 384 413 385 MFillH fill0(&evt0, &pedcamab,"FillPedFLG");386 MFillH fill1(&evt1, "MPedestal Cam","FillPedRmsFLG");387 MFillH fill2(&evt2, "MExtractedSignalCam", "FillExtracted");388 MFillH fill3(&evt3, "MPedPhot Cam","FillPedPhot");389 MFillH fill4(&evt4, "MPedPhotFromExtractor Rndm","FillPedRMS");390 MFillH fill5(&evt5, "MCerPhotEvt", "FillInterpolated");391 MFillH fill6(&evt6, "MBadPixelsCam", "FillUnsuitable");392 MFillH fill7(&evt7, "MArrivalTime", "FillTimes");414 MFillH fill0(&evt0, "MPedestalFundamental", "FillPedFLG"); 415 MFillH fill1(&evt1, "MPedestalFromExtractor", "FillPedRmsFLG"); 416 MFillH fill2(&evt2, "MExtractedSignalCam", "FillExtracted"); 417 MFillH fill3(&evt3, "MPedPhotFundamental", "FillPedPhot"); 418 MFillH fill4(&evt4, "MPedPhotFromExtractor", "FillPedRMS"); 419 MFillH fill5(&evt5, "MCerPhotEvt", "FillInterpolated"); 420 MFillH fill6(&evt6, "MBadPixelsCam", "FillUnsuitable"); 421 MFillH fill7(&evt7, "MArrivalTime", "FillTimes"); 393 422 394 423 // The second rule is for the case reading raw-files! 395 424 MWriteRootFile write(2, Form("%s{s/_D_/_Y_}{s/.raw$/.root}", fPathOut.Data()), fOverwrite); 396 425 // Run Header 397 write.AddContainer("MRawRunHeader", "RunHeaders");398 write.AddContainer("MBadPixelsCam", "RunHeaders");399 write.AddContainer("MGeomCam", "RunHeaders");426 write.AddContainer("MRawRunHeader", "RunHeaders"); 427 write.AddContainer("MBadPixelsCam", "RunHeaders"); 428 write.AddContainer("MGeomCam", "RunHeaders"); 400 429 // Monte Carlo Headers 401 write.AddContainer("MMcTrigHeader", "RunHeaders", kFALSE);402 write.AddContainer("MMcConfigRunHeader", "RunHeaders", kFALSE);403 write.AddContainer("MMcCorsikaRunHeader", "RunHeaders", kFALSE);430 write.AddContainer("MMcTrigHeader", "RunHeaders", kFALSE); 431 write.AddContainer("MMcConfigRunHeader", "RunHeaders", kFALSE); 432 write.AddContainer("MMcCorsikaRunHeader", "RunHeaders", kFALSE); 404 433 // Monte Carlo 405 write.AddContainer("MMcEvt", "Events",kFALSE);406 write.AddContainer("MMcTrig", "Events",kFALSE);434 write.AddContainer("MMcEvt", "Events", kFALSE); 435 write.AddContainer("MMcTrig", "Events", kFALSE); 407 436 // Data 408 write.AddContainer("MCerPhotEvt", "Events"); 409 write.AddContainer("MPedPhotCam", "Events"); 410 write.AddContainer("MPedPhotFromExtractorRndm", "Events"); 411 write.AddContainer("MTime", "Events", kFALSE); 412 write.AddContainer("MRawEvtHeader", "Events"); 413 write.AddContainer("MArrivalTime", "Events"); 437 write.AddContainer("MCerPhotEvt", "Events"); 438 write.AddContainer("MPedPhotFundamental", "Events"); 439 write.AddContainer("MPedPhotFromExtractor", "Events"); 440 //write.AddContainer("MPedPhotFromExtractorRndm", "Events"); 441 write.AddContainer("MTime", "Events", kFALSE); 442 write.AddContainer("MRawEvtHeader", "Events"); 443 write.AddContainer("MArrivalTime", "Events"); 414 444 // Slow-Control: Current 415 write.AddContainer("MTimeCurrents", "Currents",kFALSE);416 write.AddContainer("MCameraDC", "Currents",kFALSE);417 write.AddContainer("MReportCurrents", "Currents",kFALSE);445 write.AddContainer("MTimeCurrents", "Currents", kFALSE); 446 write.AddContainer("MCameraDC", "Currents", kFALSE); 447 write.AddContainer("MReportCurrents", "Currents", kFALSE); 418 448 // Slow-Control: Camera 419 write.AddContainer("MReportCamera", "Camera",kFALSE);420 write.AddContainer("MTimeCamera", "Camera",kFALSE);421 write.AddContainer("MCameraAUX", "Camera",kFALSE);422 write.AddContainer("MCameraCalibration", "Camera",kFALSE);423 write.AddContainer("MCameraCooling", "Camera",kFALSE);424 write.AddContainer("MCameraHV", "Camera",kFALSE);425 write.AddContainer("MCameraLV", "Camera",kFALSE);426 write.AddContainer("MCameraLids", "Camera",kFALSE);449 write.AddContainer("MReportCamera", "Camera", kFALSE); 450 write.AddContainer("MTimeCamera", "Camera", kFALSE); 451 write.AddContainer("MCameraAUX", "Camera", kFALSE); 452 write.AddContainer("MCameraCalibration", "Camera", kFALSE); 453 write.AddContainer("MCameraCooling", "Camera", kFALSE); 454 write.AddContainer("MCameraHV", "Camera", kFALSE); 455 write.AddContainer("MCameraLV", "Camera", kFALSE); 456 write.AddContainer("MCameraLids", "Camera", kFALSE); 427 457 // Slow-Control: Trigger 428 write.AddContainer("MReportTrigger", "Trigger",kFALSE);429 write.AddContainer("MTimeTrigger", "Trigger",kFALSE);458 write.AddContainer("MReportTrigger", "Trigger", kFALSE); 459 write.AddContainer("MTimeTrigger", "Trigger", kFALSE); 430 460 // Slow-Control: Drive 431 write.AddContainer("MPointingPos", "Drive",kFALSE);432 write.AddContainer("MReportDrive", "Drive",kFALSE);433 write.AddContainer("MTimeDrive", "Drive",kFALSE);461 write.AddContainer("MPointingPos", "Drive", kFALSE); 462 write.AddContainer("MReportDrive", "Drive", kFALSE); 463 write.AddContainer("MTimeDrive", "Drive", kFALSE); 434 464 // Slow-Control: Central Control 435 write.AddContainer("MReportCC", "CC",kFALSE);436 write.AddContainer("MTimeCC", "CC",kFALSE);465 write.AddContainer("MReportCC", "CC", kFALSE); 466 write.AddContainer("MTimeCC", "CC", kFALSE); 437 467 438 468 // Now setup tasklist for events … … 445 475 { 446 476 tlist2.AddToList(&pedlo1); 447 tlist2.AddToList(&pedlo2); 477 //tlist2.AddToList(&pedlo2); 478 tlist2.AddToList(&pedlo3); 448 479 } 449 480 tlist2.AddToList(&fill0); -
trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.h
r5570 r5760 34 34 MJCalibrateSignal(const char *name=NULL, const char *title=NULL); 35 35 36 Bool_t ProcessFile(MPedestalCam &camab, MPedestalCam &cam );36 Bool_t ProcessFile(MPedestalCam &camab, MPedestalCam &cam2/*, MPedestalCam &cam2*/); 37 37 38 38 ClassDef(MJCalibrateSignal, 0) // Tool to create a pedestal file (MPedestalCam) -
trunk/MagicSoft/Mars/mjobs/MJCalibration.cc
r5570 r5760 1563 1563 // Input containers 1564 1564 // 1565 pedcam.SetName("MPedestalCam"); 1565 1566 plist.AddToList(&pedcam); 1566 1567 plist.AddToList(&fBadPixels); -
trunk/MagicSoft/Mars/mjobs/MJPedestal.cc
r5570 r5760 113 113 MJPedestal::MJPedestal(const char *name, const char *title) 114 114 : fRuns(0), fExtractor(NULL), fDisplayType(kNormalDisplay), 115 fDataCheck(kFALSE), fExtractType(kUsePedRun) 115 fDataCheck(kFALSE), fExtractType(kUsePedRun), fExtractionType(kFundamental) 116 116 { 117 117 fName = name ? name : "MJPedestal"; … … 121 121 SetUsePedRun(); 122 122 SetPathIn(""); 123 SetExtractorResolution(kFALSE);124 123 } 125 124 … … 298 297 } 299 298 300 if (fExtract orResolution)299 if (fExtractionType!=kFundamental/*fExtractorResolution*/) 301 300 { 302 301 for (UInt_t i=0;i<geomcam.GetNumPixels();i++) … … 338 337 // Display data 339 338 // 340 if (fDisplayType != kDataCheckDisplay && fExtractType != kUseHists && !fExtractorResolution)339 if (fDisplayType != kDataCheckDisplay && fExtractType != kUseHists && fExtractionType==kFundamental/*fExtractorResolution*/) 341 340 { 342 341 TCanvas &c3 = fDisplay->AddTab("Pedestals"); … … 381 380 { 382 381 383 TCanvas &c3 = fDisplay->AddTab(fExtract orResolution? "PedExtrd" : "Ped");382 TCanvas &c3 = fDisplay->AddTab(fExtractionType!=kFundamental/*fExtractorResolution*/ ? "PedExtrd" : "Ped"); 384 383 c3.Divide(2,3); 385 384 … … 391 390 // for the datacheck, fix the ranges!! 392 391 // 393 if ( !fExtractorResolution)392 if (fExtractionType==kFundamental/*!fExtractorResolution*/) 394 393 { 395 394 obj1->SetMinimum(fgPedestalMin); … … 535 534 } 536 535 537 if (fExtract orResolution)536 if (fExtractionType!=kFundamental/*fExtractorResolution*/) 538 537 { 539 538 … … 674 673 void MJPedestal::SetExtractor(MExtractor* ext) 675 674 { 676 if (fExtractor) 677 delete fExtractor; 678 fExtractor = ext ? (MExtractor*)ext->Clone(ext->GetName()) : NULL; 675 if (ext) 676 { 677 if (fExtractor) 678 delete fExtractor; 679 fExtractor = ext ? (MExtractor*)ext->Clone(ext->GetName()) : NULL; 680 } 681 else 682 fExtractor = 0; 679 683 } 680 684 … … 709 713 fExtractType = kUseHists; 710 714 711 SetExtractorResolution(GetEnv("ExtractorResolution", fExtractorResolution));715 //fExtractorResolution = GetEnv("ExtractionType", fExtractorResolution); 712 716 713 717 SetNoStorage(GetEnv("DisableOutput", IsNoStorage())); … … 784 788 return kTRUE; 785 789 786 if ( !fExtractorResolution|| !fExtractor->InheritsFrom("MExtractTimeAndCharge"))790 if (fExtractionType==kFundamental || !fExtractor->InheritsFrom("MExtractTimeAndCharge")) 787 791 return kFALSE; 788 792 789 793 extped.SetPedestalsIn(&fPedestalCamIn); 790 794 extped.SetExtractor((MExtractTimeAndCharge*)fExtractor); 795 extped.SetRandomCalculation(fExtractionType==kWithExtractorRndm); 791 796 792 797 return kTRUE; -
trunk/MagicSoft/Mars/mjobs/MJPedestal.h
r5557 r5760 59 59 Extract_t fExtractType; // Chosen extractor type 60 60 61 Bool_t fExtractorResolution; // Flag if the extractor is used to calculate the pedestals 61 enum Extraction { kFundamental, kWithExtractorRndm, kWithExtractor }; 62 Int_t fExtractionType; // Flag if the extractor is used to calculate the pedestals 62 63 63 64 MExtractor *ReadCalibration() const; … … 102 103 void SetDataCheckDisplay() { fDisplayType = kDataCheckDisplay; } 103 104 void SetNormalDisplay() { fDisplayType = kNormalDisplay; } 104 void SetExtractorResolution(const Bool_t b=kTRUE) { fExtractorResolution = b; } 105 106 void SetExtractionFundamental() { fExtractionType=kFundamental; } 107 void SetExtractionWithExtractorRndm() { fExtractionType=kWithExtractorRndm; } 108 void SetExtractionWithExtractor() { fExtractionType=kWithExtractor; } 105 109 106 110 MExtractor *GetExtractor() const { return fExtractor; } -
trunk/MagicSoft/Mars/mjobs/MJStar.cc
r5309 r5760 185 185 */ 186 186 //MBadPixelsMerge merge(&badpix); 187 MImgCleanStd clean; 187 MImgCleanStd clean; 188 clean.SetNamePedPhotCam("MPedPhotFromExtractor"); 189 188 190 MHillasCalc hcalc; 189 191
Note:
See TracChangeset
for help on using the changeset viewer.