00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00020 #ifndef _QAPOLLODBCACHE_HH_
00021 #define _QAPOLLODBCACHE_HH_
00022
00023
00024 #include <string>
00025 #include <map>
00026 #include <vector>
00027
00028
00029 #include "QCuore.hh"
00030 #include "QDaqChannel.hh"
00031
00032
00033 class QApolloDbCache {
00034 public:
00035
00036
00037 virtual ~QApolloDbCache();
00038
00039 private:
00040
00041
00042 QApolloDbCache();
00043
00048 void Dump(unsigned short crateId, bool isDump) const;
00049
00053 const QDaqChannel& DaqChan(unsigned short Lg) const;
00054
00061 int GetBoards(unsigned short crate,
00062 std::map<unsigned short,std::string>& boards) const;
00063
00074 unsigned short GetActiveChannels(unsigned short crate,
00075 unsigned short slot,
00076 QDaqChannel::SettingsType_t what,
00077 std::vector<QDaqChannel>& chList) const;
00078
00084 unsigned short GetMapping(std::map<unsigned short, QDaqChannel>& cMap) const;
00085
00092 unsigned short GetActiveChannels(std::map<unsigned short,QDaqChannel>& cMap,
00093 QDaqChannel::SettingsType_t what) const;
00094
00098 inline void Clear() {fChannels.clear();}
00099
00104 void FillDefaultTriggers(unsigned short crateId);
00105
00109 std::map<unsigned short, QDaqChannel> fChannels;
00110
00111 friend class QApolloDbBase;
00112 };
00113
00114 #endif // _QAPOLLODBCACHE_HH_