| 44 | } |
| 45 | |
| 46 | std::unique_ptr<Xtc> ReaderActivity::loadXtc(const std::string& path) { |
| 47 | if (!Storage.exists(path.c_str())) { |
| 48 | LOG_ERR("READER", "File does not exist: %s", path.c_str()); |
| 49 | return nullptr; |
| 50 | } |
| 51 | |
| 52 | auto xtc = makeUniqueNoThrow<Xtc>(path, "/.crosspoint"); |
| 53 | if (!xtc) { |
| 54 | LOG_ERR("READER", "Failed to allocate XTC object"); |
| 55 | return nullptr; |
| 56 | } |
| 57 | if (xtc->load()) { |
| 58 | return xtc; |
| 59 | } |
| 60 | |
| 61 | LOG_ERR("READER", "Failed to load XTC"); |
| 62 | return nullptr; |
| 63 | } |
| 64 | |
| 65 | std::unique_ptr<Txt> ReaderActivity::loadTxt(const std::string& path) { |
| 66 | if (!Storage.exists(path.c_str())) { |