compression extended to client side with r_compression

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@742 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
l_maliakal_d
2014-02-24 14:58:36 +00:00
parent 792e0f3845
commit a892a8854c
12 changed files with 262 additions and 98 deletions

View File

@ -168,8 +168,9 @@ public:
int64_t setAcquisitionPeriod(int64_t index);
/** enabl data compression, by saving only hits
/returns if failed
*/
void enableDataCompression(bool enable);
int enableDataCompression(bool enable);
/** get data compression, by saving only hits
*/
@ -465,8 +466,27 @@ private:
/** total frame count the listening thread has listened to */
int totalListeningFrameCount;
/** mask showing which threads are running */
volatile uint32_t writerthreads_mask;
/** 0 if listening thread is idle, 1 otherwise */
int listening_thread_running;
/** variable used to self terminate threads waiting for semaphores */
int killListeningThread;
/** variable used to self terminate threads waiting for semaphores */
int killAllWritingThreads;
//filter
singlePhotonDetector<uint16_t> *singlePhotonDet[MAX_NUM_WRITER_THREADS];
slsReceiverData<uint16_t> *receiverdata[MAX_NUM_WRITER_THREADS];
moenchCommonMode *cmSub;
bool commonModeSubtractionEnable;
//semaphores
@ -477,6 +497,7 @@ private:
/** semaphore to synchronize writer threads */
sem_t writersmp[MAX_NUM_WRITER_THREADS];
//mutex
/** guiDataReady mutex */
pthread_mutex_t dataReadyMutex;
@ -491,6 +512,20 @@ private:
pthread_mutex_t write_mutex;
#ifdef MYROOT1
/** Tree where the hits are stored */
TTree *myTree[MAX_NUM_WRITER_THREADS];
/** File where the tree is saved */
TFile *myFile[MAX_NUM_WRITER_THREADS];
#endif
/** File Descriptor */
FILE *sfilefd;
/**
callback arguments are
filepath
@ -533,34 +568,9 @@ private:
* 2 we open, close, write file, callback does not do anything */
int cbAction;
//filter
singlePhotonDetector<uint16_t> *singlePhotonDet[MAX_NUM_WRITER_THREADS];
slsReceiverData<uint16_t> *receiverdata[MAX_NUM_WRITER_THREADS];
moenchCommonMode *cmSub;
bool commonModeSubtractionEnable;
public:
#ifdef MYROOT1
/** Tree where the hits are stored */
TTree *myTree[MAX_NUM_WRITER_THREADS];
/** File where the tree is saved */
TFile *myFile[MAX_NUM_WRITER_THREADS];
#endif
/** File Descriptor */
FILE *sfilefd;
/** mask showing which threads are running */
volatile uint32_t writerthreads_mask;
/** 0 if listening thread is idle, 1 otherwise */
int listening_thread_running;
/**
callback arguments are