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/isinfo.h"
00008 #include <boost/thread.hpp>
00009 #include <boost/shared_ptr.hpp>
00010
00011 namespace SctAnalysis{
00012
00018 class ConfigurationInterface{
00019 public:
00021 ConfigurationInterface(boost::shared_ptr<SctConfiguration::Configuration> config);
00023 ~ConfigurationInterface();
00025
00030 std::string getDcsId(const std::string& modulename) const;
00032 void update();
00034 static void updateCallback(ISCallbackInfo* isc);
00036 bool empty() const;
00038 void print(std::ostream& os) const;
00039 private:
00041 mutable boost::recursive_mutex m_access;
00043 std::map<std::string, std::string> m_map;
00045 boost::shared_ptr<SctConfiguration::Configuration> m_config;
00047 boost::shared_ptr<ISInfoReceiver> m_infoReceiver;
00049 std::string encode(unsigned partition, unsigned crate, unsigned channel);
00050 private:
00051 ConfigurationInterface();
00052 };
00053 }
00054 #endif