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

Definition at line 1339 of file FactGui.h.

References DimData::ptr(), run, and DimData::size().

Referenced by infoHandler().

1340  {
1341  const size_t sz = 1024*1440*6+1024*160*2;
1342 
1343  if (d.size()==0)
1344  {
1345  fDrsCalibBaseline->setValue(-1);
1346  fDrsCalibGain->setValue(-1);
1347  fDrsCalibTrgOffset->setValue(-1);
1348  fDrsCalibROI->setValue(-1);
1349 
1350  fDrsCalibBaseline2->setValue(-1);
1351  fDrsCalibGain2->setValue(-1);
1352  fDrsCalibTrgOffset2->setValue(-1);
1353  fDrsCalibROI2->setValue(-1);
1354 
1355  fDrsCalibration.assign(sz, 0);
1356  DisplayEventData();
1357  return;
1358  }
1359 
1360  if (!CheckSize(d, sz*sizeof(float)+4*sizeof(uint32_t)))
1361  // Do WHAT?
1362  return;
1363 
1364  const uint32_t *run = d.ptr<uint32_t>();
1365 
1366  fDrsCalibROI->setValue(run[0]);
1367  fDrsCalibBaseline->setValue(run[1]);
1368  fDrsCalibGain->setValue(run[2]);
1369  fDrsCalibTrgOffset->setValue(run[3]);
1370 
1371  fDrsCalibROI2->setValue(run[0]);
1372  fDrsCalibBaseline2->setValue(run[1]);
1373  fDrsCalibGain2->setValue(run[2]);
1374  fDrsCalibTrgOffset2->setValue(run[3]);
1375 
1376  const float *dat = d.ptr<float>(sizeof(uint32_t)*4);
1377  fDrsCalibration.assign(dat, dat+sz);
1378 
1379  DisplayEventData();
1380  }
bool CheckSize(const DimData &d, size_t sz, bool print=true) const
Definition: FactGui.h:639
size_t size() const
Definition: DimData.h:39
static int run
Definition: dim_fork.cxx:9
void DisplayEventData()
Definition: FactGui.h:969
vector< float > fDrsCalibration
Definition: FactGui.h:1337
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: