mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-13 13:27:14 +02:00
lzmq
This commit is contained in:
@ -8,7 +8,8 @@ target_link_libraries(_sls_detector PUBLIC
|
|||||||
slsProjectWarnings
|
slsProjectWarnings
|
||||||
slsDetectorShared
|
slsDetectorShared
|
||||||
slsReceiverShared
|
slsReceiverShared
|
||||||
slsSupportLib )
|
slsSupportLib
|
||||||
|
zmq )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1632,7 +1632,7 @@ class slsDetector : public virtual slsDetectorDefs{
|
|||||||
* @param word 64bit word to be written, -1 gets
|
* @param word 64bit word to be written, -1 gets
|
||||||
* @returns actual value
|
* @returns actual value
|
||||||
*/
|
*/
|
||||||
uint64_t setPatternWord(int addr, uint64_t word = -1);
|
uint64_t setPatternWord(uint64_t addr, uint64_t word = -1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the pattern or loop limits in the CTB
|
* Sets the pattern or loop limits in the CTB
|
||||||
|
@ -4283,7 +4283,7 @@ int slsDetector::restreamStopFromReceiver() {
|
|||||||
|
|
||||||
int slsDetector::setPattern(const std::string &fname) {
|
int slsDetector::setPattern(const std::string &fname) {
|
||||||
uint64_t word;
|
uint64_t word;
|
||||||
int addr = 0;
|
uint64_t addr = 0;
|
||||||
FILE *fd = fopen(fname.c_str(), "r");
|
FILE *fd = fopen(fname.c_str(), "r");
|
||||||
if (fd != nullptr) {
|
if (fd != nullptr) {
|
||||||
while (fread(&word, sizeof(word), 1, fd) != 0u) {
|
while (fread(&word, sizeof(word), 1, fd) != 0u) {
|
||||||
@ -4298,11 +4298,11 @@ int slsDetector::setPattern(const std::string &fname) {
|
|||||||
return addr;
|
return addr;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64_t slsDetector::setPatternWord(int addr, uint64_t word) {
|
uint64_t slsDetector::setPatternWord(uint64_t addr, uint64_t word) {
|
||||||
int fnum = F_SET_PATTERN;
|
int fnum = F_SET_PATTERN;
|
||||||
int ret = FAIL;
|
int ret = FAIL;
|
||||||
int mode = 0; // sets word
|
uint64_t mode = 0; // sets word
|
||||||
uint64_t args[3] = {(uint64_t)mode, (uint64_t)addr, word};
|
uint64_t args[]{mode, addr, word};
|
||||||
uint64_t retval = -1;
|
uint64_t retval = -1;
|
||||||
FILE_LOG(logDEBUG1) << "Setting Pattern word, addr: 0x" << std::hex << addr << ", word: 0x"
|
FILE_LOG(logDEBUG1) << "Setting Pattern word, addr: 0x" << std::hex << addr << ", word: 0x"
|
||||||
<< word << std::dec;
|
<< word << std::dec;
|
||||||
@ -4622,14 +4622,18 @@ slsDetector::readSettingsFile(const std::string &fname, sls_detector_module *myM
|
|||||||
// eiger
|
// eiger
|
||||||
if (detector_shm()->myDetectorType == EIGER) {
|
if (detector_shm()->myDetectorType == EIGER) {
|
||||||
bool allread = false;
|
bool allread = false;
|
||||||
infile.read((char *)myMod->dacs, sizeof(int) * (myMod->ndac));
|
infile.read(reinterpret_cast<char *>(myMod->dacs),
|
||||||
|
sizeof(int) * (myMod->ndac));
|
||||||
if (infile.good()) {
|
if (infile.good()) {
|
||||||
infile.read((char *)&myMod->iodelay, sizeof(myMod->iodelay));
|
infile.read(reinterpret_cast<char *>(&myMod->iodelay),
|
||||||
|
sizeof(myMod->iodelay));
|
||||||
if (infile.good()) {
|
if (infile.good()) {
|
||||||
infile.read((char *)&myMod->tau, sizeof(myMod->tau));
|
infile.read(reinterpret_cast<char *>(&myMod->tau),
|
||||||
|
sizeof(myMod->tau));
|
||||||
if (tb) {
|
if (tb) {
|
||||||
if (infile.good()) {
|
if (infile.good()) {
|
||||||
infile.read((char *)myMod->chanregs, sizeof(int) * (myMod->nchan));
|
infile.read(reinterpret_cast<char *>(myMod->chanregs),
|
||||||
|
sizeof(int) * (myMod->nchan));
|
||||||
if (infile) {
|
if (infile) {
|
||||||
allread = true;
|
allread = true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user