diff options
Diffstat (limited to 'src/DetectorModule/DetectorModule.cpp')
-rw-r--r-- | src/DetectorModule/DetectorModule.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/DetectorModule/DetectorModule.cpp b/src/DetectorModule/DetectorModule.cpp index f0c1a06..d2c8298 100644 --- a/src/DetectorModule/DetectorModule.cpp +++ b/src/DetectorModule/DetectorModule.cpp @@ -13,8 +13,7 @@ #include <exception> #include <fstream> -template<typename T> -DetectorModule<T>::DetectorModule(const int detectorID, const std::string& address, const std::string& configPath) : +DetectorModule::DetectorModule(const int detectorID, const std::string& address, const std::string& configPath) : detectorID_{detectorID}, numberOfDetectorsPerModule_{16}, index_{0}, @@ -28,13 +27,11 @@ DetectorModule<T>::DetectorModule(const int detectorID, const std::string& addre readInput(); } -template <typename T> -auto DetectorModule<T>::sendPeriodically(unsigned int timeIntervall) -> void { - client_.send(buffer_.data(), sizeof(T)*numberOfDetectorsPerModule_*numberOfProjections_); +auto DetectorModule::sendPeriodically(unsigned int timeIntervall) -> void { + client_.send((char*)buffer_.data(), sizeof(unsigned short)*numberOfDetectorsPerModule_*numberOfProjections_); } -template <typename T> -auto DetectorModule<T>::readInput() -> void { +auto DetectorModule::readInput() -> void { if(path_.back() != '/') path_.append("/"); //open file @@ -44,12 +41,11 @@ auto DetectorModule<T>::readInput() -> void { input.seekg(0, std::ios::end); fileSize = input.tellg(); input.seekg(0, std::ios::beg); - buffer_.resize(fileSize / sizeof(T)); + buffer_.resize(fileSize / sizeof(unsigned short)); input.read((char*) &buffer_[0], fileSize); } -template<typename T> -auto DetectorModule<T>::readConfig(const std::string& configFile) -> bool { +auto DetectorModule::readConfig(const std::string& configFile) -> bool { ConfigReader configReader = ConfigReader(configFile.data()); int samplingRate, scanRate; if (configReader.lookupValue("numberOfFanDetectors", numberOfDetectors_) |