QCrate.hh

00001 /*
00002  * APOLLO: A complete DAQ and Online Data Analysis Framework for Cuore 
00003  * $Id: QCrate.hh 322 2006-10-09 16:33:08Z pallas $
00004  * M.P. created 16/4/4
00005  * 
00006  * Class QCrate: description of a Vme Crate filled with digitizing boards 
00007  *
00008  */
00009 
00010 #ifndef __CRATE_HH_
00011 #define __CRATE_HH_
00012 
00013 #include <map>
00014 
00015 #include "QCuore.hh"
00016 #include "QDigitizer.hh"
00017 #include "QNamed.hh"
00018 #include "QId.hh"
00019 
00020 class QCrate : public QNamed, public QId {
00021         
00022 public:
00023   QCrate(const std::string&,int);
00024                 
00025   virtual ~QCrate();
00026 
00027   // register a digitizer board 
00028   QDigitizer& RegisterDigitizer(int slot, QDigitizer* );
00029 
00030   // prepare all boards
00031   bool Init(bool extClk = false);
00032 
00033   // read data and store into channel buffers
00034   int GetData();
00035 
00036   // dump (debug only)
00037   void Dump() const;
00038   
00039   // get boards map
00040   const std::map<int,QDigitizer*>& GetBoards() {return boards; }
00041 
00042   // give start signal to all boards
00043   bool SetStatusRunning(bool);
00044 
00045 private:
00046                 
00047   // map of digital boards stored into the crate
00048   // the integer is the physical slot position
00049   std::map< int, QDigitizer* > boards;
00050 
00051   int fReady;
00052   bool fRunning;
00053   const bool fUseMuonGate;
00054   inline int isReady() const {return fReady;}
00055   inline int isRunning() const {return fRunning;}
00056 };
00057                 
00058 
00059 #endif

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