- Timestamp:
- 05/01/14 17:30:50 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/mcore/zfits.h
r17743 r17748 48 48 virtual bool IsFileOk() const 49 49 { 50 bool rawsum = true; 51 52 if (HasKey("RAWSUM")) 53 { 54 std::ostringstream str; 55 str << fRawsum.val(); 56 rawsum = (GetStr("RAWSUM") == str.str()); 57 } 58 50 if (!HasKey("RAWSUM")) 51 return fits::IsFileOk(); 52 53 const bool rawsum = GetStr("RAWSUM") == std::to_string(fRawsum.val()); 59 54 return fits::IsFileOk() && rawsum; 60 55 }; … … 62 57 size_t GetNumRows() const 63 58 { 64 if (fTable.is_compressed) 65 return fTable.Get<size_t>("ZNAXIS2"); 66 else 67 return fTable.Get<size_t>("NAXIS2"); 68 } 59 return fTable.Get<size_t>(fTable.is_compressed ? "ZNAXIS2" : "NAXIS2"); 60 } 61 69 62 size_t GetBytesPerRow() const 70 63 { 71 if (fTable.is_compressed) 72 return fTable.Get<size_t>("ZNAXIS1"); 73 else 74 return fTable.Get<size_t>("NAXIS1"); 64 return fTable.Get<size_t>(fTable.is_compressed ? "ZNAXIS1" : "NAXIS1"); 75 65 } 76 66
Note:
See TracChangeset
for help on using the changeset viewer.