Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages

SctAnalysis::ConfigurationInterface Class Reference

Analysis Service's "personal" interface/cache to configuration. More...

#include <ConfigurationInterface.h>


Public Member Functions

 ConfigurationInterface (boost::shared_ptr< SctConfiguration::Configuration > config)
 takes ownership of configuration and subscribes for changes to is

 ~ConfigurationInterface ()
 destructor

std::string getDcsId (const std::string &modulename) const
 get Dcs identifier string CrateXX.ChannelXX for a module

void update ()
 rebuild personal map

bool empty () const
 return true if no modules are mapped

void print (std::ostream &os) const
 output some information


Static Public Member Functions

void updateCallback (ISCallbackInfo *isc)
 called when configuration changes


Private Member Functions

std::string encode (unsigned partition, unsigned crate, unsigned channel)
 encoding for p_c_c


Private Attributes

boost::recursive_mutex m_access
 for thread-safe access:

std::map< std::string, std::string > m_map
 personal map of partition information

boost::shared_ptr< SctConfiguration::Configurationm_config
 client to the configuration service

boost::shared_ptr< ISInfoReceiver > m_infoReceiver
 needs inforeceiver for watching for callbacks


Detailed Description

Analysis Service's "personal" interface/cache to configuration.

Keeps itself up-to-date by subscribing to the IS server which notifies of changes. On notification, obtains power mapping information from ConfigService servant implimentation.

Definition at line 19 of file ConfigurationInterface.h.


Constructor & Destructor Documentation

SctAnalysis::ConfigurationInterface::ConfigurationInterface boost::shared_ptr< SctConfiguration::Configuration config  ) 
 

takes ownership of configuration and subscribes for changes to is

SctAnalysis::ConfigurationInterface::~ConfigurationInterface  ) 
 

destructor

Definition at line 24 of file ConfigurationInterface.cpp.


Member Function Documentation

bool SctAnalysis::ConfigurationInterface::empty  )  const
 

return true if no modules are mapped

Definition at line 39 of file ConfigurationInterface.cpp.

References m_map.

std::string SctAnalysis::ConfigurationInterface::encode unsigned  partition,
unsigned  crate,
unsigned  channel
[private]
 

encoding for p_c_c

Definition at line 77 of file ConfigurationInterface.cpp.

Referenced by update().

std::string SctAnalysis::ConfigurationInterface::getDcsId const std::string &  modulename  )  const
 

get Dcs identifier string CrateXX.ChannelXX for a module

Returns:
null string if no match

Definition at line 27 of file ConfigurationInterface.cpp.

References m_map.

void SctAnalysis::ConfigurationInterface::print std::ostream &  os  )  const
 

output some information

Definition at line 84 of file ConfigurationInterface.cpp.

References m_access, and m_map.

Referenced by update().

void SctAnalysis::ConfigurationInterface::update  ) 
 

rebuild personal map

Definition at line 43 of file ConfigurationInterface.cpp.

References encode(), m_access, m_config, m_map, and print().

Referenced by updateCallback().

Here is the call graph for this function:

void SctAnalysis::ConfigurationInterface::updateCallback ISCallbackInfo *  isc  )  [static]
 

called when configuration changes

Definition at line 91 of file ConfigurationInterface.cpp.

References update().

Here is the call graph for this function:


Field Documentation

boost::recursive_mutex SctAnalysis::ConfigurationInterface::m_access [mutable, private]
 

for thread-safe access:

Definition at line 42 of file ConfigurationInterface.h.

Referenced by print(), and update().

boost::shared_ptr<SctConfiguration::Configuration> SctAnalysis::ConfigurationInterface::m_config [private]
 

client to the configuration service

Definition at line 46 of file ConfigurationInterface.h.

Referenced by update().

boost::shared_ptr<ISInfoReceiver> SctAnalysis::ConfigurationInterface::m_infoReceiver [private]
 

needs inforeceiver for watching for callbacks

Definition at line 48 of file ConfigurationInterface.h.

std::map<std::string, std::string> SctAnalysis::ConfigurationInterface::m_map [private]
 

personal map of partition information

Definition at line 44 of file ConfigurationInterface.h.

Referenced by empty(), getDcsId(), print(), and update().


The documentation for this class was generated from the following files:
Generated on Thu Dec 22 20:18:47 2005 for SCT DAQ/DCS Software - C++ by doxygen 1.3.5