QSimuDigitizer.hh

00001 /*
00002 * APOLLO: A complete DAQ and Online Data Analysis Framework for Cuore 
00003 * $Id: QDigitizer.hh 86 2006-05-20 12:46:11Z pallas $
00004 * M.P. created 16/4/4
00005 * 
00006 * Class QDigitizer: Digitizer with simulated data
00007 *
00008 */
00009 
00010 #ifndef __QSIMUDIGITIZER_HH_
00011 #define __QSIMUDIGITIZER_HH_
00012 
00013 #include <vector>
00014 
00015 #include "QCuore.hh"
00016 #include "QDigitizer.hh"
00017 
00018 class QSimuDigitizer : public QDigitizer {
00019     public:
00020                 enum NoiseSimulationType {
00021                         SimulConst,
00022             SimulTestDAQ,
00023                         SimulWhite,
00024                         SimulPinkNoise
00025                 };
00026 
00027                 enum PulseSimulationType {
00028                         SimulPulseNone,       // no pulses
00029                         SimulPulseSquare,     // simple squares
00030                         SimulPulseGauss,      // gaussian pulses
00031                         SimulPulseLogNormal,  // log normal fitted pulses
00032                         SimulPulseReal        // real sampled pulses interpolated
00033                 };
00034                         
00035                 // empty ctor
00036                 QSimuDigitizer() : QDigitizer(0,0,0,0,"Simulation") {}
00037 
00038                 // ctor
00039                 QSimuDigitizer(QCrate* c, int slot, unsigned long base, int nch);
00040                 
00041                 // dtor
00042                 virtual ~QSimuDigitizer();
00043 
00044                 // read data and copy into given buffer
00045                 virtual int GetData();
00046 
00047                 void SetParam(const std::string& name, double val);
00048                 void SetNoiseType(NoiseSimulationType t) {fNoiseType=t;}
00049                 void SetPulseType(PulseSimulationType t) {fPulseType=t;}
00050 
00051                 virtual void Dump();
00052                 
00053 private:
00054                 std::map<std::string,double> params;
00055 
00056                 NoiseSimulationType fNoiseType;
00057                 PulseSimulationType fPulseType;
00058 
00059                 void NoiseSimulConst(int,long*,int);
00060                 void NoiseSimulDAQTest(int,long*,int);
00061                 void PulseSquare(int,long*,int);
00062 
00063                 int my_counter[100];
00064                 
00065 };
00066 
00067 #endif

Generated on Tue Nov 16 10:49:55 2010 for CUORE Software by  doxygen 1.5.6