QPulser.hh

00001 /*
00002  * APOLLO: A complete DAQ and Online Data Analysis Framework for Cuore
00003  * 
00004  * A.Giachero created 08/11/07 - <Andrea.Giachero@ge.infn.it> 
00005  * 
00006  $ $Id:  $
00007  * $Revision: $
00008  *
00009  * Class QPulser: commands for "setting" and "getting" Pulser Boards 
00010  *                           
00011  *
00012  */
00013 
00014 
00015 #ifndef _QPULSER_HH_
00016 #define _QPULSER_HH_
00017 
00018 
00019 
00020 // Apollo Includs
00021 #include "QBaseEleDevice.hh"
00022 
00023 
00024 class QPSChannel;
00025 class QEleBaseInterface;
00026 
00027 class QPulser: public QBaseEleDevice {
00028 public:
00029   
00030   // ctor
00031   QPulser(QEleBaseInterface* IFace, QSlowTypes::QSlowMode_t Mode, 
00032           std::map<unsigned int, QDaqChannel>& Channels);
00033 
00034   // dtor
00035   virtual ~QPulser();
00036 
00037  
00038   // Commands by Logical Channel
00039   virtual const QError& SetInt (int Id, unsigned int Value,const std::string& What, QAddressing_t Add);
00040   virtual const QError& GetInt (int Id, unsigned int &Value, const std::string& What, QAddressing_t Add);
00041   virtual const QError& GetString(int Id, std::string& Text, const std::string& What, QAddressing_t Add);     // (name, addressing and so on)
00042   virtual const QError& Start    (int Id, const std::string& What, QAddressing_t Add);
00043 
00044 
00045   // The same by physical Channel
00046   virtual const QError& SetInt(int PSCrate, int PSBoard, int PSChannel, 
00047                                  unsigned int Value, const std::string& What);
00048   virtual const QError& GetInt(int PSCrate, int PSBoard, int PSChannel, 
00049                                  unsigned int& Value, const std::string& What);
00050   virtual const QError& Start   (int PSCrate, int PSBoard, int PSChannel, 
00051                                  const std::string& What);
00052 
00053 
00054 protected:
00055 
00056   // Set parameter (value) on the hardware
00057   const QError& HDSetValue(QEleChannel* Ch, size_t Value, const std::string& What);
00058 
00059   // Get parameter (value) from the harware
00060   const QError& HDGetValue(QEleChannel* Ch, size_t& Value, const std::string& What);
00061   
00062   // Get parameter (string) from the harware
00063   const QError& HDGetString(QEleChannel* Ch, std::string& Text, const std::string& What,QAddressing_t Add);
00064 
00065   // HD Start
00066   const QError& HDStart(QEleChannel* Ch, const std::string& What);
00067 
00068   
00069   // Get group
00070   std::string GetGroup(size_t Id);
00071   
00072   
00073 private:
00074   
00075 
00076   
00077   
00078 };
00079 
00080 #endif // QPULSER_HH_

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