mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-12-30 16:11:19 +01:00
M3settings (#228)
* added temp m3 settings files * renames settings noise to trim * get threshold for M3 * some changes to compile on RH7 and in the server to load the default chip status register at startup * Updated mythen3DeectorServer_developer executable with correct initialization at startup Co-authored-by: Erik Frojdh <erik.frojdh@gmail.com> Co-authored-by: Anna Bergamaschi <anna.bergamaschi@psi.ch>
This commit is contained in:
@@ -208,6 +208,7 @@ int ClientInterface::functionTable(){
|
||||
flist[F_RECEIVER_SET_THRESHOLD] = &ClientInterface::set_threshold;
|
||||
flist[F_GET_RECEIVER_STREAMING_HWM] = &ClientInterface::get_streaming_hwm;
|
||||
flist[F_SET_RECEIVER_STREAMING_HWM] = &ClientInterface::set_streaming_hwm;
|
||||
flist[F_RECEIVER_SET_ALL_THRESHOLD] = &ClientInterface::set_all_threshold;
|
||||
|
||||
for (int i = NUM_DET_FUNCTIONS + 1; i < NUM_REC_FUNCTIONS ; i++) {
|
||||
LOG(logDEBUG1) << "function fnum: " << i << " (" <<
|
||||
@@ -408,7 +409,14 @@ int ClientInterface::setup_receiver(Interface &socket) {
|
||||
" due to fifo strucutre memory allocation");
|
||||
}
|
||||
impl()->setReadNLines(arg.numLinesReadout);
|
||||
impl()->setThresholdEnergy(arg.thresholdEnergyeV);
|
||||
impl()->setThresholdEnergy(arg.thresholdEnergyeV[0]);
|
||||
}
|
||||
if (myDetectorType == MYTHEN3) {
|
||||
std::array<int, 3> val;
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
val[i] = arg.thresholdEnergyeV[i];
|
||||
}
|
||||
impl()->setThresholdEnergy(val);
|
||||
}
|
||||
if (myDetectorType == EIGER || myDetectorType == MYTHEN3) {
|
||||
try {
|
||||
@@ -1677,3 +1685,13 @@ int ClientInterface::set_streaming_hwm(Interface &socket) {
|
||||
impl()->setStreamingHwm(limit);
|
||||
return socket.Send(OK);
|
||||
}
|
||||
|
||||
int ClientInterface::set_all_threshold(Interface &socket) {
|
||||
auto eVs = socket.Receive<std::array<int, 3>>();
|
||||
LOG(logDEBUG) << "Threshold:" << sls::ToString(eVs);
|
||||
if (myDetectorType != MYTHEN3)
|
||||
functionNotImplemented();
|
||||
verifyIdle(socket);
|
||||
impl()->setThresholdEnergy(eVs);
|
||||
return socket.Send(OK);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user