diff options
Diffstat (limited to 'src/DetectorModule/DetectorModule.cpp')
-rw-r--r-- | src/DetectorModule/DetectorModule.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/DetectorModule/DetectorModule.cpp b/src/DetectorModule/DetectorModule.cpp index 8193a03..169c5a5 100644 --- a/src/DetectorModule/DetectorModule.cpp +++ b/src/DetectorModule/DetectorModule.cpp @@ -25,12 +25,11 @@ void timer_start(std::function<void(void)> func, unsigned int interval){ }).detach(); } -DetectorModule::DetectorModule(const int detectorID, const std::string& address, const std::string& configPath, const int packetSize) : +DetectorModule::DetectorModule(const int detectorID, const std::string& address, const std::string& configPath) : detectorID_{detectorID}, numberOfDetectorsPerModule_{16}, index_{0u}, - client_{address, detectorID+4000}, - packetSize_{packetSize} { + client_{address, detectorID+4000}{ printf("Creating %d\n", detectorID); @@ -38,7 +37,7 @@ DetectorModule::DetectorModule(const int detectorID, const std::string& address, throw std::runtime_error("DetectorModule: Configuration file could not be loaded successfully. Please check!"); } - sendBuffer_.resize(numberOfProjectionsPerPacket_*numberOfDetectorsPerModule_+sizeof(std::size_t)+sizeof(unsigned short)); + sendBuffer_.resize(numberOfProjectionsPerPacket_*numberOfDetectorsPerModule_*sizeof(unsigned short)+sizeof(std::size_t)); //read the input data from the file corresponding to the detectorModuleID readInput(); @@ -109,7 +108,7 @@ auto DetectorModule::readConfig(const std::string& configFile) -> bool { && configReader.lookupValue("scanRate", scanRate) && configReader.lookupValue("numberOfDataFrames", numberOfFrames_) && configReader.lookupValue("numberOfProjectionsPerPacket", numberOfProjectionsPerPacket_) - && configReader.lookupValue("numberOfDetectorsPerModule", numberOfProjectionsPerPacket_)) { + && configReader.lookupValue("numberOfDetectorsPerModule", numberOfDetectorsPerModule_)) { numberOfProjections_ = samplingRate * 1000000 / scanRate; return EXIT_SUCCESS; } |