mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 10:07:59 +02:00
receiver-read frame in right order, cleaned fileio, config file-include extsig and vhighvoltage
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@339 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
@ -80,49 +80,37 @@ int fileIO::writeDataFile(ofstream &outfile, int *data, int offset){
|
||||
|
||||
|
||||
int fileIO::writeDataFile(void *data, int iframe) {
|
||||
cout <<"iframe " << iframe << endl;
|
||||
|
||||
if (iframe<0)
|
||||
iframe=frameIndex;
|
||||
//if (iframe>=0)
|
||||
// frameIndex=iframe;
|
||||
|
||||
if ((*framesPerFile)<2)
|
||||
iframe=-1;
|
||||
//frameIndex=-1;
|
||||
|
||||
if ((iframe%(*framesPerFile))==0 || (iframe<0)) {
|
||||
//if ((frameIndex%(*framesPerFile))==0 || (frameIndex<0)) {
|
||||
createFileName();
|
||||
filefd = fopen((currentFileName+string(".raw")).c_str(), "w");
|
||||
}
|
||||
|
||||
if (filefd){
|
||||
//if (iframe%(*framesPerFile)) {
|
||||
/*if(setDynamicRange(-1)==16){
|
||||
fileIOStatic::writeBinaryDataFile(filefd,getDataBytes()*2, data);
|
||||
frameIndex+=2;
|
||||
}
|
||||
else{*/
|
||||
fileIOStatic::writeBinaryDataFile(filefd,getDataBytes(), data);cout<<"write frameIndex:"<<iframe<<endl;
|
||||
//}
|
||||
iframe++;
|
||||
//frameIndex++;
|
||||
//}
|
||||
fileIOStatic::writeBinaryDataFile(filefd,getDataBytes(), data);
|
||||
iframe++;
|
||||
}
|
||||
|
||||
if ((iframe%(*framesPerFile)==0) || (iframe<0)) {
|
||||
//if ((frameIndex%(*framesPerFile)==0) || (frameIndex<0)) {
|
||||
if (filefd)
|
||||
fclose(filefd);
|
||||
filefd=NULL;
|
||||
if (filefd)
|
||||
fclose(filefd);
|
||||
filefd=NULL;
|
||||
}
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int fileIO::closeDataFile() {cout<<"closing datafile: filfd:"<<filefd<<endl;
|
||||
int fileIO::closeDataFile() {
|
||||
if (filefd)
|
||||
fclose(filefd);
|
||||
filefd=NULL; cout<<"closed data file"<<endl;
|
||||
filefd=NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -323,7 +323,7 @@ s
|
||||
|
||||
int arraySize;
|
||||
|
||||
void setReceiverAcquiring(int acq){receiverAcquiring=acq;};
|
||||
|
||||
|
||||
private:
|
||||
double *fdata;
|
||||
@ -349,11 +349,6 @@ s
|
||||
int numberOfChannels;
|
||||
|
||||
|
||||
int receiverAcquiring;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user