ConfigurationInterface.h

00001 #ifndef CONFIGURATION_INTERFACE_H
00002 #define CONFIGURATION_INTERFACE_H
00003 #include <map>
00004 #include <string>
00005 #include <memory>
00006 #include "sctConf/configuration.h"
00007 #include "is/info.h"
00008 #include "is/inforeceiver.h"
00009 #include <boost/thread.hpp>
00010 #include <boost/shared_ptr.hpp>
00011 
00012 namespace SctAnalysis{
00013 
00019   class ConfigurationInterface{
00020   public:
00022     ConfigurationInterface(boost::shared_ptr<SctConfiguration::Configuration> config);
00024     ~ConfigurationInterface();    
00026     /*std::string translateToModuleName(unsigned partition, unsigned crate, unsigned channel);*/
00031     std::string getDcsId(const std::string& modulename) const;
00033     void update();
00035     static void updateCallback(ISCallbackInfo* isc);
00037     bool empty() const;
00039     void print(std::ostream& os) const;
00040   private:
00042     mutable boost::recursive_mutex m_access;   
00044     std::map<std::string, std::string> m_map;
00046     boost::shared_ptr<SctConfiguration::Configuration> m_config;
00048     boost::shared_ptr<ISInfoReceiver> m_infoReceiver;
00050     std::string encode(unsigned partition, unsigned crate, unsigned channel);
00051   private:
00052     ConfigurationInterface();
00053   };
00054 }
00055 #endif

Generated on Mon Feb 6 14:01:18 2006 for SCT DAQ/DCS Software - C++ by  doxygen 1.4.6