mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-11 12:27:14 +02:00
gap pixels for 8, 16, 32 in receiver at udp level
This commit is contained in:
@ -22,7 +22,6 @@ class BinaryFile : private virtual slsReceiverDefs, public File, public BinaryFi
|
||||
* creates the File Writer
|
||||
* @param ind self index
|
||||
* @param maxf max frames per file
|
||||
* @param ppf packets per frame
|
||||
* @param nd pointer to number of detectors in each dimension
|
||||
* @param fname pointer to file name prefix
|
||||
* @param fpath pointer to file path
|
||||
@ -35,7 +34,7 @@ class BinaryFile : private virtual slsReceiverDefs, public File, public BinaryFi
|
||||
* @param portno pointer to udp port number for logging
|
||||
* @param smode pointer to silent mode
|
||||
*/
|
||||
BinaryFile(int ind, uint32_t maxf, const uint32_t* ppf,
|
||||
BinaryFile(int ind, uint32_t maxf,
|
||||
int* nd, char* fname, char* fpath, uint64_t* findex, bool* owenable,
|
||||
int* dindex, int* nunits, uint64_t* nf, uint32_t* dr, uint32_t* portno,
|
||||
bool* smode);
|
||||
|
@ -28,12 +28,14 @@ class DataProcessor : private virtual slsReceiverDefs, public ThreadObject {
|
||||
* @param ftype pointer to file format type
|
||||
* @param fwenable pointer to file writer enable
|
||||
* @param dsEnable pointer to data stream enable
|
||||
* @param gpEnable pointer to gap pixels enable
|
||||
* @param dr pointer to dynamic range
|
||||
* @param freq pointer to streaming frequency
|
||||
* @param timer pointer to timer if streaming frequency is random
|
||||
* @param dataReadycb pointer to data ready call back function
|
||||
* @param pDataReadycb pointer to arguments of data ready call back function
|
||||
*/
|
||||
DataProcessor(Fifo*& f, fileFormat* ftype, bool* fwenable, bool* dsEnable,
|
||||
DataProcessor(Fifo*& f, fileFormat* ftype, bool* fwenable, bool* dsEnable, bool* gpEnable, uint32_t* dr,
|
||||
uint32_t* freq, uint32_t* timer,
|
||||
void (*dataReadycb)(uint64_t, uint32_t, uint32_t, uint64_t, uint64_t, uint16_t, uint16_t, uint16_t, uint16_t, uint32_t, uint16_t, uint8_t, uint8_t,
|
||||
char*, uint32_t, void*),
|
||||
@ -200,6 +202,11 @@ class DataProcessor : private virtual slsReceiverDefs, public ThreadObject {
|
||||
*/
|
||||
void EndofAcquisition(uint64_t numf);
|
||||
|
||||
/**
|
||||
* Update pixel dimensions in file writer
|
||||
*/
|
||||
void SetPixelDimension();
|
||||
|
||||
|
||||
private:
|
||||
|
||||
@ -269,6 +276,13 @@ class DataProcessor : private virtual slsReceiverDefs, public ThreadObject {
|
||||
*/
|
||||
bool CheckCount();
|
||||
|
||||
/**
|
||||
* Processing Function (inserting gap pixels) eiger specific
|
||||
* @param buf pointer to image
|
||||
* @param dr dynamic range
|
||||
*/
|
||||
void InsertGapPixels(char* buf, uint32_t dr);
|
||||
|
||||
/** type of thread */
|
||||
static const std::string TypeName;
|
||||
|
||||
@ -307,6 +321,13 @@ class DataProcessor : private virtual slsReceiverDefs, public ThreadObject {
|
||||
/** File Write Enable */
|
||||
bool* fileWriteEnable;
|
||||
|
||||
/** Gap Pixels Enable */
|
||||
bool* gapPixelsEnable;
|
||||
|
||||
|
||||
/** Dynamic Range */
|
||||
uint32_t* dynamicRange;
|
||||
|
||||
/** Pointer to Streaming frequency, if 0, sending random images with a timer */
|
||||
uint32_t* streamingFrequency;
|
||||
|
||||
@ -319,6 +340,9 @@ class DataProcessor : private virtual slsReceiverDefs, public ThreadObject {
|
||||
/** timer beginning stamp for random streaming */
|
||||
struct timespec timerBegin;
|
||||
|
||||
/** temporary buffer for processing */
|
||||
char* tempBuffer;
|
||||
|
||||
|
||||
|
||||
//acquisition start
|
||||
|
@ -22,7 +22,6 @@ class File : private virtual slsReceiverDefs {
|
||||
* creates the File Writer
|
||||
* @param ind self index
|
||||
* @param maxf max frames per file
|
||||
* @param ppf packets per frame
|
||||
* @param nd pointer to number of detectors in each dimension
|
||||
* @param fname pointer to file name prefix
|
||||
* @param fpath pointer to file path
|
||||
@ -35,7 +34,7 @@ class File : private virtual slsReceiverDefs {
|
||||
* @param portno pointer to udp port number for logging
|
||||
* @param smode pointer to silent mode
|
||||
*/
|
||||
File(int ind, uint32_t maxf, const uint32_t* ppf,
|
||||
File(int ind, uint32_t maxf,
|
||||
int* nd, char* fname, char* fpath, uint64_t* findex, bool* owenable,
|
||||
int* dindex, int* nunits, uint64_t* nf, uint32_t* dr, uint32_t* portno,
|
||||
bool* smode);
|
||||
@ -84,12 +83,6 @@ class File : private virtual slsReceiverDefs {
|
||||
*/
|
||||
void SetMaxFramesPerFile(uint32_t maxf);
|
||||
|
||||
/**
|
||||
* Set Packets per frame (called only for each generalData construction)
|
||||
* @param ppf pointer to packets per frame
|
||||
*/
|
||||
void SetPacketsPerFrame(const uint32_t* ppf);
|
||||
|
||||
/**
|
||||
* Create file
|
||||
* @param fnum current frame index to include in file name
|
||||
@ -172,10 +165,6 @@ class File : private virtual slsReceiverDefs {
|
||||
/** Maximum frames per file */
|
||||
uint32_t maxFramesPerFile;
|
||||
|
||||
/** Packets per frame for logging */
|
||||
//pointer because value in generalData could change
|
||||
const uint32_t* packetsPerFrame;
|
||||
|
||||
/** Master File Name */
|
||||
std::string masterFileName;
|
||||
|
||||
|
@ -536,19 +536,19 @@ class EigerData : public GeneralData {
|
||||
/**
|
||||
* Enable Gap Pixels changes member variables
|
||||
* @param enable true if gap pixels enable, else false
|
||||
* @param dr dynamic range
|
||||
*/
|
||||
void SetGapPixelsEnable(bool b, int dr) {
|
||||
switch((int)b) {
|
||||
case 1:
|
||||
nPixelsX_Streamer = (256*2) + 3;
|
||||
nPixelsY_Streamer = 256 + 1;
|
||||
imageSize_Streamer = nPixelsX_Streamer * imageSize_Streamer *
|
||||
((double)dr/(double)NUM_BITS_IN_ONE_BYTE);
|
||||
nPixelsX = (256 * 2) + 3;
|
||||
nPixelsY = 256 + 1;
|
||||
imageSize = nPixelsX * nPixelsY * ((double)dr/(double)NUM_BITS_IN_ONE_BYTE);
|
||||
break;
|
||||
default:
|
||||
nPixelsX_Streamer = (256*2);
|
||||
nPixelsY_Streamer = 256;
|
||||
imageSize_Streamer = dataSize*packetsPerFrame;
|
||||
nPixelsX = (256*2);
|
||||
nPixelsY = 256;
|
||||
imageSize = dataSize*packetsPerFrame;
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
@ -28,7 +28,6 @@ class HDF5File : private virtual slsReceiverDefs, public File, public HDF5FileSt
|
||||
* creates the File Writer
|
||||
* @param ind self index
|
||||
* @param maxf max frames per file
|
||||
* @param ppf packets per frame
|
||||
* @param nd pointer to number of detectors in each dimension
|
||||
* @param fname pointer to file name prefix
|
||||
* @param fpath pointer to file path
|
||||
@ -43,7 +42,7 @@ class HDF5File : private virtual slsReceiverDefs, public File, public HDF5FileSt
|
||||
* @param ny number of pixels in y direction
|
||||
* @param smode pointer to silent mode
|
||||
*/
|
||||
HDF5File(int ind, uint32_t maxf, const uint32_t* ppf,
|
||||
HDF5File(int ind, uint32_t maxf,
|
||||
int* nd, char* fname, char* fpath, uint64_t* findex, bool* owenable,
|
||||
int* dindex, int* nunits, uint64_t* nf, uint32_t* dr, uint32_t* portno,
|
||||
uint32_t nx, uint32_t ny,
|
||||
|
Reference in New Issue
Block a user