* Useful for printing error messages etc. */
| 243 | * Useful for printing error messages etc. |
| 244 | */ |
| 245 | std::string GetRawFileName(const DatabaseHandle& handle, bool shortname = false) const |
| 246 | { |
| 247 | auto iter = this->DatabaseNames.find(handle.first); |
| 248 | if (iter == this->DatabaseNames.end()) |
| 249 | { |
| 250 | throw std::runtime_error("bad database handle!"); |
| 251 | } |
| 252 | |
| 253 | const int& fileid = handle.second; |
| 254 | auto dbasename = shortname ? vtksys::SystemTools::GetFilenameName(handle.first) : handle.first; |
| 255 | |
| 256 | auto& dinfo = iter->second; |
| 257 | if (dinfo.ProcessCount > 0) |
| 258 | { |
| 259 | return Ioss::Utils::decode_filename( |
| 260 | dbasename, dinfo.ProcessCount, *std::next(dinfo.Ranks.begin(), fileid)); |
| 261 | } |
| 262 | return dbasename; |
| 263 | } |
| 264 | |
| 265 | /** |
| 266 | * For spatially partitioned files, this returns the partition identifier for |
no test coverage detected