QRawFileDigitizer.hh

00001 
00002 /*
00003  * APOLLO: A complete DAQ and Online Data Analysis Framework for Cuore 
00004  * SDD created 16/4/4
00005  * 
00006  * $Id$
00007  * 
00008  * Class QRawFileDigitizer.hh: simulate ADC board but actually read 
00009  * data from files
00010  */
00011 
00012 #ifndef __QRAWFILEDIGITIZER_HH_
00013 #define __QRAWFILEDIGITIZER_HH_
00014 
00015 #include "QCuore.hh"
00016 #include "QDigitizer.hh"
00017 
00018 #include "QRawFileHandler.hh"
00019 
00020 class QRawFileDigitizer : public QDigitizer {
00021 public:
00022    // ctor
00023    QRawFileDigitizer(QCrate* c, int slot, unsigned long base,int nch);
00024    
00025    // dtor
00026    virtual ~QRawFileDigitizer();
00027    
00028    // register a channel
00029    virtual void RegisterChannel(int lg, int n, bool SaveFile);
00030 
00031    // register digital channel
00032    virtual void RegisterDigitalChannel(int lg, bool SaveFile);
00033 
00034    // set board status to "Ready to Acquire"
00035    virtual void SetStatusReady();
00036    
00037    // read data and copy into given buffer for active all channels
00038    virtual int GetData();
00039   
00040    // dump read data;
00041    virtual void Dump();
00042    
00043 protected:
00044   
00045    bool fIsReady;
00046    unsigned long fDelay;
00047    long *fBuffer;
00048    std::map<int,unsigned int> fLastCounterVal;
00049    std::map<int,int> fChannelPosition;
00050    std::map<int,QRawFileHandler*> fFiles;
00051    
00052    unsigned int fRun;
00053    
00054    unsigned int GetRawData(int lg);
00055    void ClearTask();
00056 
00057 };
00058 
00059 #endif

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