Changeset 11926
- Timestamp:
- 08/31/11 16:53:42 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/gui/FactGui.h
r11884 r11926 2479 2479 void handleBiasVolt(const DimData &d) 2480 2480 { 2481 if (!CheckSize(d, 416*sizeof(int16_t)))2481 if (!CheckSize(d, 2*416*sizeof(int16_t))) 2482 2482 return; 2483 2483 2484 2484 const int16_t *ptr = d.ptr<int16_t>(); 2485 2485 2486 fVecBiasVolt.assign(ptr, ptr+416); 2487 2486 fVecBiasVolt.assign(ptr, ptr+2*416); 2487 2488 on_fBiasDispRefVolt_stateChanged(); 2488 2489 UpdateBiasValues(); 2489 2490 } … … 2508 2509 dat[i] = abs(ptr[entry.hv()])*5000./4096; 2509 2510 2510 fBiasCam->SetEnable(i, uint16_t(ptr[entry.hv()])!=0x8000); 2511 } 2512 2513 fBiasCam->SetData(dat); 2511 fBiasCamA->SetEnable(i, uint16_t(ptr[entry.hv()])!=0x8000); 2512 fBiasCamA->highlightPixel(i, ptr[entry.hv()]<0); 2513 } 2514 2515 fBiasCamA->SetData(dat); 2514 2516 2515 2517 UpdateBiasValues(); … … 3278 3280 { 3279 3281 fBiasVoltDac->setValue(fVecBiasVolt[ihw]); 3280 fBiasVolt->setValue(fVecBiasVolt[ihw]*90./4096); 3282 //fBiasVolt->setValue(fVecBiasVolt[ihw]*90./4096); 3283 3284 fBiasVoltCur->setValue(fVecBiasVolt[ihw]*90./4096); 3285 fBiasVoltRef->setValue(fVecBiasVolt[ihw+416]*90./4096); 3286 3287 SetLedColor(fBiasNominalLed, 3288 fVecBiasCurrent[ihw]==fVecBiasVolt[ihw+416]?kLedGreen:kLedRed, Time()); 3281 3289 } 3282 3290 … … 3301 3309 } 3302 3310 3311 void BiasHvChannelChanged() 3312 { 3313 if (fInChooseBiasHv) 3314 return; 3315 3316 const int b = fBiasHvBoard->value(); 3317 const int ch = fBiasHvChannel->value(); 3318 3319 // FIXME: Mark corresponding patch in camera 3320 const PixelMapEntry &entry = fPixelMap.hv(b, ch); 3321 fBiasCamV->SetWhite(entry.index); 3322 fBiasCamA->SetWhite(entry.index); 3323 fBiasCamV->updateGL(); 3324 fBiasCamA->updateGL(); 3325 3326 UpdateBiasCam(entry); 3327 UpdateBiasValues(); 3328 } 3329 3303 3330 void UpdateBiasHv(const PixelMapEntry &entry) 3304 3331 { … … 3309 3336 3310 3337 fInChooseBiasHv = false; 3311 }3312 3313 void BiasHvChannelChanged()3314 {3315 if (fInChooseBiasHv)3316 return;3317 3318 const int b = fBiasHvBoard->value();3319 const int ch = fBiasHvChannel->value();3320 3321 const PixelMapEntry &entry = fPixelMap.hv(b, ch);3322 fBiasCam->SetWhite(entry.index);3323 fBiasCam->updateGL();3324 // FIXME: mark patch in camera3325 UpdateBiasCam(entry);3326 UpdateBiasValues();3327 3338 } 3328 3339 … … 3337 3348 const int pixel = fBiasCamPixel->value(); 3338 3349 3350 // FIXME: Display corresponding patches 3339 3351 const PixelMapEntry &entry = fPixelMap.cbpx(crate, board, patch, pixel); 3340 fBiasCam->SetWhite(entry.index); 3341 fBiasCam->updateGL(); 3342 // FIXME: mark patch in camera 3352 fBiasCamV->SetWhite(entry.index); 3353 fBiasCamA->SetWhite(entry.index); 3354 fBiasCamV->updateGL(); 3355 fBiasCamA->updateGL(); 3356 3343 3357 UpdateBiasHv(entry); 3344 3358 UpdateBiasValues(); … … 3352 3366 UpdateBiasCam(entry); 3353 3367 UpdateBiasValues(); 3368 } 3369 3370 void on_fBiasDispRefVolt_stateChanged(int = 0) 3371 { 3372 // FIXME: Display patches for which ref==cur 3373 3374 valarray<double> dat(0., 1440); 3375 3376 int offset = 0; 3377 if (!fBiasDispRefVolt->isChecked()) 3378 fBiasCamV->setTitle("Applied BIAS voltage"); 3379 else 3380 { 3381 fBiasCamV->setTitle("Reference BIAS voltage"); 3382 offset = 416; 3383 } 3384 3385 if (fVecBiasVolt.size()>0) 3386 { 3387 for (int i=0; i<1440; i++) 3388 { 3389 const PixelMapEntry &entry = fPixelMap.index(i); 3390 dat[i] = fVecBiasVolt[entry.hv()+offset]*90./4096; 3391 3392 // FIXME: Highglight HV patch instead! 3393 fBiasCamV->highlightPixel(i, fVecBiasVolt[entry.hv()]==fVecBiasVolt[entry.hv()+416]); 3394 } 3395 3396 fBiasCamV->SetData(dat); 3397 } 3398 3399 fBiasCamV->updateGL(); 3354 3400 } 3355 3401 … … 3746 3792 // -------------------------------------------------------------------------- 3747 3793 3748 fBiasCam->SetMin(fBiasMin->value()); 3749 fBiasCam->SetMax(fBiasMax->value()); 3750 fBiasCam->updateGL(); 3794 fBiasCamV->SetMin(fBiasVoltMin->value()); 3795 fBiasCamV->SetMax(fBiasVoltMax->value()); 3796 fBiasCamV->updateGL(); 3797 3798 fBiasCamA->SetMin(fBiasCurrentMin->value()); 3799 fBiasCamA->SetMax(fBiasCurrentMax->value()); 3800 fBiasCamA->updateGL(); 3751 3801 3752 3802 // -------------------------------------------------------------------------- … … 3775 3825 fRatesCanv->setUnits("Hz"); 3776 3826 3777 fBiasCam->setTitle("BIAS current"); 3778 fBiasCam->setUnits("uA"); 3827 fBiasCamA->setTitle("BIAS current"); 3828 fBiasCamA->setUnits("uA"); 3829 3830 fBiasCamV->setTitle("Applied BIAS voltage"); 3831 fBiasCamV->setUnits("V"); 3779 3832 3780 3833 fEventCanv1->setTitle("Average (all slices)"); … … 3818 3871 connect(fRatesCanv, SIGNAL(signalCurrentPixel(int)), 3819 3872 this, SLOT(slot_ChoosePixelThreshold(int))); 3820 connect(fBiasCam, SIGNAL(signalCurrentPixel(int)), 3873 connect(fBiasCamV, SIGNAL(signalCurrentPixel(int)), 3874 this, SLOT(slot_ChooseBiasChannel(int))); 3875 connect(fBiasCamA, SIGNAL(signalCurrentPixel(int)), 3821 3876 this, SLOT(slot_ChooseBiasChannel(int))); 3822 3877 connect(fFtmRateCanv, SIGNAL( RootEventProcessed(TObject*, unsigned int, TCanvas*)),
Note:
See TracChangeset
for help on using the changeset viewer.