Changeset 13823
- Timestamp:
- 05/23/12 10:00:21 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/gui/FactGui.h
r13766 r13823 28 28 #include "src/DimData.h" 29 29 30 #ifdef HAVE_ROOT 30 31 #include "TROOT.h" 31 32 #include "TSystem.h" … … 37 38 #include "TMarker.h" 38 39 #include "TColor.h" 40 #endif 39 41 40 42 #include "QCameraWidget.h" … … 1019 1021 } 1020 1022 1021 c->cd();1022 1023 1023 if (!hf) 1024 1024 { … … 1047 1047 h->SetMarkerColor(kBlue); 1048 1048 1049 hf->Draw("");1049 c->GetListOfPrimitives()->Add(hf, ""); 1050 1050 1051 1051 if (dynamic_cast<TH2*>(h)) 1052 h->Draw("col same");1052 c->GetListOfPrimitives()->Add(h, "col same"); 1053 1053 } 1054 1054 … … 1077 1077 d0->SetMarkerColor(kRed); 1078 1078 d0->SetLineColor(kRed); 1079 d0->Draw("PEX0same");1079 c->GetListOfPrimitives()->Add(d0, "PEX0same"); 1080 1080 } 1081 1081 … … 1088 1088 d1->SetMarkerColor(kMagenta); 1089 1089 d1->SetLineColor(kMagenta); 1090 d1->Draw("PEX0same");1090 c->GetListOfPrimitives()->Add(d1, "PEX0same"); 1091 1091 } 1092 1092 … … 1099 1099 d2->SetMarkerColor(kGreen); 1100 1100 d2->SetLineColor(kGreen); 1101 d2->Draw("PEX0same");1101 c->GetListOfPrimitives()->Add(d2, "PEX0same"); 1102 1102 } 1103 1103 1104 1104 if (!dynamic_cast<TH2*>(h) && !c->GetListOfPrimitives()->FindObject(h)) 1105 h->Draw("PLsame");1105 c->GetListOfPrimitives()->Add(h, "PLsame"); 1106 1106 1107 1107 // ----------------------------------------------------------- … … 1283 1283 const double scale = 0.9*(m-l)/mm; 1284 1284 1285 c->cd();1286 1287 1285 DrawHorizontal(hf, l, h2, scale); 1288 1286 DrawHorizontal(hf, l, h1, scale); … … 1918 1916 TCanvas *c = fFtmRateCanv->GetCanvas(); 1919 1917 1918 TList * l = c->GetListOfPrimitives(); 1919 1920 1920 1921 while (c->FindObject("PatchRate")) 1921 c->GetListOfPrimitives()->Remove(c->FindObject("PatchRate"));1922 l->Remove(c->FindObject("PatchRate")); 1922 1923 1923 1924 while (c->FindObject("BoardRate")) 1924 c->GetListOfPrimitives()->Remove(c->FindObject("BoardRate")); 1925 1926 c->cd(); 1925 l->Remove(c->FindObject("BoardRate")); 1927 1926 1928 1927 if (fRatePatch1->value()>=0) … … 1930 1929 fGraphPatchRate[fRatePatch1->value()].SetLineColor(kRed); 1931 1930 fGraphPatchRate[fRatePatch1->value()].SetMarkerColor(kRed); 1932 fGraphPatchRate[fRatePatch1->value()].Draw("PL");1931 l->Add(&fGraphPatchRate[fRatePatch1->value()], "PL"); 1933 1932 } 1934 1933 if (fRatePatch2->value()>=0) … … 1936 1935 fGraphPatchRate[fRatePatch2->value()].SetLineColor(kGreen); 1937 1936 fGraphPatchRate[fRatePatch2->value()].SetMarkerColor(kGreen); 1938 fGraphPatchRate[fRatePatch2->value()].Draw("PL");1937 l->Add(&fGraphPatchRate[fRatePatch2->value()], "PL"); 1939 1938 } 1940 1939 if (fRateBoard1->value()>=0) … … 1942 1941 fGraphBoardRate[fRateBoard1->value()].SetLineColor(kMagenta); 1943 1942 fGraphBoardRate[fRateBoard1->value()].SetMarkerColor(kMagenta); 1944 fGraphBoardRate[fRateBoard1->value()].Draw("PL");1943 l->Add(&fGraphBoardRate[fRateBoard1->value()], "PL"); 1945 1944 } 1946 1945 if (fRateBoard2->value()>=0) … … 1948 1947 fGraphBoardRate[fRateBoard2->value()].SetLineColor(kCyan); 1949 1948 fGraphBoardRate[fRateBoard2->value()].SetMarkerColor(kCyan); 1950 fGraphBoardRate[fRateBoard2->value()].Draw("PL");1949 l->Add(&fGraphBoardRate[fRateBoard2->value()], "PL"); 1951 1950 } 1952 1951 … … 2458 2457 TCanvas *c = fRateScanCanv->GetCanvas(); 2459 2458 2459 TList *l = c->GetListOfPrimitives(); 2460 2460 2461 while (c->FindObject("PatchRate")) 2461 c->GetListOfPrimitives()->Remove(c->FindObject("PatchRate"));2462 l->Remove(c->FindObject("PatchRate")); 2462 2463 2463 2464 while (c->FindObject("BoardRate")) 2464 c->GetListOfPrimitives()->Remove(c->FindObject("BoardRate")); 2465 2466 c->cd(); 2465 l->Remove(c->FindObject("BoardRate")); 2467 2466 2468 2467 if (fRateScanPatch1->value()>=0) … … 2470 2469 fGraphRateScan[fRateScanPatch1->value()+41].SetLineColor(kRed); 2471 2470 fGraphRateScan[fRateScanPatch1->value()+41].SetMarkerColor(kRed); 2472 fGraphRateScan[fRateScanPatch1->value()+41].Draw("PL");2471 l->Add(&fGraphRateScan[fRateScanPatch1->value()+41], "PL"); 2473 2472 } 2474 2473 if (fRateScanPatch2->value()>=0) … … 2476 2475 fGraphRateScan[fRateScanPatch2->value()+41].SetLineColor(kGreen); 2477 2476 fGraphRateScan[fRateScanPatch2->value()+41].SetMarkerColor(kGreen); 2478 fGraphRateScan[fRateScanPatch2->value()+41].Draw("PL");2477 l->Add(&fGraphRateScan[fRateScanPatch2->value()+41], "PL"); 2479 2478 } 2480 2479 if (fRateScanBoard1->value()>=0) … … 2482 2481 fGraphRateScan[fRateScanBoard1->value()+1].SetLineColor(kMagenta); 2483 2482 fGraphRateScan[fRateScanBoard1->value()+1].SetMarkerColor(kMagenta); 2484 fGraphRateScan[fRateScanBoard1->value()+1].Draw("PL");2483 l->Add(&fGraphRateScan[fRateScanBoard1->value()+1], "PL"); 2485 2484 } 2486 2485 if (fRateScanBoard2->value()>=0) … … 2488 2487 fGraphRateScan[fRateScanBoard2->value()+1].SetLineColor(kCyan); 2489 2488 fGraphRateScan[fRateScanBoard2->value()+1].SetMarkerColor(kCyan); 2490 fGraphRateScan[fRateScanBoard2->value()+1].Draw("PL");2489 l->Add(&fGraphRateScan[fRateScanBoard2->value()+1], "PL"); 2491 2490 } 2492 2491 … … 3708 3707 const int16_t isw = fThresholdIdx->value(); 3709 3708 const int16_t ihw = isw<0 ? -1 : fPatchMapHW[isw]; 3710 if (ihw<0)3709 if (ihw<0) 3711 3710 return; 3712 3711 … … 3753 3752 h->GetYaxis()->SetTitleOffset(1.2); 3754 3753 // h.GetYaxis()->SetTitleSize(1.2); 3755 h->Draw();3756 3757 3754 return h; 3758 3755 } … … 3959 3956 c->SetTopMargin(0.03); 3960 3957 c->SetGrid(); 3961 c->cd();3962 3958 3963 3959 TH1 *hf = DrawTimeFrame("Control deviation [mV] "); … … 3969 3965 hf->GetYaxis()->SetRangeUser(-99, 99); 3970 3966 3971 fGraphFeedbackDev.Draw("LP"); 3967 c->GetListOfPrimitives()->Add(hf, ""); 3968 c->GetListOfPrimitives()->Add(&fGraphFeedbackDev, "LP"); 3972 3969 3973 3970 c = fFeedbackCmd->GetCanvas(); … … 3978 3975 c->SetTopMargin(0.03); 3979 3976 c->SetGrid(); 3980 c->cd();3981 3977 3982 3978 hf = DrawTimeFrame("Command delta value [mV] "); … … 3988 3984 hf->GetYaxis()->SetRangeUser(-99*10, 99*10); 3989 3985 3990 fGraphFeedbackCmd.Draw("LP"); 3986 c->GetListOfPrimitives()->Add(hf, ""); 3987 c->GetListOfPrimitives()->Add(&fGraphFeedbackCmd, "LP"); 3991 3988 3992 3989 // -------------------------------------------------------------------------- … … 4000 3997 c->SetTopMargin(0.03); 4001 3998 c->SetGrid(); 4002 c->cd();4003 3999 4004 4000 TH1F *h=new TH1F("Frame", "", 1, 0, 1); … … 4013 4009 h->GetYaxis()->SetLabelSize(0.025); 4014 4010 h->GetYaxis()->SetTitleOffset(1.2); 4015 h->Draw();4011 c->GetListOfPrimitives()->Add(h, ""); 4016 4012 4017 4013 fGraphRateScan[0].SetName("CameraRate"); … … 4030 4026 fGraphRateScan[0].SetMarkerColor(kBlue); 4031 4027 fGraphRateScan[0].SetMarkerStyle(kFullDotSmall); 4032 fGraphRateScan[0].Draw("LP");4028 c->GetListOfPrimitives()->Add(&fGraphRateScan[0], "LP"); 4033 4029 4034 4030 // -------------------------------------------------------------------------- … … 4042 4038 c->SetTopMargin(0.03); 4043 4039 c->SetGrid(); 4044 c->cd();4045 4040 4046 4041 hf = DrawTimeFrame("Trigger rate [Hz]"); … … 4065 4060 fGraphFtmRate.SetMarkerColor(kBlue); 4066 4061 fGraphFtmRate.SetMarkerStyle(kFullDotSmall); 4067 fGraphFtmRate.Draw("LP"); 4062 4063 c->GetListOfPrimitives()->Add(hf, ""); 4064 c->GetListOfPrimitives()->Add(&fGraphFtmRate, "LP"); 4068 4065 4069 4066 /*
Note:
See TracChangeset
for help on using the changeset viewer.