SctAnalysis::ConfigurationInterface Class Reference

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

#include <ConfigurationInterface.h>

Collaboration diagram for SctAnalysis::ConfigurationInterface:

Collaboration graph
[legend]

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

static 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

Definition at line 17 of file ConfigurationInterface.cpp.

References Sct::SctNames::getPartition(), m_infoReceiver, and updateCallback().

Here is the call graph for this function:

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.

void SctAnalysis::ConfigurationInterface::update  ) 
 

rebuild personal map

Definition at line 43 of file ConfigurationInterface.cpp.

References encode(), m_access, m_config, m_map, and SctConfiguration::ConfigurationException::what().

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.

Referenced by ConfigurationInterface().


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.

Referenced by ConfigurationInterface().

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 Mon Feb 6 14:03:48 2006 for SCT DAQ/DCS Software - C++ by  doxygen 1.4.6