QFrontEnd.hh

00001  /*
00002  * APOLLO: A complete DAQ and Online Data Analysis Framework for Cuore
00003  * 
00004  * M.Pallavicini - A.Giachero created 17/01/07 - <Andrea.Giachero@ge.infn.it> 
00005  * 
00006  $ $Id: QFrontEnd.hh 2691 2009-04-24 10:00:08Z didomiz $
00007  * $Revision: 2691 $
00008  *
00009  * Class QFrontEnd: commands for "setting" and "getting" Front-End Boards 
00010  *                          
00011  *
00012  */
00013 
00014 
00015 #ifndef _QFRONTEND_HH_
00016 #define _QFRONTEND_HH_
00017 
00018 
00019 // Apollo Includs
00020 #include "QBaseEleDevice.hh"
00021 
00022  
00023 class QFEChannel;
00024 class QEleBaseInterface;
00025 
00026 class QFrontEnd: public QBaseEleDevice {
00027 public:
00028   
00029   // ctor
00030   QFrontEnd(QEleBaseInterface* IFace, QSlowTypes::QSlowMode_t Mode, 
00031             std::map<unsigned int,QDaqChannel>& Channels);
00032 
00033   // dtor
00034   virtual ~QFrontEnd();
00035 
00036  
00037   // Front-End Set Value
00038   virtual const QError& SetInt(int lg, size_t Value, const std::string& What, QAddressing_t Add);
00039   virtual const QError& SetInt(int FECrate, int FEBoard, int FECh, 
00040                                  size_t Value, const std::string& What);
00041  
00042   // Front-End Get Value
00043   virtual const QError& GetInt(int lg, size_t &Value, const std::string& What, QAddressing_t Add);
00044   virtual const QError& GetInt(int FECrate, int FEBoard, int FEChannel, 
00045                                  size_t& Value, const std::string& What);
00046   
00047   // Front-End Get Info (name, addressing and so on)
00048   virtual const QError& GetString(int lg, std::string& Text, const std::string& What, QAddressing_t Add);
00049 
00050   // Start Command
00051   virtual const QError& Start(int lg, const std::string& What, QAddressing_t Add);
00052   virtual const QError& Start(int FECrate, int FEBoard, int FEChannel, const std::string& What);
00053 
00054 
00055 protected:
00056   
00057 
00058 private:
00059 
00060   // Apply DB Setting
00061   //void ApplyDBSetting(const std::map<unsigned int, QDaqChannel>& Channels);
00062 
00063   // Set parameter (value) on the hardware
00064   const QError& HDSetValue(QEleChannel* Ch, size_t Value, const std::string& What);
00065 
00066   // Get parameter (value) from the harware
00067   const QError& HDGetValue(QEleChannel* Ch, size_t& Value, const std::string& What);
00068 
00069   // Get parameter (string) from the harware
00070   const QError& HDGetString(QEleChannel* Ch, std::string& Text, const std::string& What);
00071 
00072   // HD Start
00073   const QError& HDStart(QEleChannel* Ch, const std::string& What);
00074   
00075 
00076   // Boolean Setting
00077   void BooleanSet(QEleChannel* Ch, size_t Value, const std::string& What);
00078 
00079   // Boolean Getting
00080   void BooleanGet(QEleChannel* Ch, size_t& Value, const std::string& What);
00081     
00082 };
00083 
00084 #endif // _QFRONTEND_HH_

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