mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-12 12:57:13 +02:00
commented overloaded data members
This commit is contained in:
@ -502,233 +502,233 @@ private:
|
|||||||
const static int MAX_NUM_WRITER_THREADS = 15;
|
const static int MAX_NUM_WRITER_THREADS = 15;
|
||||||
|
|
||||||
/** detector type */
|
/** detector type */
|
||||||
detectorType myDetectorType;
|
//detectorType myDetectorType;
|
||||||
|
|
||||||
/** detector hostname */
|
/** detector hostname */
|
||||||
char detHostname[MAX_STR_LENGTH];
|
//char detHostname[MAX_STR_LENGTH];
|
||||||
|
|
||||||
/** status of receiver */
|
/** status of receiver */
|
||||||
runStatus status;
|
//runStatus status;
|
||||||
|
|
||||||
/** UDP Socket between Receiver and Detector */
|
/** UDP Socket between Receiver and Detector */
|
||||||
genericSocket* udpSocket[MAX_NUM_LISTENING_THREADS];
|
//genericSocket* udpSocket[MAX_NUM_LISTENING_THREADS];
|
||||||
|
|
||||||
/** Server UDP Port*/
|
/** Server UDP Port*/
|
||||||
int server_port[MAX_NUM_LISTENING_THREADS];
|
//int server_port[MAX_NUM_LISTENING_THREADS];
|
||||||
|
|
||||||
/** ethernet interface or IP to listen to */
|
/** ethernet interface or IP to listen to */
|
||||||
char *eth;
|
//char *eth;
|
||||||
|
|
||||||
/** max packets per file **/
|
/** max packets per file **/
|
||||||
int maxPacketsPerFile;
|
//int maxPacketsPerFile;
|
||||||
|
|
||||||
/** File write enable */
|
/** File write enable */
|
||||||
int enableFileWrite;
|
//int enableFileWrite;
|
||||||
|
|
||||||
/** File over write enable */
|
/** File over write enable */
|
||||||
int overwrite;
|
//int overwrite;
|
||||||
|
|
||||||
/** Complete File name */
|
/** Complete File name */
|
||||||
char savefilename[MAX_STR_LENGTH];
|
//char savefilename[MAX_STR_LENGTH];
|
||||||
|
|
||||||
/** File Name without frame index, file index and extension*/
|
/** File Name without frame index, file index and extension*/
|
||||||
char fileName[MAX_STR_LENGTH];
|
//char fileName[MAX_STR_LENGTH];
|
||||||
|
|
||||||
/** File Path */
|
/** File Path */
|
||||||
char filePath[MAX_STR_LENGTH];
|
//char filePath[MAX_STR_LENGTH];
|
||||||
|
|
||||||
/** File Index */
|
/** File Index */
|
||||||
int fileIndex;
|
//int fileIndex;
|
||||||
|
|
||||||
/** scan tag */
|
/** scan tag */
|
||||||
int scanTag;
|
//int scanTag;
|
||||||
|
|
||||||
/** if frame index required in file name */
|
/** if frame index required in file name */
|
||||||
int frameIndexNeeded;
|
//int frameIndexNeeded;
|
||||||
|
|
||||||
/* Acquisition started */
|
/* Acquisition started */
|
||||||
bool acqStarted;
|
//bool acqStarted;
|
||||||
|
|
||||||
/* Measurement started */
|
/* Measurement started */
|
||||||
bool measurementStarted;
|
//bool measurementStarted;
|
||||||
|
|
||||||
/** Frame index at start of each real time acquisition (eg. for each scan) */
|
/** Frame index at start of each real time acquisition (eg. for each scan) */
|
||||||
uint32_t startFrameIndex;
|
//uint32_t startFrameIndex;
|
||||||
|
|
||||||
/** Actual current frame index of each time acquisition (eg. for each scan) */
|
/** Actual current frame index of each time acquisition (eg. for each scan) */
|
||||||
uint32_t frameIndex;
|
//uint32_t frameIndex;
|
||||||
|
|
||||||
/** Frames Caught for each real time acquisition (eg. for each scan) */
|
/** Frames Caught for each real time acquisition (eg. for each scan) */
|
||||||
int packetsCaught;
|
//int packetsCaught;
|
||||||
|
|
||||||
/** Total packets caught for an entire acquisition (including all scans) */
|
/** Total packets caught for an entire acquisition (including all scans) */
|
||||||
int totalPacketsCaught;
|
//int totalPacketsCaught;
|
||||||
|
|
||||||
/** Pckets currently in current file, starts new file when it reaches max */
|
/** Pckets currently in current file, starts new file when it reaches max */
|
||||||
int packetsInFile;
|
//int packetsInFile;
|
||||||
|
|
||||||
/** Frame index at start of an entire acquisition (including all scans) */
|
/** Frame index at start of an entire acquisition (including all scans) */
|
||||||
uint32_t startAcquisitionIndex;
|
//uint32_t startAcquisitionIndex;
|
||||||
|
|
||||||
/** Actual current frame index of an entire acquisition (including all scans) */
|
/** Actual current frame index of an entire acquisition (including all scans) */
|
||||||
uint32_t acquisitionIndex;
|
//uint32_t acquisitionIndex;
|
||||||
|
|
||||||
/** number of packets per frame*/
|
/** number of packets per frame*/
|
||||||
int packetsPerFrame;
|
//int packetsPerFrame;
|
||||||
|
|
||||||
/** frame index mask */
|
/** frame index mask */
|
||||||
uint32_t frameIndexMask;
|
//uint32_t frameIndexMask;
|
||||||
|
|
||||||
/** packet index mask */
|
/** packet index mask */
|
||||||
uint32_t packetIndexMask;
|
//uint32_t packetIndexMask;
|
||||||
|
|
||||||
/** frame index offset */
|
/** frame index offset */
|
||||||
int frameIndexOffset;
|
//int frameIndexOffset;
|
||||||
|
|
||||||
/** acquisition period */
|
/** acquisition period */
|
||||||
int64_t acquisitionPeriod;
|
//int64_t acquisitionPeriod;
|
||||||
|
|
||||||
/** frame number */
|
/** frame number */
|
||||||
int32_t numberOfFrames;
|
//int32_t numberOfFrames;
|
||||||
|
|
||||||
/** dynamic range */
|
/** dynamic range */
|
||||||
//int dynamicRange;
|
//int dynamicRange;
|
||||||
|
|
||||||
/** short frames */
|
/** short frames */
|
||||||
int shortFrame;
|
//int shortFrame;
|
||||||
|
|
||||||
/** current frame number */
|
/** current frame number */
|
||||||
uint32_t currframenum;
|
//uint32_t currframenum;
|
||||||
|
|
||||||
/** Previous Frame number from buffer */
|
/** Previous Frame number from buffer */
|
||||||
uint32_t prevframenum;
|
//uint32_t prevframenum;
|
||||||
|
|
||||||
/** size of one frame */
|
/** size of one frame */
|
||||||
int frameSize;
|
//int frameSize;
|
||||||
|
|
||||||
/** buffer size. different from framesize as we wait for one packet instead of frame for eiger */
|
/** buffer size. different from framesize as we wait for one packet instead of frame for eiger */
|
||||||
int bufferSize;
|
//int bufferSize;
|
||||||
|
|
||||||
/** oen buffer size */
|
/** oen buffer size */
|
||||||
int onePacketSize;
|
//int onePacketSize;
|
||||||
|
|
||||||
/** latest data */
|
/** latest data */
|
||||||
char* latestData;
|
//char* latestData;
|
||||||
|
|
||||||
/** gui data ready */
|
/** gui data ready */
|
||||||
int guiDataReady;
|
//int guiDataReady;
|
||||||
|
|
||||||
/** points to the data to send to gui */
|
/** points to the data to send to gui */
|
||||||
char* guiData;
|
//char* guiData;
|
||||||
|
|
||||||
/** points to the filename to send to gui */
|
/** points to the filename to send to gui */
|
||||||
char* guiFileName;
|
//char* guiFileName;
|
||||||
|
|
||||||
/** temporary number for eiger frame number as its not included in the packet */
|
/** temporary number for eiger frame number as its not included in the packet */
|
||||||
uint32_t guiFrameNumber;
|
//uint32_t guiFrameNumber;
|
||||||
|
|
||||||
/** send every nth frame to gui or only upon gui request*/
|
/** send every nth frame to gui or only upon gui request*/
|
||||||
int nFrameToGui;
|
//int nFrameToGui;
|
||||||
|
|
||||||
/** fifo size */
|
/** fifo size */
|
||||||
unsigned int fifosize;
|
//unsigned int fifosize;
|
||||||
|
|
||||||
/** number of jobs per thread for data compression */
|
/** number of jobs per thread for data compression */
|
||||||
int numJobsPerThread;
|
//int numJobsPerThread;
|
||||||
|
|
||||||
/** datacompression - save only hits */
|
/** datacompression - save only hits */
|
||||||
bool dataCompression;
|
//bool dataCompression;
|
||||||
|
|
||||||
/** memory allocated for the buffer */
|
/** memory allocated for the buffer */
|
||||||
char *mem0[MAX_NUM_LISTENING_THREADS];
|
//char *mem0[MAX_NUM_LISTENING_THREADS];
|
||||||
|
|
||||||
/** circular fifo to store addresses of data read */
|
/** circular fifo to store addresses of data read */
|
||||||
CircularFifo<char>* fifo[MAX_NUM_LISTENING_THREADS];
|
//CircularFifo<char>* fifo[MAX_NUM_LISTENING_THREADS];
|
||||||
|
|
||||||
/** circular fifo to store addresses of data already written and ready to be resued*/
|
/** circular fifo to store addresses of data already written and ready to be resued*/
|
||||||
CircularFifo<char>* fifoFree[MAX_NUM_LISTENING_THREADS];
|
//CircularFifo<char>* fifoFree[MAX_NUM_LISTENING_THREADS];
|
||||||
|
|
||||||
/** Receiver buffer */
|
/** Receiver buffer */
|
||||||
char *buffer[MAX_NUM_LISTENING_THREADS];
|
//char *buffer[MAX_NUM_LISTENING_THREADS];
|
||||||
|
|
||||||
/** number of writer threads */
|
/** number of writer threads */
|
||||||
int numListeningThreads;
|
//intt numListeningThreads;
|
||||||
|
|
||||||
/** number of writer threads */
|
/** number of writer threads */
|
||||||
int numWriterThreads;
|
//int numWriterThreads;
|
||||||
|
|
||||||
/** to know if listening and writer threads created properly */
|
/** to know if listening and writer threads created properly */
|
||||||
int thread_started;
|
//int thread_started;
|
||||||
|
|
||||||
/** current listening thread index*/
|
/** current listening thread index*/
|
||||||
int currentListeningThreadIndex;
|
//int currentListeningThreadIndex;
|
||||||
|
|
||||||
/** current writer thread index*/
|
/** current writer thread index*/
|
||||||
int currentWriterThreadIndex;
|
//int currentWriterThreadIndex;
|
||||||
|
|
||||||
/** thread listening to packets */
|
/** thread listening to packets */
|
||||||
pthread_t listening_thread[MAX_NUM_LISTENING_THREADS];
|
//pthread_t listening_thread[MAX_NUM_LISTENING_THREADS];
|
||||||
|
|
||||||
/** thread writing packets */
|
/** thread writing packets */
|
||||||
pthread_t writing_thread[MAX_NUM_WRITER_THREADS];
|
//pthread_t writing_thread[MAX_NUM_WRITER_THREADS];
|
||||||
|
|
||||||
/** total frame count the listening thread has listened to */
|
/** total frame count the listening thread has listened to */
|
||||||
int totalListeningFrameCount[MAX_NUM_LISTENING_THREADS];
|
//int totalListeningFrameCount[MAX_NUM_LISTENING_THREADS];
|
||||||
|
|
||||||
/** mask showing which listening threads are running */
|
/** mask showing which listening threads are running */
|
||||||
volatile uint32_t listeningthreads_mask;
|
//volatile uint32_t listeningthreads_mask;
|
||||||
|
|
||||||
/** mask showing which writer threads are running */
|
/** mask showing which writer threads are running */
|
||||||
volatile uint32_t writerthreads_mask;
|
//volatile uint32_t writerthreads_mask;
|
||||||
|
|
||||||
/** mask showing which threads have created files*/
|
/** mask showing which threads have created files*/
|
||||||
volatile uint32_t createfile_mask;
|
//volatile uint32_t createfile_mask;
|
||||||
|
|
||||||
/** OK if file created was successful */
|
/** OK if file created was successful */
|
||||||
int ret_createfile;
|
//int ret_createfile;
|
||||||
|
|
||||||
/** variable used to self terminate threads waiting for semaphores */
|
/** variable used to self terminate threads waiting for semaphores */
|
||||||
int killAllListeningThreads;
|
//int killAllListeningThreads;
|
||||||
|
|
||||||
/** variable used to self terminate threads waiting for semaphores */
|
/** variable used to self terminate threads waiting for semaphores */
|
||||||
int killAllWritingThreads;
|
//int killAllWritingThreads;
|
||||||
|
|
||||||
/** 10Gbe enable*/
|
/** 10Gbe enable*/
|
||||||
int tengigaEnable;
|
//int tengigaEnable;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//semaphores
|
//semaphores
|
||||||
/** semaphore to synchronize writer and guireader threads */
|
/** semaphore to synchronize writer and guireader threads */
|
||||||
sem_t smp;
|
//sem_t smp;
|
||||||
/** semaphore to synchronize listener threads */
|
/** semaphore to synchronize listener threads */
|
||||||
sem_t listensmp[MAX_NUM_LISTENING_THREADS];
|
//sem_t listensmp[MAX_NUM_LISTENING_THREADS];
|
||||||
/** semaphore to synchronize writer threads */
|
/** semaphore to synchronize writer threads */
|
||||||
sem_t writersmp[MAX_NUM_WRITER_THREADS];
|
//sem_t writersmp[MAX_NUM_WRITER_THREADS];
|
||||||
|
|
||||||
|
|
||||||
//mutex
|
//mutex
|
||||||
/** guiDataReady mutex */
|
/** guiDataReady mutex */
|
||||||
pthread_mutex_t dataReadyMutex;
|
//pthread_mutex_t dataReadyMutex;
|
||||||
|
|
||||||
/** mutex for status */
|
/** mutex for status */
|
||||||
pthread_mutex_t status_mutex;
|
//pthread_mutex_t status_mutex;
|
||||||
|
|
||||||
/** mutex for progress variable currframenum */
|
/** mutex for progress variable currframenum */
|
||||||
pthread_mutex_t progress_mutex;
|
//pthread_mutex_t progress_mutex;
|
||||||
|
|
||||||
/** mutex for writing data to file */
|
/** mutex for writing data to file */
|
||||||
pthread_mutex_t write_mutex;
|
//pthread_mutex_t write_mutex;
|
||||||
|
|
||||||
/** File Descriptor */
|
/** File Descriptor */
|
||||||
FILE *sfilefd;
|
//FILE *sfilefd;
|
||||||
|
|
||||||
//filter
|
//filter
|
||||||
singlePhotonDetector<uint16_t> *singlePhotonDet[MAX_NUM_WRITER_THREADS];
|
//singlePhotonDetector<uint16_t> *singlePhotonDet[MAX_NUM_WRITER_THREADS];
|
||||||
slsReceiverData<uint16_t> *receiverdata[MAX_NUM_WRITER_THREADS];
|
//slsReceiverData<uint16_t> *receiverdata[MAX_NUM_WRITER_THREADS];
|
||||||
moenchCommonMode *cmSub;
|
//moenchCommonMode *cmSub;
|
||||||
bool commonModeSubtractionEnable;
|
//bool commonModeSubtractionEnable;
|
||||||
|
|
||||||
#ifdef MYROOT1
|
#ifdef MYROOT1
|
||||||
/** Tree where the hits are stored */
|
/** Tree where the hits are stored */
|
||||||
|
Reference in New Issue
Block a user