mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-23 15:00:02 +02:00
slsReceiver: maximum frames per file written to master files for both binary and hdf5, note the version number change for these master file format
This commit is contained in:
parent
3595c586d4
commit
ed1135566a
@ -106,6 +106,7 @@ class BinaryFileStatic {
|
|||||||
* @param nPixelsX number of pixels in x direction
|
* @param nPixelsX number of pixels in x direction
|
||||||
* @param nPixelsY number of pixels in y direction
|
* @param nPixelsY number of pixels in y direction
|
||||||
* @param nf number of images
|
* @param nf number of images
|
||||||
|
* @param maxf maximum frames per file
|
||||||
* @param acquisitionTime acquisition time
|
* @param acquisitionTime acquisition time
|
||||||
* @param acquisitionPeriod acquisition period
|
* @param acquisitionPeriod acquisition period
|
||||||
* @param subexposuretime sub exposure time
|
* @param subexposuretime sub exposure time
|
||||||
@ -116,6 +117,7 @@ class BinaryFileStatic {
|
|||||||
static int CreateMasterDataFile(FILE*& fd, string fname, bool owenable,
|
static int CreateMasterDataFile(FILE*& fd, string fname, bool owenable,
|
||||||
uint32_t dr, bool tenE, uint32_t size,
|
uint32_t dr, bool tenE, uint32_t size,
|
||||||
uint32_t nPixelsX, uint32_t nPixelsY, uint64_t nf,
|
uint32_t nPixelsX, uint32_t nPixelsY, uint64_t nf,
|
||||||
|
uint32_t maxf,
|
||||||
uint64_t acquisitionTime, uint64_t subexposuretime,
|
uint64_t acquisitionTime, uint64_t subexposuretime,
|
||||||
uint64_t subperiod, uint64_t acquisitionPeriod, double version)
|
uint64_t subperiod, uint64_t acquisitionPeriod, double version)
|
||||||
{
|
{
|
||||||
@ -139,6 +141,7 @@ class BinaryFileStatic {
|
|||||||
"Image Size : %d bytes\n"
|
"Image Size : %d bytes\n"
|
||||||
"x : %d pixels\n"
|
"x : %d pixels\n"
|
||||||
"y : %d pixels\n"
|
"y : %d pixels\n"
|
||||||
|
"Max. Frames Per File : %u\n"
|
||||||
"Total Frames : %lld\n"
|
"Total Frames : %lld\n"
|
||||||
"Exptime (ns) : %lld\n"
|
"Exptime (ns) : %lld\n"
|
||||||
"SubExptime (ns) : %lld\n"
|
"SubExptime (ns) : %lld\n"
|
||||||
@ -167,6 +170,7 @@ class BinaryFileStatic {
|
|||||||
size,
|
size,
|
||||||
nPixelsX,
|
nPixelsX,
|
||||||
nPixelsY,
|
nPixelsY,
|
||||||
|
maxf,
|
||||||
(long long int)nf,
|
(long long int)nf,
|
||||||
(long long int)acquisitionTime,
|
(long long int)acquisitionTime,
|
||||||
(long long int)subexposuretime,
|
(long long int)subexposuretime,
|
||||||
|
@ -230,6 +230,7 @@ public:
|
|||||||
* @param nx number of pixels in x direction
|
* @param nx number of pixels in x direction
|
||||||
* @param ny number of pixels in y direction
|
* @param ny number of pixels in y direction
|
||||||
* @param nf number of images
|
* @param nf number of images
|
||||||
|
* @param maxf maximum frames per file
|
||||||
* @param acquisitionTime acquisition time
|
* @param acquisitionTime acquisition time
|
||||||
* @param subexposuretime sub exposure time
|
* @param subexposuretime sub exposure time
|
||||||
* @param subperiod sub period
|
* @param subperiod sub period
|
||||||
@ -240,6 +241,7 @@ public:
|
|||||||
static int CreateMasterDataFile(H5File*& fd, string fname, bool owenable,
|
static int CreateMasterDataFile(H5File*& fd, string fname, bool owenable,
|
||||||
uint32_t dr, bool tenE, uint32_t size,
|
uint32_t dr, bool tenE, uint32_t size,
|
||||||
uint32_t nPixelsx, uint32_t nPixelsy, uint64_t nf,
|
uint32_t nPixelsx, uint32_t nPixelsy, uint64_t nf,
|
||||||
|
uint32_t maxf,
|
||||||
uint64_t acquisitionTime, uint64_t subexposuretime,
|
uint64_t acquisitionTime, uint64_t subexposuretime,
|
||||||
uint64_t subperiod, uint64_t acquisitionPeriod, double version)
|
uint64_t subperiod, uint64_t acquisitionPeriod, double version)
|
||||||
{
|
{
|
||||||
@ -304,6 +306,10 @@ public:
|
|||||||
dataset = group5.createDataSet ( "number of pixels in y axis", PredType::NATIVE_INT, dataspace );
|
dataset = group5.createDataSet ( "number of pixels in y axis", PredType::NATIVE_INT, dataspace );
|
||||||
dataset.write ( &nPixelsy, PredType::NATIVE_INT);
|
dataset.write ( &nPixelsy, PredType::NATIVE_INT);
|
||||||
|
|
||||||
|
//Maximum frames per file
|
||||||
|
dataset = group5.createDataSet ( "maximum frames per file", PredType::NATIVE_INT, dataspace );
|
||||||
|
dataset.write ( &maxf, PredType::NATIVE_INT);
|
||||||
|
|
||||||
//Total Frames
|
//Total Frames
|
||||||
dataset = group5.createDataSet ( "total frames", PredType::STD_U64LE, dataspace );
|
dataset = group5.createDataSet ( "total frames", PredType::STD_U64LE, dataspace );
|
||||||
dataset.write ( &nf, PredType::STD_U64LE);
|
dataset.write ( &nf, PredType::STD_U64LE);
|
||||||
|
@ -28,8 +28,8 @@
|
|||||||
#define MAX_CHUNKED_IMAGES 1
|
#define MAX_CHUNKED_IMAGES 1
|
||||||
|
|
||||||
//versions
|
//versions
|
||||||
#define HDF5_WRITER_VERSION 1.0 //1 decimal places
|
#define HDF5_WRITER_VERSION 2.0 //1 decimal places
|
||||||
#define BINARY_WRITER_VERSION 1.0 //1 decimal places
|
#define BINARY_WRITER_VERSION 2.0 //1 decimal places
|
||||||
|
|
||||||
|
|
||||||
//parameters to calculate fifo depth
|
//parameters to calculate fifo depth
|
||||||
|
@ -99,7 +99,7 @@ int BinaryFile::CreateMasterFile(bool en, uint32_t size,
|
|||||||
}
|
}
|
||||||
return BinaryFileStatic::CreateMasterDataFile(masterfd, masterFileName,
|
return BinaryFileStatic::CreateMasterDataFile(masterfd, masterFileName,
|
||||||
*overWriteEnable,
|
*overWriteEnable,
|
||||||
*dynamicRange, en, size, nx, ny, *numImages,
|
*dynamicRange, en, size, nx, ny, *numImages, *maxFramesPerFile,
|
||||||
at, st, sp, ap, BINARY_WRITER_VERSION);
|
at, st, sp, ap, BINARY_WRITER_VERSION);
|
||||||
}
|
}
|
||||||
return OK;
|
return OK;
|
||||||
|
@ -185,7 +185,8 @@ int HDF5File::CreateMasterFile(bool en, uint32_t size,
|
|||||||
pthread_mutex_lock(&Mutex);
|
pthread_mutex_lock(&Mutex);
|
||||||
int ret = HDF5FileStatic::CreateMasterDataFile(masterfd, masterFileName,
|
int ret = HDF5FileStatic::CreateMasterDataFile(masterfd, masterFileName,
|
||||||
*overWriteEnable,
|
*overWriteEnable,
|
||||||
*dynamicRange, en, size, nx, ny, *numImages, at, st, sp, ap,
|
*dynamicRange, en, size, nx, ny, *numImages, *maxFramesPerFile,
|
||||||
|
at, st, sp, ap,
|
||||||
HDF5_WRITER_VERSION);
|
HDF5_WRITER_VERSION);
|
||||||
pthread_mutex_unlock(&Mutex);
|
pthread_mutex_unlock(&Mutex);
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user