mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-13 05:17:13 +02:00
pattern generator produces binary file as well; adc clock frequency can be changed as well as run clock frequency
This commit is contained in:
@ -1528,7 +1528,7 @@ slsDetectorDefs::runStatus multiSlsDetector::getRunStatus() {
|
||||
return s;
|
||||
}
|
||||
|
||||
for (int i=1; i<thisMultiDetector->numberOfDetectors; i++) {
|
||||
for (int i=0; i<thisMultiDetector->numberOfDetectors; i++) { //loop started from 0, but it's a problem with only one detector...
|
||||
s1=detectors[i]->getRunStatus();
|
||||
if(detectors[i]->getErrorMask())
|
||||
setErrorMask(getErrorMask()|(1<<i));
|
||||
@ -4841,10 +4841,31 @@ int multiSlsDetector::enableTenGigabitEthernet(int i){
|
||||
*/
|
||||
int multiSlsDetector::setCTBPattern(string fname) {
|
||||
|
||||
uint64_t word;
|
||||
|
||||
int addr=0;
|
||||
|
||||
FILE *fd=fopen(fname.c_str(),"r");
|
||||
if (fd>0) {
|
||||
while (fread(&word, sizeof(word), 1,fd)) {
|
||||
for (int idet=0; idet<thisMultiDetector->numberOfDetectors; idet++)
|
||||
if (detectors[idet]){
|
||||
detectors[idet]->setCTBWord(addr,word);
|
||||
}
|
||||
// cout << hex << addr << " " << word << dec << endl;
|
||||
addr++;
|
||||
}
|
||||
|
||||
fclose(fd);
|
||||
} else
|
||||
return -1;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return addr;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user