FACT++  1.0
void FactGui::handleBiasCurrent ( const DimData d)
inlineprivate

Definition at line 2479 of file FactGui.h.

References PixelMapEntry::hv(), i, PixelMap::index(), Feedback::State::kCalibrated, and DimData::ptr().

Referenced by infoHandler().

2480  {
2481  if (!CheckSize(d, 416*sizeof(int16_t)))
2482  return;
2483 
2484  const int16_t *ptr = d.ptr<int16_t>();
2485 
2486  fVecBiasCurrent.assign(ptr, ptr+416);
2487 
2488  valarray<double> dat(0., 1440);
2489 
2490  // fPatch converts from software id to software patch id
2491  for (int i=0; i<1440; i++)
2492  {
2493  const PixelMapEntry &entry = fPixelMap.index(i);
2494 
2495  dat[i] = abs(ptr[entry.hv()]) * 5000./4096;
2496 
2497  fBiasCamA->SetEnable(i, uint16_t(ptr[entry.hv()])!=0x8000);
2498  fBiasCamA->highlightPixel(i, ptr[entry.hv()]<0);
2499  }
2500 
2502  fBiasCamA->SetData(dat);
2503 
2504  fBiasCamA->updateCamera();
2505 
2506  UpdateBiasValues();
2507  }
int i
Definition: db_dim_client.c:21
bool CheckSize(const DimData &d, size_t sz, bool print=true) const
Definition: FactGui.h:639
PixelMap fPixelMap
Definition: FactGui.h:73
int fStateFeedback
Definition: FactGui.h:2477
void UpdateBiasValues()
Definition: FactGui.h:3352
int hv() const
Definition: PixelMap.h:42
const PixelMapEntry & index(int idx) const
Definition: PixelMap.h:107
vector< int16_t > fVecBiasCurrent
Definition: FactGui.h:2452
const T * ptr(uint32_t offset=0) const
Definition: DimData.h:32

+ Here is the call graph for this function:

+ Here is the caller graph for this function: