QFEChannel.hh
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef _QFE_CHANNEL_HH_
00014 #define _QFE_CHANNEL_HH_
00015
00016
00017
00018 #include <sstream>
00019
00020
00021
00022 #include "QCuore.hh"
00023 #include "QNamed.hh"
00024 #include "QId.hh"
00025
00026
00027 #include "QEleChannel.hh"
00028 #include "QEleBaseInterface.hh"
00029
00030
00031 class QFEChannel : public QId, public QNamed, public QEleChannel
00032 {
00033
00034 public:
00035
00036
00037 QFEChannel(QEleBaseInterface* IFace, size_t Id, const std::string& Label,
00038 size_t Ctrl, size_t Slot, size_t Board, size_t Ch);
00039
00040
00041 virtual ~QFEChannel() {}
00042
00043
00044
00045
00046
00047 bool StartOffsetAdj();
00048 bool SetGain(size_t Gain);
00049 bool GetGain(size_t& Gain);
00050 bool SetAuxOutputEnable(bool Status);
00051 bool GetAuxOutputEnable(bool& Status);
00052 bool SetThermOutputEnable(bool Status);
00053 bool GetThermOutputEnable(bool& Status);
00054
00055
00056
00057 bool SetBiasPolarity(bool Polarity);
00058 bool GetBiasPolarity(bool& Polarity);
00059 bool IsBiasPositive();
00060 bool SetBias(size_t Bias);
00061 bool GetBias(size_t& Bias);
00062 bool SetFrontEndInput(bool Input);
00063 bool GetFrontEndInput(bool& Input);
00064 bool SetLoadResistor(bool Resitor);
00065 bool GetLoadResistor(bool& Resitor);
00066
00067
00068
00069 bool SetTestSigPosLevel(size_t PolLevel);
00070 bool GetTestSigPosLevel(size_t& PolLevel);
00071 bool SetTestSigNegLevel(size_t NegLevel);
00072 bool GetTestSigNegLevel(size_t& NegLevel);
00073
00074
00075
00076 bool SetAdjTime(size_t Time);
00077 bool GetAdjTime(size_t& Time);
00078
00079
00080
00081 bool SetOffsetHighDAC(size_t HighDAC);
00082 bool GetOffsetHighDAC(size_t& HighDAC);
00083 bool SetOffsetSBit(bool SBit);
00084 bool GetOffsetSBit(bool& SBit);
00085 bool SetOffsetPolarity(bool Polarity);
00086 bool GetOffsetPolarity(bool& Polarity);
00087 bool SetOffsetMSBs(size_t Msb);
00088 bool GetOffsetMSBs(size_t& Msb);
00089
00090
00091 bool SetOffsetLowDAC(size_t LowDAC);
00092 bool GetOffsetLowDAC(size_t& LowDAC);
00093
00094
00095 bool SetOffsetDAC(size_t DAC);
00096 bool GetOffsetDAC(size_t& DAC);
00097
00098
00099
00100 bool SetRegister(size_t Reg, char Value);
00101 bool GetRegister(size_t Reg, char& Value);
00102
00103
00104
00105 inline QEleBaseInterface* GetInterface() {return fFace;}
00106
00107 protected:
00108
00109
00110 virtual bool WriteRegister(size_t Reg, char Value);
00111
00112
00113 virtual bool ReWriteRegister(size_t Reg);
00114
00115
00116 virtual bool ReadRegister (size_t Reg, char& Value);
00117
00118 private:
00119
00120
00121
00122 QEleBaseInterface* fFace;
00123
00124
00125 std::ostringstream fMsgString;
00126
00127 };
00128
00129 #endif // _QFE_CHANNEL_HH_
00130