FACT++  1.0
std::pair<std::string, int> ofits::GetChecksumData ( )
inline

Definition at line 1012 of file ofits.h.

References ofits::Key::checksum.

Referenced by main().

1013  {
1014  std::string datasum;
1015  std::string checksum;
1016  //cannot directly use the Get methods, because they are only in fits.h
1017  for (std::vector<Key>::const_iterator it=fKeys.cbegin(); it!= fKeys.cend(); it++)
1018  {
1019  if (it->key == "CHECKSUM") checksum = it->value;
1020  if (it->key == "DATASUM") datasum = it->value;
1021  }
1022  if (checksum[0] == '\'')
1023  checksum = checksum.substr(1,checksum.size()-2);
1024  if (datasum[0] == '\'')
1025  datasum = datasum.substr(1, datasum.size()-2);
1026  return std::make_pair(checksum, atoi(datasum.c_str()));
1027  }
std::vector< Key > fKeys
Definition: ofits.h:249

+ Here is the caller graph for this function: