mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-19 08:17:13 +02:00
changes for new chipterboard -now works with reduced dynamic range and analog/digital readout
This commit is contained in:
@ -22,10 +22,10 @@ string fileIO::createFileName() {
|
||||
detIndex \
|
||||
);
|
||||
|
||||
if (getDetectorsType()==JUNGFRAUCTB) {
|
||||
nBytes=2*getTotalNumberOfChannels();
|
||||
} else
|
||||
nBytes=getDataBytes();
|
||||
//if (getDetectorsType()==JUNGFRAUCTB) {
|
||||
// nBytes=2*getTotalNumberOfChannels();
|
||||
//} else
|
||||
nBytes=getDataBytes();
|
||||
return currentFileName;
|
||||
|
||||
}
|
||||
@ -57,7 +57,7 @@ int fileIO::writeDataFile(string fname, double *data, double *err, double *ang,
|
||||
if (nch==-1)
|
||||
nch=getTotalNumberOfChannels();
|
||||
|
||||
cout << "Write filexxx...." << endl;
|
||||
// cout << "Write filexxx...." << endl;
|
||||
|
||||
return fileIOStatic::writeDataFile(fname, nch, data, err, ang, dataformat);
|
||||
|
||||
@ -66,7 +66,7 @@ int fileIO::writeDataFile(ofstream &outfile, double *data, double *err, double *
|
||||
if (nch==-1)
|
||||
nch=getTotalNumberOfChannels();
|
||||
|
||||
cout << "Write file...." << endl;
|
||||
//cout << "Write file...." << endl;
|
||||
|
||||
return fileIOStatic::writeDataFile(outfile, nch, data, err, ang, dataformat, offset);
|
||||
|
||||
@ -97,13 +97,14 @@ int fileIO::writeDataFile(void *data, int iframe) {
|
||||
if ((*framesPerFile)<2)
|
||||
iframe=-1;
|
||||
|
||||
if ((iframe%(*framesPerFile))==0 || (iframe<0)) {
|
||||
if ((iframe%(*framesPerFile))==0 || (iframe<0) || filefd==0) {
|
||||
createFileName();
|
||||
filefd = fopen((currentFileName+string(".raw")).c_str(), "w");
|
||||
}
|
||||
|
||||
if (filefd){
|
||||
// fileIOStatic::writeBinaryDataFile(filefd,getDataBytes(), data);
|
||||
cout <<"Writing "<< nBytes<< " dataBytes"<< endl;
|
||||
fileIOStatic::writeBinaryDataFile(filefd,nBytes, data);
|
||||
iframe++;
|
||||
}
|
||||
@ -119,7 +120,7 @@ int fileIO::writeDataFile(void *data, int iframe) {
|
||||
|
||||
|
||||
int fileIO::closeDataFile() {
|
||||
cout << "close file...." << endl;
|
||||
// cout << "close file...." << endl;
|
||||
if (filefd)
|
||||
fclose(filefd);
|
||||
filefd=NULL;
|
||||
|
Reference in New Issue
Block a user