- Timestamp:
- 08/05/11 21:27:58 (14 years ago)
- Location:
- trunk/FACT++/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/gui/FactGui.h
r11798 r11802 26 26 #include "TSystem.h" 27 27 #include "TGraph.h" 28 #include "TH 1.h"28 #include "TH2.h" 29 29 #include "TBox.h" 30 30 #include "TStyle.h" … … 1178 1178 TH1 *d2 = dynamic_cast<TH1*>(c->FindObject("DrsCalib2")); 1179 1179 1180 if (hf && hf->GetNbinsX()!=fEventData->Roi) 1180 if ((hf && hf->GetNbinsX()!=fEventData->Roi) || 1181 (dynamic_cast<TH2*>(h) && !fAdcPersistant->isChecked()) || 1182 (!dynamic_cast<TH2*>(h) && fAdcPersistant->isChecked())) 1181 1183 { 1182 1184 delete hf; … … 1197 1199 hf->SetDirectory(0); 1198 1200 hf->SetBit(kCanDelete); 1199 hf->SetStats(kFALSE); 1200 hf->SetYTitle("Voltage [mV]"); 1201 hf->GetXaxis()->CenterTitle(); 1202 hf->GetYaxis()->CenterTitle(); 1203 hf->SetMinimum(-1026); 1204 hf->SetMaximum(1025); 1205 1206 h = new TH1F("EventData", "", roi, -0.5, roi-0.5); 1201 hf->SetStats(kFALSE); 1202 hf->SetYTitle("Voltage [mV]"); 1203 hf->GetXaxis()->CenterTitle(); 1204 hf->GetYaxis()->CenterTitle(); 1205 hf->SetMinimum(-1250); 1206 hf->SetMaximum(2150); 1207 1208 if (!fAdcPersistant->isChecked()) 1209 h = new TH1F("EventData", "", roi, -0.5, roi-0.5); 1210 else 1211 { 1212 h = new TH2F("EventData", "", roi, -0.5, roi-0.5, 3301, -1150.5, 2150.5); 1213 h->SetContour(50); 1214 gStyle->SetPalette(1, 0); 1215 } 1216 1207 1217 h->SetDirectory(0); 1208 1218 h->SetBit(kCanDelete); 1209 h->SetMarkerStyle(kFullDotMedium); 1210 h->SetMarkerColor(kBlue); 1219 h->SetMarkerStyle(kFullDotMedium); 1220 h->SetMarkerColor(kBlue); 1221 1211 1222 1212 1223 d0 = new TH1F("DrsCalib0", "", roi, -0.5, roi-0.5); … … 1232 1243 1233 1244 hf->Draw(""); 1245 1246 if (dynamic_cast<TH2*>(h)) 1247 h->Draw("col same"); 1248 1234 1249 d0->Draw("PEX0same"); 1235 1250 d1->Draw("PEX0same"); 1236 d2->Draw("PEX0same"); 1237 h->Draw("PLsame"); 1251 d2->Draw("PEX0same"); 1252 1253 if (!dynamic_cast<TH2*>(h)) 1254 h->Draw("PLsame"); 1238 1255 1239 1256 gPad = NULL; … … 1269 1286 d2->Reset(); 1270 1287 1271 h->SetEntries(0); 1288 if (!dynamic_cast<TH2*>(h)) 1289 h->Reset(); 1272 1290 d0->SetEntries(0); 1273 1291 d1->SetEntries(0); … … 1276 1294 for (int i=0; i<fEventData->Roi; i++) 1277 1295 { 1278 h->SetBinContent(i+1, reinterpret_cast<float*>(fEventData->Adc_Data)[p*fEventData->Roi+i]); 1296 //if (dynamic_cast<TH2*>(h)) 1297 h->Fill(i, reinterpret_cast<float*>(fEventData->Adc_Data)[p*fEventData->Roi+i]); 1298 //else 1299 // h->SetBinContent(i+1, reinterpret_cast<float*>(fEventData->Adc_Data)[p*fEventData->Roi+i]); 1279 1300 if (start<0) 1280 1301 continue; … … 1299 1320 1300 1321 // ----------------------------------------------------------- 1301 1302 if (fAdcDynamicScale->isChecked()) 1322 if (fAdcDynamicScale->isEnabled() && fAdcDynamicScale->isChecked()) 1303 1323 { 1304 1324 h->SetMinimum(); … … 1308 1328 hf->SetMaximum(h->GetMaximum()); 1309 1329 } 1310 if (fAdcManualScale->is Checked())1330 if (fAdcManualScale->isEnabled() && fAdcManualScale->isChecked()) 1311 1331 { 1312 1332 if (h->GetMinimumStored()==-1111) … … 1322 1342 } 1323 1343 1324 if (fAdcAutoScale->is Checked())1344 if (fAdcAutoScale->isEnabled() && fAdcAutoScale->isChecked()) 1325 1345 { 1326 1346 h->SetMinimum(); … … 1331 1351 if (h->GetMaximum()>hf->GetMaximum()) 1332 1352 hf->SetMaximum(h->GetMaximum()); 1353 } 1354 1355 if (dynamic_cast<TH2*>(h)) 1356 { 1357 h->SetMinimum(); 1358 h->SetMaximum(); 1333 1359 } 1334 1360 … … 1353 1379 for (int i=0; i<fEventData->Roi; i++) 1354 1380 { 1355 hd.Fill(h->GetBinContent(i+1)); 1381 if (!dynamic_cast<TH2*>(h)) 1382 hd.Fill(h->GetBinContent(i+1)); 1356 1383 h0.Fill(d0->GetBinContent(i+1)); 1357 1384 h1.Fill(d1->GetBinContent(i+1)); -
trunk/FACT++/gui/design.ui
r11797 r11802 11 11 <x>0</x> 12 12 <y>0</y> 13 <width>1 316</width>14 <height> 965</height>13 <width>1186</width> 14 <height>850</height> 15 15 </rect> 16 16 </property> … … 53 53 </property> 54 54 <property name="currentIndex"> 55 <number> 2</number>55 <number>5</number> 56 56 </property> 57 57 <property name="documentMode"> … … 6893 6893 </item> 6894 6894 <item> 6895 <spacer name="verticalSpacer_55"> 6896 <property name="orientation"> 6897 <enum>Qt::Vertical</enum> 6898 </property> 6899 <property name="sizeType"> 6900 <enum>QSizePolicy::Fixed</enum> 6901 </property> 6902 <property name="sizeHint" stdset="0"> 6903 <size> 6904 <width>20</width> 6905 <height>10</height> 6906 </size> 6907 </property> 6908 </spacer> 6909 </item> 6910 <item> 6911 <widget class="QCheckBox" name="fAdcPersistant"> 6912 <property name="text"> 6913 <string>Persistant</string> 6914 </property> 6915 </widget> 6916 </item> 6917 <item> 6895 6918 <spacer name="verticalSpacer_32"> 6896 6919 <property name="orientation"> … … 8739 8762 <x>0</x> 8740 8763 <y>0</y> 8741 <width>1 316</width>8764 <width>1186</width> 8742 8765 <height>21</height> 8743 8766 </rect> … … 8980 9003 <property name="minimumSize"> 8981 9004 <size> 8982 <width>2 87</width>8983 <height> 803</height>9005 <width>241</width> 9006 <height>687</height> 8984 9007 </size> 8985 9008 </property> … … 9908 9931 <hints> 9909 9932 <hint type="sourcelabel"> 9910 <x> 918</x>9911 <y> 647</y>9933 <x>1080</x> 9934 <y>772</y> 9912 9935 </hint> 9913 9936 <hint type="destinationlabel"> 9914 <x>77 3</x>9915 <y> 739</y>9937 <x>774</x> 9938 <y>821</y> 9916 9939 </hint> 9917 9940 </hints> … … 9924 9947 <hints> 9925 9948 <hint type="sourcelabel"> 9926 <x> 907</x>9949 <x>1069</x> 9927 9950 <y>109</y> 9928 9951 </hint> … … 9940 9963 <hints> 9941 9964 <hint type="sourcelabel"> 9942 <x> 979</x>9943 <y> 647</y>9965 <x>1141</x> 9966 <y>772</y> 9944 9967 </hint> 9945 9968 <hint type="destinationlabel"> 9946 <x>93 7</x>9947 <y> 739</y>9969 <x>938</x> 9970 <y>821</y> 9948 9971 </hint> 9949 9972 </hints> … … 9956 9979 <hints> 9957 9980 <hint type="sourcelabel"> 9958 <x>1 014</x>9959 <y> 647</y>9981 <x>1176</x> 9982 <y>772</y> 9960 9983 </hint> 9961 9984 <hint type="destinationlabel"> 9962 <x>92 5</x>9963 <y> 739</y>9985 <x>926</x> 9986 <y>821</y> 9964 9987 </hint> 9965 9988 </hints> … … 9972 9995 <hints> 9973 9996 <hint type="sourcelabel"> 9974 <x> 968</x>9997 <x>1130</x> 9975 9998 <y>109</y> 9976 9999 </hint> … … 9988 10011 <hints> 9989 10012 <hint type="sourcelabel"> 9990 <x>1 003</x>10013 <x>1165</x> 9991 10014 <y>109</y> 9992 10015 </hint> … … 10004 10027 <hints> 10005 10028 <hint type="sourcelabel"> 10006 <x> 946</x>10007 <y> 570</y>10029 <x>1108</x> 10030 <y>695</y> 10008 10031 </hint> 10009 10032 <hint type="destinationlabel"> 10010 <x>1 003</x>10011 <y> 571</y>10033 <x>1165</x> 10034 <y>696</y> 10012 10035 </hint> 10013 10036 </hints> … … 10020 10043 <hints> 10021 10044 <hint type="sourcelabel"> 10022 <x> 907</x>10045 <x>1069</x> 10023 10046 <y>105</y> 10024 10047 </hint> … … 10036 10059 <hints> 10037 10060 <hint type="sourcelabel"> 10038 <x> 968</x>10061 <x>1130</x> 10039 10062 <y>105</y> 10040 10063 </hint> … … 10052 10075 <hints> 10053 10076 <hint type="sourcelabel"> 10054 <x>1 003</x>10077 <x>1165</x> 10055 10078 <y>105</y> 10056 10079 </hint> … … 10100 10123 <hints> 10101 10124 <hint type="sourcelabel"> 10102 <x> 946</x>10103 <y> 570</y>10125 <x>1108</x> 10126 <y>695</y> 10104 10127 </hint> 10105 10128 <hint type="destinationlabel"> 10106 <x>1 003</x>10107 <y> 571</y>10129 <x>1165</x> 10130 <y>696</y> 10108 10131 </hint> 10109 10132 </hints> … … 10212 10235 <hints> 10213 10236 <hint type="sourcelabel"> 10214 <x> 907</x>10215 <y> 371</y>10237 <x>1069</x> 10238 <y>442</y> 10216 10239 </hint> 10217 10240 <hint type="destinationlabel"> … … 10228 10251 <hints> 10229 10252 <hint type="sourcelabel"> 10230 <x> 968</x>10231 <y> 371</y>10253 <x>1130</x> 10254 <y>442</y> 10232 10255 </hint> 10233 10256 <hint type="destinationlabel"> … … 10244 10267 <hints> 10245 10268 <hint type="sourcelabel"> 10246 <x>1 003</x>10247 <y> 371</y>10269 <x>1165</x> 10270 <y>442</y> 10248 10271 </hint> 10249 10272 <hint type="destinationlabel"> … … 10253 10276 </hints> 10254 10277 </connection> 10278 <connection> 10279 <sender>fAdcPersistant</sender> 10280 <signal>toggled(bool)</signal> 10281 <receiver>fAdcAutoScale</receiver> 10282 <slot>setDisabled(bool)</slot> 10283 <hints> 10284 <hint type="sourcelabel"> 10285 <x>1086</x> 10286 <y>423</y> 10287 </hint> 10288 <hint type="destinationlabel"> 10289 <x>1113</x> 10290 <y>382</y> 10291 </hint> 10292 </hints> 10293 </connection> 10294 <connection> 10295 <sender>fAdcPersistant</sender> 10296 <signal>toggled(bool)</signal> 10297 <receiver>fAdcDynamicScale</receiver> 10298 <slot>setDisabled(bool)</slot> 10299 <hints> 10300 <hint type="sourcelabel"> 10301 <x>1152</x> 10302 <y>431</y> 10303 </hint> 10304 <hint type="destinationlabel"> 10305 <x>1153</x> 10306 <y>367</y> 10307 </hint> 10308 </hints> 10309 </connection> 10310 <connection> 10311 <sender>fAdcPersistant</sender> 10312 <signal>toggled(bool)</signal> 10313 <receiver>fAdcManualScale</receiver> 10314 <slot>setDisabled(bool)</slot> 10315 <hints> 10316 <hint type="sourcelabel"> 10317 <x>1134</x> 10318 <y>420</y> 10319 </hint> 10320 <hint type="destinationlabel"> 10321 <x>1127</x> 10322 <y>342</y> 10323 </hint> 10324 </hints> 10325 </connection> 10255 10326 </connections> 10256 10327 </ui>
Note:
See TracChangeset
for help on using the changeset viewer.