00001 00011 #ifndef _QAPOLLO_DB_HH_ 00012 #define _QAPOLLO_DB_HH_ 00013 00014 #include <string> 00015 00016 #include "QCuore.hh" 00017 #include "QDbDefs.hh" 00018 #include "QApolloDbBase.hh" 00019 #include "QApolloDbCache.hh" 00020 00021 00022 class QApolloDb { 00023 public: 00024 00025 virtual ~QApolloDb(); 00026 00027 protected: 00028 00032 QApolloDb(); 00033 00034 public: 00035 00037 bool Reset() 00038 { return QApolloDbBase::Get().Reset(); } 00039 00040 00044 const std::map<unsigned short,std::string>& CrateMap() const 00045 { return QApolloDbBase::Get().CrateMap(); } 00046 00047 00055 short GetListOfChannels(std::vector<unsigned short>& chList, 00056 unsigned short profileId = 0) 00057 { return QApolloDbBase::Get().GetListOfChannels(chList,profileId); } 00058 00059 00067 unsigned short GetMapping(std::map<unsigned short,QDaqChannel>& cMap) 00068 { return QApolloDbBase::Get().GetMapping(cMap); } 00069 00078 unsigned short GetActiveChannels(std::map<unsigned short,QDaqChannel>& cMap, 00079 QDaqChannel::SettingsType_t what) 00080 { return QApolloDbBase::Get().GetActiveChannels(cMap,what); } 00081 00082 00091 int GetBoards(unsigned short crateId, 00092 std::map<unsigned short,std::string>& boards ) 00093 { return QApolloDbBase::Get().GetBoards(crateId,boards); } 00094 00095 00109 int GetActiveChannels(unsigned short crateId, 00110 unsigned short slot, 00111 QDaqChannel::SettingsType_t what, 00112 std::vector<QDaqChannel>& v ) 00113 { return QApolloDbBase::Get().GetActiveChannels(crateId,slot,what,v); } 00114 00115 00128 void GetListOfTriggers(unsigned short lg, std::vector<std::string>& trgList) 00129 { return QApolloDbBase::Get().GetListOfTriggers(lg,trgList); } 00130 00131 00142 const QVdt& GetTrgParameter(unsigned short trgIndex, 00143 const std::string& par_name, 00144 unsigned short lg=0) 00145 { return QApolloDbBase::Get().GetTrgParameter(trgIndex,par_name,lg); } 00146 00147 00156 const std::map<std::string,QVdt>& GetTrgParameters(unsigned short trgIndex, 00157 unsigned short lg) 00158 { return QApolloDbBase::Get().GetTrgParameters(trgIndex,lg); } 00159 00160 00161 00167 bool Dump(unsigned short crateId, bool dump) 00168 { return QApolloDbBase::Get().Dump(crateId,dump); } 00169 00170 00174 virtual inline unsigned int GetCurrentRunNumber() const 00175 { return QApolloDbBase::Get().GetCurrentRunNumber(); } 00176 00177 00181 inline unsigned short GetCurrentProfile() const 00182 { return QApolloDbBase::Get().GetCurrentProfile(); } 00183 00184 00188 inline RunType GetCurrentRunType() const 00189 { return QApolloDbBase::Get().GetCurrentRunType(); } 00190 00191 00208 void GetSettingsBaskets(unsigned short howMany, 00209 std::map<std::string,std::vector<QVdt> >& basketsMap) 00210 { return QApolloDbBase::Get().GetSettingsBaskets(howMany,basketsMap); } 00211 00212 00219 unsigned short GetSettingsBasketIds(std::vector<unsigned short>& baskets) 00220 { return QApolloDbBase::Get().GetSettingsBasketIds(baskets); } 00221 00231 unsigned short GetSettingsBasket(unsigned short id,std::string& comment) 00232 { return QApolloDbBase::Get().GetSettingsBasket(id,comment); } 00233 00247 void GetRunTypes(std::map<unsigned short, std::string>& runTypes) 00248 { return QApolloDbBase::Get().GetRunTypes(runTypes); } 00249 00254 unsigned int GetPulserPeriod() 00255 { return QApolloDbBase::Get().GetPulserPeriod(); } 00260 void GetRuns(std::vector<unsigned int>& runs) 00261 { return QApolloDbBase::Get().GetRuns(runs); } 00262 00268 unsigned int GetLastRun() 00269 {return QApolloDbBase::Get().GetLastRun();} 00270 00271 }; 00272 00273 #endif // _QAPOLLO_DB_HH_