trimbits not working yet, nth frame works for eiger, scans work for eiger

This commit is contained in:
Maliakal Dhanya
2014-07-31 12:11:33 +02:00
parent 7e46a407c6
commit 56da3f42cc
14 changed files with 224 additions and 72 deletions

View File

@ -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();

View File

@ -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) {