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    // set board status to "Ready to Acquire"
00032    virtual void SetStatusReady();
00033    
00034    // read data and copy into given buffer for active all channels
00035    virtual int GetData();
00036   
00037    // dump read data;
00038    virtual void Dump();
00039    
00040 protected:
00041   
00042    bool fIsReady;
00043    unsigned long fDelay;
00044    long *fBuffer;
00045    std::map<int,unsigned short> fLastCounterVal;
00046    std::map<int,int> fChannelPosition;
00047    std::map<int,QRawFileHandler*> fFiles;
00048    
00049    unsigned int fRun;
00050    
00051    unsigned int GetRawData(int lg);
00052    void ClearTask();
00053 
00054 };
00055 
00056 #endif

Generated on Fri Mar 6 13:40:39 2009 for CUORE Software by  doxygen 1.5.1