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

Definition at line 1274 of file FactGui.h.

References DimData::name, DimData::ptr(), DimData::ref(), and DimData::size().

Referenced by infoHandler().

1275  {
1276  if (d.size()==0)
1277  return;
1278 
1279  if (fAdcStop->isChecked())
1280  return;
1281 
1282  const EVENT &dat = d.ref<EVENT>();
1283 
1284  if (d.size()<sizeof(EVENT))
1285  {
1286  cerr << "Size mismatch in " << d.name << ": Found=" << d.size() << " Expected>=" << sizeof(EVENT) << endl;
1287  return;
1288  }
1289 
1290  if (d.size()!=sizeof(EVENT)+dat.Roi*4*1440+dat.Roi*4*160)
1291  {
1292  cerr << "Size mismatch in " << d.name << ": Found=" << d.size() << " Expected=" << dat.Roi*4*1440+sizeof(EVENT) << " [roi=" << dat.Roi << "]" << endl;
1293  return;
1294  }
1295 
1296  delete [] reinterpret_cast<char*>(fEventData);
1297  fEventData = reinterpret_cast<EVENT*>(new char[d.size()]);
1298  memcpy(fEventData, d.ptr<void>(), d.size());
1299 
1300  DisplayEventData();
1301  }
const std::string name
Definition: DimData.h:6
const T & ref(uint32_t offset=0) const
Definition: DimData.h:35
size_t size() const
Definition: DimData.h:39
EVENT * fEventData
Definition: FactGui.h:946
void DisplayEventData()
Definition: FactGui.h:969
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: