FACT++  1.0
void* fits::SetPtrAddress ( const std::string &  name)
inline

Definition at line 886 of file fits.h.

References fits::Table::cols, and str.

Referenced by Compress(), FitsDumper::InitColumns(), FitsDumper::InitColumnsRoot(), main(), RawDataViewer::openFile(), factfits::readDrsCalib(), and DrsCalibration::ReadFitsImp().

887  {
888  if (fTable.cols.count(name)==0)
889  {
890  std::ostringstream str;
891  str << "SetPtrAddress('" << name << "') - Column not found.";
892  Exception(str.str());
893  return NULL;
894  }
895 
896  Pointers::const_iterator it = fPointers.find(name);
897  if (it!=fPointers.end())
898  return it->second;
899 
900  fGarbage.emplace_back(fTable.cols[name].bytes);
901 
902  void *ptr = fGarbage.back().data();
903 
904  fPointers[name] = ptr;
905  fAddresses.emplace_back(ptr, fTable.cols[name]);
906  sort(fAddresses.begin(), fAddresses.end(), Compare);
907  return ptr;
908  }
char str[80]
Definition: test_client.c:7
static bool Compare(const Address &p1, const Address &p2)
Definition: fits.h:862
Columns cols
Definition: fits.h:116
Table fTable
Definition: fits.h:502
Pointers fPointers
Definition: fits.h:507
std::vector< std::vector< char > > fGarbage
Definition: fits.h:509
void Exception(const std::string &txt)
Definition: fits.h:484
Addresses fAddresses
Definition: fits.h:505

+ Here is the caller graph for this function: