mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2025-06-15 08:47:14 +02:00
remove templates
This commit is contained in:
@ -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>;
|
Reference in New Issue
Block a user