mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 18:17:59 +02:00
trimbits not working yet, nth frame works for eiger, scans work for eiger
This commit is contained in:
@ -241,7 +241,7 @@ slsDetectorDefs::sls_detector_module* energyConversion::readSettingsFile(string
|
||||
case EIGER:
|
||||
infile.open(myfname.c_str(),ifstream::binary);
|
||||
if (infile.is_open()) {
|
||||
infile.read((char*) myMod->dacs,sizeof(int)*(myMod->ndac));
|
||||
infile.read((char*) myMod->dacs,sizeof(dacs_t)*(myMod->ndac));
|
||||
infile.read((char*) myMod->chanregs,sizeof(int)*(myMod->nchan));
|
||||
#ifdef VERBOSE
|
||||
for(int i=0;i<myMod->ndac;i++)
|
||||
@ -381,7 +381,7 @@ int energyConversion::writeSettingsFile(string fname, detectorType myDetectorTyp
|
||||
for(int i=0;i<mod.ndac;i++)
|
||||
std::cout << "dac " << i << ":" << mod.dacs[i] << std::endl;
|
||||
#endif
|
||||
outfile.write((char*)mod.dacs, sizeof(int)*(mod.ndac));
|
||||
outfile.write((char*)mod.dacs, sizeof(dacs_t)*(mod.ndac));
|
||||
outfile.write((char*)mod.chanregs, sizeof(int)*(mod.nchan));
|
||||
|
||||
outfile.close();
|
||||
|
@ -461,7 +461,7 @@ void* postProcessing::processData(int delflag) {
|
||||
*/
|
||||
|
||||
|
||||
int progress = 0;
|
||||
int progress = -1;
|
||||
char currentfName[MAX_STR_LENGTH]="";
|
||||
int currentfIndex = -1;
|
||||
bool newData = false;
|
||||
@ -502,6 +502,7 @@ void* postProcessing::processData(int delflag) {
|
||||
|
||||
|
||||
if (dataReady){
|
||||
|
||||
//for random reads, ask only if it has new data
|
||||
if(!newData){
|
||||
if(currentfIndex > progress)
|
||||
@ -525,13 +526,12 @@ void* postProcessing::processData(int delflag) {
|
||||
currentfIndex = -1;
|
||||
cout<<"****Detector Data returned is NULL***"<<endl;
|
||||
}
|
||||
|
||||
if(nthframe){
|
||||
/*if(nthframe){
|
||||
if((currentfIndex == -1) || (currentfIndex == progress))
|
||||
currentfIndex = -1;
|
||||
else
|
||||
progress = currentfIndex;
|
||||
}
|
||||
}*/
|
||||
|
||||
//not garbage frame
|
||||
if (currentfIndex >= 0) {
|
||||
|
Reference in New Issue
Block a user