QEleInterface.hh

Go to the documentation of this file.
00001 
00002 #ifndef _QELE_INTERFACE_HH_
00003 #define _QELE_INTERFACE_HH_
00004 
00005 #include <Rtypes.h>
00006 #include <map>
00007 
00008 #include "QError.hh"
00009 
00010 #include "QEleChannelConfig.hh"
00011 class QSlowControlClient;
00012 
00019 class QEleInterface
00020 {
00021 public:
00022    
00024    static QEleInterface& GetInstance();
00025 
00027    virtual ~QEleInterface();
00028    
00040    Bool_t ReadChannel(QEleChannelConfig& config, Bool_t useCache);
00041 
00043    Bool_t ReadChannel(QEleChannelConfig& config)
00044    { return ReadChannel(config, true); }
00045 
00060    Bool_t WriteChannel(const QEleChannelConfig& info, Bool_t useCache);
00061 
00063    Bool_t WriteChannel(const QEleChannelConfig& config)
00064    { return WriteChannel(config, true); }
00065 
00067    const QError& GetError() const { return fError; }
00068 
00074    void SetSettingsBasket(UInt_t basket);
00075 
00077    void Reset() { fChannelsConfig.clear(); }
00078 
00079 private:
00080 
00082    QEleInterface();
00083 
00085    QError fError;
00086 
00088    std::map<UInt_t, QEleChannelConfig> fChannelsConfig;
00089 
00090    UInt_t fSettingsBasket;
00091 
00100    Bool_t ReadHardware(QEleChannelConfig& config);
00101 
00103    Bool_t InitClient(QSlowControlClient& client);
00104 
00105    void ResetError()
00106    { fError.Set(QERR_SUCCESS,""); }
00107 };
00108 #endif

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