00001
00009 #ifndef _Q_DAQCHANNEL_H
00010 #define _Q_DAQCHANNEL_H
00011
00012
00013 #include <ostream>
00014 #include <map>
00015 #include <string>
00016
00017
00018 #include "QCuore.hh"
00019 #include "QVdt.hh"
00020 #include "QLgChannel.hh"
00021
00022 class QDaqChannel : public QLgChannel {
00023 public:
00024
00028 enum SettingsType_t {
00029 Mapping_s = 1L << 0,
00030 Bes_s = 1L << 1,
00031 FE_s = 1L << 2,
00032 Daq_s = 1L << 3,
00033 Pulser_s = 1L << 4,
00034 Trg_s = 1L << 5,
00035 All_s = Mapping_s | Bes_s | FE_s | Daq_s | Pulser_s | Trg_s,
00036 Ele_s = Mapping_s | Bes_s | FE_s | Pulser_s
00037 };
00038
00042 QDaqChannel();
00043
00049 QDaqChannel(const QDaqChannel& lg, SettingsType_t what);
00050
00051 virtual ~QDaqChannel();
00052
00056 bool GetSaveFlag() const {return fSaveFlag;}
00057
00068 bool GetParameter(SettingsType_t what,
00069 const std::string& parName,
00070 QVdt& par) const;
00071
00080 bool GetTrgParameter(const unsigned short tag,
00081 const std::string& parName,
00082 QVdt& par);
00083
00087 void Dump() const;
00088
00089 private:
00090
00091 void Clear();
00092
00093 std::map <std::string,QVdt> fFESettings;
00094 std::map <std::string,QVdt> fBesSettings;
00095 std::map <std::string,QVdt> fPulSettings;
00096 std::map <std::string,QVdt> fDaqSettings;
00097
00098 std::string fTrgName1;
00099 std::string fTrgName2;
00100 std::string fTrgName3;
00101 std::string fTrgName4;
00102 std::map <std::string,QVdt> fTrgSettings1;
00103 std::map <std::string,QVdt> fTrgSettings2;
00104 std::map <std::string,QVdt> fTrgSettings3;
00105 std::map <std::string,QVdt> fTrgSettings4;
00106 bool fSaveFlag;
00107 bool fDefaultTrg;
00108
00109 friend class QApolloDbBase;
00110 friend class QApolloDbCache;
00111
00112 };
00113
00114 #endif // #ifndef _Q_DAQCHANNEL_H