mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 18:17:59 +02:00
vetoalg added hits and raw
This commit is contained in:
@ -554,7 +554,8 @@ int getVeto();
|
||||
void setVetoStream(int value);
|
||||
int getVetoStream();
|
||||
enum vetoAlgorithm getVetoAlgorithm(enum streamingInterface interface);
|
||||
void setVetoAlgorithm(enum streamingInterface interface, enum vetoAlgorithm alg);
|
||||
void setVetoAlgorithm(enum vetoAlgorithm alg,
|
||||
enum streamingInterface interface);
|
||||
void setBadChannels(int nch, int *channels);
|
||||
int *getBadChannels(int *nch);
|
||||
#endif
|
||||
|
@ -8519,7 +8519,7 @@ int get_veto_algorithm(int file_des) {
|
||||
ret = OK;
|
||||
memset(mess, 0, sizeof(mess));
|
||||
enum streamingInterface arg = NONE;
|
||||
enum vetoAlgorithm retval = DEFAULT_ALGORITHM;
|
||||
enum vetoAlgorithm retval = ALG_HITS;
|
||||
if (receiveData(file_des, &arg, sizeof(arg), INT32) < 0)
|
||||
return printSocketReadError();
|
||||
|
||||
@ -8551,7 +8551,7 @@ int set_veto_algorithm(int file_des) {
|
||||
|
||||
enum vetoAlgorithm alg = args[0];
|
||||
enum streamingInterface interface = args[1];
|
||||
LOG(logDEBUG1, ("Setting vetoalgorithm (interface: %d): %u\n", (int)interface,
|
||||
LOG(logINFOBLUE, ("Setting vetoalgorithm (interface: %d): %u\n", (int)interface,
|
||||
(int)alg));
|
||||
|
||||
#ifndef GOTTHARD2D
|
||||
@ -8565,13 +8565,17 @@ int set_veto_algorithm(int file_des) {
|
||||
"Could not set vetoalgorithm. Invalid interface %d.\n",
|
||||
interface);
|
||||
LOG(logERROR, (mess));
|
||||
} else if (alg != DEFAULT_ALGORITHM) {
|
||||
ret = FAIL;
|
||||
sprintf(mess,
|
||||
"Could not set vetoalgorithm. Invalid algorithm %d.\n",
|
||||
alg);
|
||||
LOG(logERROR, (mess));
|
||||
} else {
|
||||
switch (alg) {
|
||||
case ALG_HITS:
|
||||
case ALG_RAW:
|
||||
break;
|
||||
default:
|
||||
modeNotImplemented("Veto Algorithm index", (int)alg);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (ret == OK) {
|
||||
setVetoAlgorithm(alg, interface);
|
||||
int retval = getVetoAlgorithm(interface);
|
||||
LOG(logDEBUG1, ("vetoalgorithm retval: %u\n", retval));
|
||||
|
Reference in New Issue
Block a user