vetoalg: wip

This commit is contained in:
2021-07-20 12:58:05 +02:00
parent 206c48c7a0
commit af16ad4040
18 changed files with 237 additions and 78 deletions

View File

@ -36,7 +36,8 @@ std::string ToString(const defs::dacIndex s);
std::string ToString(const std::vector<defs::dacIndex> &vec);
std::string ToString(const defs::burstMode s);
std::string ToString(const defs::timingSourceType s);
std::string ToString(const defs::EthernetInterface s);
std::string ToString(const defs::ethernetInterface s);
std::string ToString(const defs::vetoAlgorithm s);
std::string ToString(const slsDetectorDefs::xy &coord);
std::ostream &operator<<(std::ostream &os, const slsDetectorDefs::xy &coord);
@ -298,7 +299,8 @@ template <> defs::readoutMode StringTo(const std::string &s);
template <> defs::dacIndex StringTo(const std::string &s);
template <> defs::burstMode StringTo(const std::string &s);
template <> defs::timingSourceType StringTo(const std::string &s);
template <> defs::EthernetInterface StringTo(const std::string &s);
template <> defs::ethernetInterface StringTo(const std::string &s);
template <> defs::vetoAlgorithm StringTo(const std::string &s);
template <> uint32_t StringTo(const std::string &s);
template <> uint64_t StringTo(const std::string &s);

View File

@ -395,9 +395,9 @@ typedef struct {
enum timingSourceType { TIMING_INTERNAL, TIMING_EXTERNAL };
#ifdef __cplusplus
enum class EthernetInterface {
enum class ethernetInterface {
#else
enum EthernetInterface {
enum ethernetInterface {
#endif
NONE = 0,
I3GBE = 1 << 1,
@ -405,6 +405,8 @@ typedef struct {
ALL = I3GBE | I10GBE
};
enum vetoAlgorithm { DEFAULT_ALGORITHM };
#ifdef __cplusplus
/** scan structure */
@ -496,16 +498,18 @@ typedef struct {
#ifdef __cplusplus
};
inline slsDetectorDefs::EthernetInterface
operator|( const slsDetectorDefs::EthernetInterface &a,
const slsDetectorDefs::EthernetInterface &b) {
return slsDetectorDefs::EthernetInterface(static_cast<int32_t>(a) |
inline slsDetectorDefs::ethernetInterface
operator|(const slsDetectorDefs::ethernetInterface &a,
const slsDetectorDefs::ethernetInterface &b) {
return slsDetectorDefs::ethernetInterface(static_cast<int32_t>(a) |
static_cast<int32_t>(b));
};
inline slsDetectorDefs::EthernetInterface operator&( const slsDetectorDefs::EthernetInterface &a,
const slsDetectorDefs::EthernetInterface &b) {
return slsDetectorDefs::EthernetInterface(static_cast<int32_t>(a) & static_cast<int32_t>(b));
inline slsDetectorDefs::ethernetInterface
operator&(const slsDetectorDefs::ethernetInterface &a,
const slsDetectorDefs::ethernetInterface &b) {
return slsDetectorDefs::ethernetInterface(static_cast<int32_t>(a) &
static_cast<int32_t>(b));
};
#endif
@ -583,7 +587,7 @@ struct detParameters {
#ifdef __cplusplus
struct sls_detector_module {
#else
typedef struct {
typedef struct {
#endif
int serialnumber; /**< is the module serial number */
int nchan; /**< is the number of channels on the module*/