Changeset 5308
- Timestamp:
- 10/22/04 16:03:04 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mjobs
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc
r5307 r5308 321 321 readreal.AddFiles(iter); 322 322 323 MReadMarsFile read("Events");324 read.DisableAutoScheme();323 //MReadMarsFile read("Events"); 324 //read.DisableAutoScheme(); 325 325 MRawFileRead rawread(NULL); 326 326 if (IsDataCheck()) 327 327 rawread.AddFiles(iter); 328 328 else 329 read .AddFiles(iter);329 readreal.AddFiles(iter); 330 330 331 331 MGeomApply apply; // Only necessary to create geometry … … 435 435 436 436 // Now setup main tasklist 437 tlist.AddToList(IsDataCheck() ? (MTask*)&rawread : (MTask*)&read );437 tlist.AddToList(IsDataCheck() ? (MTask*)&rawread : (MTask*)&readreal); 438 438 tlist.AddToList(&tlist2, IsDataCheck()?"All":"Events"); 439 439 if (!IsDataCheck()) -
trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.h
r5161 r5308 19 19 { 20 20 private: 21 Bool_t fIsDataCheck; 22 23 Bool_t CheckEnvLocal(); 24 21 25 Bool_t WriteResult(); 22 26 Bool_t ReadCalibration(TObjArray &o, MBadPixelsCam &bpix, 23 27 MTask* &ext1, MTask* &ext2, TString &geom) const; 28 29 Bool_t IsDataCheck() const { return fIsDataCheck; } 30 void SetDataCheck(Bool_t b) { fIsDataCheck = b; } 24 31 25 32 public: -
trunk/MagicSoft/Mars/mjobs/MJCalibration.cc
r5238 r5308 218 218 SetNoStorage ( kFALSE ); 219 219 SetHistsStorage ( kFALSE ); 220 220 } 221 222 void MJCalibration::DrawTab(MParList &plist, const char *cont, const char *name, Option_t *opt) 223 { 224 TObject *obj = plist.FindObject(cont); 225 if (!obj) 226 return; 227 228 fDisplay->AddTab(name); 229 obj->DrawClone(opt); 221 230 } 222 231 … … 264 273 void MJCalibration::DisplayResult(MParList &plist) 265 274 { 266 267 275 if (!fDisplay) 268 276 return; 277 278 TString drawoption = "nonew "; 279 if (fDisplayType == kDataCheckDisplay) 280 drawoption += "datacheck"; 281 if (fDisplayType == kFullDisplay) 282 drawoption += "all"; 283 284 if (IsUsePINDiode()) 285 DrawTab(plist, "MHCalibrationChargePINDiode", "PINDiode", drawoption); 286 if (IsUseBlindPixel()) 287 DrawTab(plist, "MHCalibrationChargeChargeBlindCam", "BlindPix", drawoption); 288 if (IsRelTimes()) 289 DrawTab(plist, "MHCalibrationRelTimeCam", "RelTime", drawoption); 290 DrawTab(plist, "MHCalibrationChargeCam", "Charge", drawoption); 269 291 270 292 // … … 325 347 326 348 if (IsIntensity()) 327 349 { 328 350 cam = (MCalibrationChargeCam*) fIntensCalibCam.GetCam(); 329 351 qecam = (MCalibrationQECam*) fIntensQECam.GetCam(); 330 352 relcam = (MCalibrationRelTimeCam*)fIntensRelTimeCam.GetCam(); 331 353 badcam = (MBadPixelsCam*) fIntensBadCam.GetCam(); 332 354 } 333 355 else 334 356 { 335 357 cam = &fCalibrationCam; 336 358 qecam = &fQECam; 337 359 relcam = &fRelTimeCam; 338 360 badcam = &fBadPixels; 339 361 } 340 362 341 363 // Fitted charge means and sigmas … … 478 500 { 479 501 480 TCanvas &c1 = fDisplay->AddTab("Fit .Charge");502 TCanvas &c1 = fDisplay->AddTab("FitCharge"); 481 503 c1.Divide(3, 3); 482 504 … … 713 735 // ARRIVAL TIMES 714 736 // 715 TCanvas &c3 = fDisplay->AddTab("A rrivalTimes");737 TCanvas &c3 = fDisplay->AddTab("AbsTimes"); 716 738 c3.Divide(2,3); 717 739 … … 922 944 if (IsRelTimes()) 923 945 { 924 TCanvas &c5 = fDisplay->AddTab("Rel .Times");946 TCanvas &c5 = fDisplay->AddTab("RelTimes"); 925 947 c5.Divide(2,3); 926 948 … … 997 1019 998 1020 // Charges 999 TCanvas &c11 = fDisplay->AddTab("Fit .Charge");1021 TCanvas &c11 = fDisplay->AddTab("FitCharge"); 1000 1022 c11.Divide(2, 4); 1001 1023 … … 1004 1026 1005 1027 // Reduced Sigmas 1006 TCanvas &c12 = fDisplay->AddTab("Red .Sigma");1028 TCanvas &c12 = fDisplay->AddTab("RedSigma"); 1007 1029 c12.Divide(2,4); 1008 1030 … … 1045 1067 1046 1068 // Abs. Times 1047 TCanvas &c16 = fDisplay->AddTab("Abs .Times");1069 TCanvas &c16 = fDisplay->AddTab("AbsTimes"); 1048 1070 c16.Divide(2,3); 1049 1071 … … 1054 1076 { 1055 1077 // Rel. Times 1056 TCanvas &c17 = fDisplay->AddTab("Rel .Times");1078 TCanvas &c17 = fDisplay->AddTab("RelTimes"); 1057 1079 c17.Divide(2,4); 1058 1080 … … 1075 1097 1076 1098 // Charges 1077 TCanvas &c21 = fDisplay->AddTab("Fit .Charge");1099 TCanvas &c21 = fDisplay->AddTab("FitCharge"); 1078 1100 c21.Divide(2, 4); 1079 1101 … … 1082 1104 1083 1105 // Reduced Sigmas 1084 TCanvas &c23 = fDisplay->AddTab("Red .Sigma");1106 TCanvas &c23 = fDisplay->AddTab("RedSigma"); 1085 1107 c23.Divide(2,4); 1086 1108 … … 1142 1164 1143 1165 // Abs. Times 1144 TCanvas &c30 = fDisplay->AddTab("Abs .Times");1166 TCanvas &c30 = fDisplay->AddTab("AbsTimes"); 1145 1167 c30.Divide(2,3); 1146 1168 … … 1151 1173 { 1152 1174 // Rel. Times 1153 TCanvas &c31 = fDisplay->AddTab("Rel .Times");1175 TCanvas &c31 = fDisplay->AddTab("RelTimes"); 1154 1176 c31.Divide(3,5); 1155 1177 … … 1159 1181 1160 1182 // Time Defects 1161 TCanvas &c32 = fDisplay->AddTab(" Time Def.");1183 TCanvas &c32 = fDisplay->AddTab("DefTime"); 1162 1184 c32.Divide(2,2); 1163 1185 … … 1318 1340 // MJCalibration.Display: full, datacheck, normal 1319 1341 // MJCalibration.RelTimeCalibration: yes,no 1320 // MJCalibration.Data check: yes,no1342 // MJCalibration.DataCheck: yes,no 1321 1343 // MJCalibration.Debug: yes,no 1322 1344 // MJCalibration.Intensity: yes,no … … 1339 1361 SetRelTimeCalibration(GetEnv("RelTimeCalibration", IsRelTimes())); 1340 1362 SetIntensity(GetEnv("IntensityCalibration", IsIntensity())); 1341 SetDataCheck(GetEnv("Data check", IsDataCheck()));1363 SetDataCheck(GetEnv("DataCheck", IsDataCheck())); 1342 1364 SetDebug(GetEnv("Debug", IsDebug())); 1343 1365 … … 1496 1518 if (fSequence.IsValid()) 1497 1519 { 1498 const Int_t n0 = fSequence.SetupCalRuns(iter, fPathData, IsDataCheck());1520 const Int_t n0 = fSequence.SetupCalRuns(iter, fPathData, "C", IsDataCheck()); 1499 1521 const Int_t n1 = fSequence.GetNumCalRuns(); 1500 1522 if (n0==0) … … 1522 1544 // 1523 1545 if (IsIntensity()) 1524 1546 { 1525 1547 plist.AddToList(&fIntensQECam); 1526 1548 plist.AddToList(&fIntensCalibCam); … … 1529 1551 plist.AddToList(&fIntensRelTimeCam); 1530 1552 plist.AddToList(&fIntensBadCam); 1531 1553 } 1532 1554 else 1533 1555 { 1534 1556 plist.AddToList(&fQECam); 1535 1557 plist.AddToList(&fCalibrationCam); … … 1537 1559 plist.AddToList(&fCalibrationPINDiode); 1538 1560 plist.AddToList(&fRelTimeCam); 1539 1561 } 1540 1562 1541 1563 // … … 1548 1570 plist.AddToList(&blindcam); 1549 1571 if (IsRelTimes()) 1550 plist.AddToList(&reltimecam);1572 plist.AddToList(&reltimecam); 1551 1573 // 1552 1574 // Data Reading tasks … … 1602 1624 MFillH fillcam("MHCalibrationChargeCam", "MExtractedSignalCam", "FillChargeCam"); 1603 1625 MFillH filltme("MHCalibrationRelTimeCam", "MArrivalTimeCam", "FillRelTime"); 1604 fillpin.SetNameTab("PINDiode"); 1605 fillbnd.SetNameTab("BlindPix"); 1606 fillcam.SetNameTab("Charge"); 1607 filltme.SetNameTab("RelTimes"); 1608 1609 TString drawoption; 1626 fillpin.SetBit(MFillH::kDoNotDisplay); 1627 fillbnd.SetBit(MFillH::kDoNotDisplay); 1628 fillcam.SetBit(MFillH::kDoNotDisplay); 1629 filltme.SetBit(MFillH::kDoNotDisplay); 1630 /* 1631 1632 fillpin.SetNameTab("PINDiode"); 1633 fillbnd.SetNameTab("BlindPix"); 1634 fillcam.SetNameTab("Charge"); 1635 filltme.SetNameTab("RelTimes"); 1636 1637 TString drawoption; 1610 1638 1611 1639 if (fDisplayType == kDataCheckDisplay) … … 1618 1646 fillpin.SetDrawOption(drawoption.Data()); 1619 1647 filltme.SetDrawOption(drawoption.Data()); 1620 1648 */ 1621 1649 // 1622 1650 // Apply a filter against cosmics … … 1699 1727 tlist.PrintStatistics(); 1700 1728 1701 //1702 // The next lines are necessary in order to avoid that1703 // the last entry drawn by MFillH gets deleted again from1704 // the display. No idea where this comes from...1705 //1706 // FIND THE REASON! THE NEXT CHANGE SOMEBODY DOES MIGHT RESULT1707 // IN __YOUR__ WORKAROUN NOT WORKING IF IT IS NOT CLEANLY DONE!1708 //1709 // THE AUTHOR OF MFILLH SHOULD FIND THE REASON INSTEAD OF DELETING1710 // CODE WITHOUT INFORMING THE DATACHECK PEOPLE - SORRY, I SPENT1711 // TOO MANY DAYS TRYING TO FIND THIS REASON!1712 //1713 // There is NO BUG-REPORT! And no code has been deleted! And1714 // there is NO hint who wrote this work around and should1715 // be informed! Maybe the author of a WORKAROUND should contact1716 // the author of a class which he/she identified not working1717 // correctly instead of vice versa!1718 //1719 if (fDisplay)1720 {1721 if (IsUsePINDiode())1722 {1723 MHCalibrationChargePINDiode *pin =1724 (MHCalibrationChargePINDiode*)plist.FindObject("MHCalibrationChargePINDiode");1725 pin->DrawClone(Form("nonew %s",drawoption.Data()));1726 }1727 else if (IsUseBlindPixel())1728 {1729 MHCalibrationChargeBlindCam *cam =1730 (MHCalibrationChargeBlindCam*)plist.FindObject("MHCalibrationChargeBlindCam");1731 cam->DrawClone(Form("nonew %s",drawoption.Data()));1732 }1733 else if (IsRelTimes())1734 {1735 MHCalibrationRelTimeCam *cam =1736 (MHCalibrationRelTimeCam*)plist.FindObject("MHCalibrationRelTimeCam");1737 cam->DrawClone(Form("nonew %s",drawoption.Data()));1738 }1739 else1740 chargecam.DrawClone(Form("nonew %s",drawoption.Data()));1741 }1742 1743 1729 DisplayResult(plist); 1744 1730 … … 1982 1968 Bool_t MJCalibration::WriteHists(MParList &plist) 1983 1969 { 1984 1985 1970 if (fPathOut.IsNull()) 1986 1971 return kTRUE; … … 2002 1987 cont.Add(plist.FindObject("MHCalibrationChargePINDiode")); 2003 1988 if (IsRelTimes()) 2004 cont.Add(plist.FindObject("MHCalibrationRelTimeCam"));1989 cont.Add(plist.FindObject("MHCalibrationRelTimeCam")); 2005 1990 2006 1991 return WriteContainer(cont); -
trunk/MagicSoft/Mars/mjobs/MJCalibration.h
r5236 r5308 142 142 Bool_t IsNoStorage () const { return TESTBIT(fStorage,kNoStorage); } 143 143 Bool_t IsHistsStorage () const { return TESTBIT(fStorage,kHistsStorage); } 144 145 void DrawTab(MParList &plist, const char *cont, const char *name, Option_t *opt); 144 146 145 147 void DisplayResult ( MParList &plist ); -
trunk/MagicSoft/Mars/mjobs/MJPedestal.cc
r5298 r5308 487 487 // 488 488 // The following resource options are available: 489 // Prefix.DataCheckDisplay: Yes, No 490 // Prefix.DataCheck: Yes, No 491 // Prefix.UseData: Yes, No 492 // Prefix.DisableOutput: Yes, No 489 // 490 // Do a datacheck run (read raw-data and enable display) 491 // Prefix.DataCheck: Yes, No <default> 492 // 493 // Show data check display 494 // Prefix.DataCheckDisplay: Yes, No <default> 495 // 496 // Use cosmic data instead of pedestal data (DatRuns) 497 // Prefix.UseData: Yes, No <default> 498 // 499 // Write an output file with pedestals and status-display 500 // Prefix.DisableOutput: Yes, No <default> 493 501 // 494 502 Bool_t MJPedestal::CheckEnvLocal() 495 503 { 504 SetDataCheck(GetEnv("DataCheck", fDataCheck)); 496 505 if (HasEnv("DataCheckDisplay")) 497 506 fDisplayType = GetEnv("DataCheckDisplay", kFALSE) ? kDataCheckDisplay : kNormalDisplay; 498 499 SetDataCheck(GetEnv("DataCheck", fDataCheck));500 507 SetUseData(GetEnv("UseData", fUseData)); 501 508 SetNoStorage(GetEnv("DisableOutput", IsNoStorage())); … … 607 614 MRawFileRead rawread(NULL); 608 615 616 cout << "DATACHECK: " << (fDataCheck?"yes":"no") << endl; 617 609 618 MDirIter iter; 610 619 if (fSequence.IsValid()) 611 620 { 612 const Int_t n0 = fUseData ? fSequence.SetupDatRuns(iter, fPathData, fDataCheck) : fSequence.SetupPedRuns(iter, fPathData, fDataCheck);621 const Int_t n0 = fUseData ? fSequence.SetupDatRuns(iter, fPathData, "D", fDataCheck) : fSequence.SetupPedRuns(iter, fPathData, "P", fDataCheck); 613 622 const Int_t n1 = fUseData ? fSequence.GetNumDatRuns() : fSequence.GetNumPedRuns(); 614 623 if (n0==0)
Note:
See TracChangeset
for help on using the changeset viewer.