00001 #ifndef _ots_ROCDACs_h_
00002 #define _ots_ROCDACs_h_
00003
00004 #include <map>
00005 #include <string>
00006 #include <utility>
00007
00008 namespace ots{
00009
00010 typedef std::map<std::string, std::pair<unsigned int, unsigned int> > DACList;
00011
00012 class ROCDACs
00013 {
00014
00015 public:
00016
00017 ROCDACs(void){;}
00018 virtual ~ROCDACs(void){;}
00019 void clear(void){theDACList_.clear();}
00020
00021
00022
00023
00024 void setDAC(std::string name, unsigned int address, unsigned int value) {theDACList_[name] = std::pair<unsigned int, unsigned int>(address, value);}
00025
00026
00027 const std::pair<unsigned int, unsigned int>& getDAC (std::string name) const {return theDACList_.find(name)->second;}
00028 unsigned int getDACAddress (std::string name) const {return theDACList_.find(name)->second.first;}
00029 unsigned int getDACValue (std::string name) const {return theDACList_.find(name)->second.second;}
00030 const DACList getDACList (void) const {return theDACList_;}
00031
00032 protected:
00033 DACList theDACList_;
00034
00035 };
00036 }
00037 #endif