- Timestamp:
- 08/11/11 21:01:24 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/gui/FactGui.h
r11878 r11884 1273 1273 TH1 *d2 = dynamic_cast<TH1*>(c->FindObject("DrsCalib2")); 1274 1274 1275 if ((hf && hf->GetNbinsX()!=fEventData->Roi) || 1275 const int roi = fAdcPhysical->isChecked() ? 1024 : (fEventData->Roi>0 ? fEventData->Roi : 1); 1276 1277 if ((hf && hf->GetNbinsX()!=roi) || 1276 1278 (dynamic_cast<TH2*>(h) && !fAdcPersistent->isChecked()) || 1277 1279 (!dynamic_cast<TH2*>(h) && fAdcPersistent->isChecked())) … … 1287 1289 hf = 0; 1288 1290 } 1289 const int roi = fEventData->Roi>0 ? fEventData->Roi : 1;1290 1291 1291 1292 c->cd(); … … 1307 1308 else 1308 1309 { 1309 h = new TH2F("EventData", "", roi, -0.5, roi-0.5, 3301, -1150.5, 2150.5);1310 h = new TH2F("EventData", "", roi, -0.5, roi-0.5, 6751, -2350.5*2000/4096, 4400.5*2000/4096); 1310 1311 h->SetContour(50); 1311 1312 gStyle->SetPalette(1, 0); … … 1420 1421 for (int i=0; i<fEventData->Roi; i++) 1421 1422 { 1423 // FIXME: physcial: i -> (i+start)%1024 1424 // FIXME: logical: i -> i 1425 1426 const int ii = fAdcPhysical->isChecked() ? (i+start)%1024 : i; 1427 1422 1428 //if (dynamic_cast<TH2*>(h)) 1423 h->Fill(i , reinterpret_cast<float*>(fEventData->Adc_Data)[p*fEventData->Roi+i]);1429 h->Fill(ii, reinterpret_cast<float*>(fEventData->Adc_Data)[p*fEventData->Roi+i]); 1424 1430 //else 1425 1431 // h->SetBinContent(i+1, reinterpret_cast<float*>(fEventData->Adc_Data)[p*fEventData->Roi+i]); … … 1429 1435 if (d0) 1430 1436 { 1431 d0->SetBinContent(i +1, fDrsCalibration[1440*1024*0 + p*1024+(start+i)%1024]);1432 d0->SetBinError(i +1, fDrsCalibration[1440*1024*1 + p*1024+(start+i)%1024]);1437 d0->SetBinContent(ii+1, fDrsCalibration[1440*1024*0 + p*1024+(start+i)%1024]); 1438 d0->SetBinError(ii+1, fDrsCalibration[1440*1024*1 + p*1024+(start+i)%1024]); 1433 1439 1434 1440 } 1435 1441 if (d1) 1436 1442 { 1437 d1->SetBinContent(i +1, fDrsCalibration[1440*1024*2 + p*1024+(start+i)%1024]);1438 d1->SetBinError(i +1, fDrsCalibration[1440*1024*3 + p*1024+(start+i)%1024]);1443 d1->SetBinContent(ii+1, fDrsCalibration[1440*1024*2 + p*1024+(start+i)%1024]); 1444 d1->SetBinError(ii+1, fDrsCalibration[1440*1024*3 + p*1024+(start+i)%1024]); 1439 1445 } 1440 1446 if (d2) 1441 1447 { 1442 d2->SetBinContent(i +1, fDrsCalibration[1440*1024*4 + p*1024 + i]);1443 d2->SetBinError(i +1, fDrsCalibration[1440*1024*5 + p*1024 + i]);1448 d2->SetBinContent(ii+1, fDrsCalibration[1440*1024*4 + p*1024 + i]); 1449 d2->SetBinError(ii+1, fDrsCalibration[1440*1024*5 + p*1024 + i]); 1444 1450 } 1445 1451 } … … 3766 3772 // -------------------------------------------------------------------------- 3767 3773 3774 fRatesCanv->setTitle("Patch rates"); 3775 fRatesCanv->setUnits("Hz"); 3776 3777 fBiasCam->setTitle("BIAS current"); 3778 fBiasCam->setUnits("uA"); 3779 3780 fEventCanv1->setTitle("Average (all slices)"); 3781 fEventCanv2->setTitle("RMS (all slices)"); 3782 fEventCanv3->setTitle("Maximum (all slices)"); 3783 fEventCanv4->setTitle("Position of maximum (all slices)"); 3784 3785 fEventCanv1->setUnits("mV"); 3786 fEventCanv2->setUnits("mV"); 3787 fEventCanv3->setUnits("mV"); 3788 fEventCanv4->setUnits("slice"); 3789 3790 // -------------------------------------------------------------------------- 3791 3768 3792 QTimer::singleShot(1000, this, SLOT(slot_RootUpdate())); 3769 3793
Note:
See TracChangeset
for help on using the changeset viewer.