remove templates

This commit is contained in:
Bechir Braham
2024-03-20 13:14:14 +01:00
parent 4da9bc0813
commit cd905e96f3
25 changed files with 223 additions and 200 deletions

View File

@ -4,8 +4,7 @@
#include "aare/NumpyFileFactory.hpp"
#include <iostream>
template <DetectorType detector, typename DataType>
FileFactory<detector, DataType> *FileFactory<detector, DataType>::get_factory(std::filesystem::path fpath) {
FileFactory *FileFactory::get_factory(std::filesystem::path fpath) {
// check if file exists
if (!std::filesystem::exists(fpath)) {
throw std::runtime_error("File does not exist");
@ -16,12 +15,12 @@ FileFactory<detector, DataType> *FileFactory<detector, DataType>::get_factory(st
throw std::runtime_error("Raw file not implemented");
} else if (fpath.extension() == ".json") {
std::cout << "Loading json file" << std::endl;
return new JsonFileFactory<detector, DataType>(fpath);
return new JsonFileFactory(fpath);
}
// check if extension is numpy
else if (fpath.extension() == ".npy") {
std::cout << "Loading numpy file" << std::endl;
return new NumpyFileFactory<detector, DataType>(fpath);
return new NumpyFileFactory(fpath);
}
throw std::runtime_error("Unsupported file type");
@ -29,4 +28,3 @@ FileFactory<detector, DataType> *FileFactory<detector, DataType>::get_factory(st
template class FileFactory<DetectorType::Jungfrau, uint16_t>;