mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-19 08:17:13 +02:00
changed constructor
This commit is contained in:
11
integrationTests/src/test-multiDetector.cpp
Normal file
11
integrationTests/src/test-multiDetector.cpp
Normal file
@ -0,0 +1,11 @@
|
||||
// #include "catch.hpp"
|
||||
// #include "multiSlsDetector.h"
|
||||
|
||||
// #include <iostream>
|
||||
// TEST_CASE("Initialize a detector") {
|
||||
// multiSlsDetector det(0, true, true);
|
||||
// std::cout << "Size: " << det.getNumberOfDetectors() << std::endl;
|
||||
// std::cout << "Hostname: " << det.getHostname() << std::endl;
|
||||
// REQUIRE(false);
|
||||
|
||||
// }
|
30
integrationTests/src/test-slsDetector.cpp
Normal file
30
integrationTests/src/test-slsDetector.cpp
Normal file
@ -0,0 +1,30 @@
|
||||
|
||||
#include "catch.hpp"
|
||||
|
||||
#include "logger.h"
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include "slsDetector.h"
|
||||
#include "sls_detector_defs.h"
|
||||
#define VERBOSE
|
||||
|
||||
int main(){
|
||||
const std::string hostname = "beb083";
|
||||
// const std::string hostname = "129.129.202.194";
|
||||
auto type = slsDetector::getDetectorTypeAsEnum(hostname);
|
||||
auto d = slsDetector(type);
|
||||
d.setHostname(hostname.c_str());
|
||||
// auto d = slsDetector();
|
||||
|
||||
std::cout << "type: " << d.getDetectorTypeAsString() << '\n';
|
||||
std::cout << "hostname: " << d.getHostname() << '\n';
|
||||
std::cout << "threshold: " << d.getThresholdEnergy() << '\n';
|
||||
std::cout << "exptime: " << d.setTimer(slsDetectorDefs::timerIndex::ACQUISITION_TIME) << '\n';
|
||||
|
||||
|
||||
// auto d2 = slsDetector(type, 0, 1);
|
||||
// d2.setHostname("beb098");.
|
||||
// auto d2 = slsDetector();
|
||||
// std::cout << "hn: " << d2.getHostname() << '\n';
|
||||
return 0;
|
||||
}
|
3
integrationTests/src/test.cpp
Normal file
3
integrationTests/src/test.cpp
Normal file
@ -0,0 +1,3 @@
|
||||
// tests-main.cpp
|
||||
#define CATCH_CONFIG_MAIN
|
||||
#include "catch.hpp"
|
Reference in New Issue
Block a user