moench zmq process implemented - command implementation is missing

This commit is contained in:
2018-09-13 16:07:43 +02:00
parent f288390255
commit 19e7ced332
12 changed files with 867 additions and 738 deletions

View File

@ -0,0 +1,55 @@
#ifndef MULTITHREADED_COUNTING_DETECTOR_H
#define MULTITHREADED_COUNTING_DETECTOR_H
#include "singlePhotonDetector.h"
#include "multiThreadedAnalogDetector.h"
//#include <mutex>
using namespace std;
class threadedCountingDetector : public threadedAnalogDetector
{
public:
threadedCountingDetector(singlePhotonDetector *d, int fs=10000) : threadedAnalogDetector(d,fs) {};
virtual double setNSigma(double n) {return ((singlePhotonDetector*)det)->setNSigma(n);};
virtual void setEnergyRange(double emi, double ema) {return ((singlePhotonDetector*)det)->setEnergyRange(emi,ema);};
};
class multiThreadedCountingDetector : public multiThreadedAnalogDetector
{
public:
multiThreadedCountingDetector(singlePhotonDetector *d, int n, int fs=1000) : multiThreadedAnalogDetector(d,n,fs) { };
virtual double setNSigma(double n) {double ret; for (int i=0; i<nThreads; i++) ret=((threadedCountingDetector*)dets[i])->setNSigma(n); return ret;};
virtual void setEnergyRange(double emi, double ema) {for (int i=0; i<nThreads; i++) ((threadedCountingDetector*)dets[i])->setEnergyRange(emi,ema);};
};
#endif