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

ConfigurationXMLImpl Class Reference

#include <configXMLImpl.h>

Inheritance diagram for ConfigurationXMLImpl:

SctConfiguration::Configuration

Public Member Functions

 ConfigurationXMLImpl ()
 Parse the xml configuration and do XInclude processing The Configuration file will be loaded from environment variable SCTDAQ_ROD_CONFIGURATION_PATH.

virtual ~ConfigurationXMLImpl ()
 Free resources.

std::list< unsigned int > listPartitions ()
 List partition ids Lookup the partitions defined in the configuration and return a list of integer ID's.

std::list< unsigned int > listCratesInPartition (unsigned int partition)
 List crate ids with reference to the given partition Lookup the crates defined in the specified partition and return a list of integer ID's.

bool isDummyCrate (unsigned int partition, unsigned int crate)
 Check if this should be a dummy crate.

std::list< unsigned int > listRodsInCrate (unsigned int partition, unsigned int crate)
 List the rods present in a crate Lookup the RODs defined in the specified crate and return a list of integer ID's.

std::list< unsigned int > listMURSInRod (unsigned int partition, unsigned int crate, unsigned int rod)
 List the MURs associated with a ROD Return integer id's of the MURs in the specified rod.

std::list< std::string > listModulesInMUR (unsigned int partition, unsigned int MUR)
 List the modules in the given MUR Return a list of serial numbers associated with the specified MUR.

std::list< std::string > listRModulesInMUR (unsigned int partition, unsigned int MUR)
 List the modules in the given MUR Return a list of serial numbers associated with the redundancy links of the specified MUR.

std::list< std::string > listAllModules ()
 Return a list of serial numbers of all modules that have configuration.

std::list< std::string > listUnusedModules ()
 Return a list of serial numbers of modules that have configuration but are not attached to an MUR.

ABCDModule getModuleConfig (const std::string module)
 Return the configuration for the module.

SctConfiguration::RodConfig getRodConfig (unsigned int partition, unsigned int crate, unsigned int rod)
 Return the Rod configuration Find the configuration associated with the specified ROD.

SctConfiguration::BOCChannelConfig getBOCConfig (unsigned int partition, unsigned int crate, unsigned int rod, unsigned int channel)
 Get the BOC configuration of one of 48 channels.

SctConfiguration::BOCGlobalConfig getBOCGlobalConfig (unsigned int partition, unsigned int crate, unsigned int rod)
 Get the BOCs global configuration.

char * getFibreMappings (unsigned int partition, unsigned int crate, unsigned int rod)
 Get the BOC fibre mappings.

SctConfiguration::TimConfig getTimConfig (unsigned int partition, unsigned int crate)
 Return the TIM configuration Find the configuration associated with the specified TIM.

void setFibreMapping (unsigned int partition, unsigned int crate, unsigned int rod, unsigned int channel, unsigned int tx, unsigned int rx0, unsigned int rx1)
 Set fibre mappings for one channel.

void printModuleConfig (const ABCDModule &conf)
 Print module configuration to cout.

SctConfiguration::MURType getMURType (unsigned int MUR)
void translateToROD (unsigned int MUR, unsigned int module, unsigned int &partition, unsigned int &crate, unsigned int &rod, unsigned int &channel)
 Translate from MUR / module(1-6) number to p/k/r/c.

void translateToRROD (unsigned int MUR, unsigned int module, unsigned int &partition, unsigned int &crate, unsigned int &rod, unsigned int &channel)
 Translate from MUR / module(1-6) number to p/k/r/c.

void translateToSN (unsigned int MUR, unsigned int module, std::string &sn)
 Translate from MUR / module(1-6) number to serial number.

void translateToBarrel (unsigned int MUR, unsigned int module, unsigned int &barrel, unsigned int &row, int &number)
 Translate from MUR / module(1-6) number to geographical barrel system.

void translateToEndcap (unsigned int MUR, unsigned int module, unsigned int &disk, unsigned int &ring, unsigned int &number)
 Translate from MUR / module(1-6) number to geographical endcap system.

void translateToPowerSupply (unsigned int MUR, unsigned int module, unsigned int &partition, unsigned int &crate, unsigned int &channel)
 Translate from MUR / module(1-6) number to power supply channel address.

void translateFromROD (unsigned int partition, unsigned int crate, unsigned int rod, unsigned int channel, unsigned int &MUR, unsigned int &module)
 Translate to MUR / module(1-6) number from p/k/r/c.

void translateFromRROD (unsigned int partition, unsigned int crate, unsigned int rod, unsigned int channel, unsigned int &MUR, unsigned int &module)
 Translate to MUR / module(1-6) number from address of redundant module.

void translateFromSN (const std::string sn, unsigned int &MUR, unsigned int &module)
 Translate to MUR / module(1-6) number from serial number.

void translateFromBarrel (unsigned int barrel, unsigned int row, int number, unsigned int &MUR, unsigned int &module)
 Translate to MUR / module(1-6) number from geographical barrel system.

void translateFromEndcap (unsigned int disk, unsigned int ring, unsigned int number, unsigned int &MUR, unsigned int &module)
 Translate to MUR / module(1-6) number from geographical endcap system.

void translateFromPowerSupply (unsigned int partition, unsigned int crate, unsigned int channel, unsigned int &MUR, unsigned int &module)
 Translate from power supply channel address to MUR / module(1-6) number.

void configureModuleFromStructure (const std::string module, const ABCDModule conf)
 Update or add the configuration of a module stored in memory Replace the configuration for the given module with the data stored in the given configuration.

void configureModuleFromFile (const std::string filename)
 Update or add the configuration of a module stored in memory Replace the configuration for the given module with the data stored in the given file (the serial number is read from the file).

void configureROD (unsigned int partition, unsigned int crate, unsigned int rod, SctConfiguration::RodConfig conf)
 Configure a ROD.

void configureTIM (unsigned int partition, unsigned int crate, SctConfiguration::TimConfig conf)
 Configure a TIM.

void configureBOC (unsigned int partition, unsigned int crate, unsigned int rod, const SctConfiguration::BOCGlobalConfig &conf)
 Set a BOC configuration.

void clearAll ()
 Remove all configuration.

void namePartition (int partition, const std::string name)
 Name a partition (for information, any use?).

void configureBOCChannel (int MUR, int position, const SctConfiguration::BOCChannelConfig &conf)
 Set a BOC configuration.

void mapModuleMUR (int MUR, int order, int RMUR, int rorder, std::string number)
 Map a module (by serial number) onto a position in an MUR.

void mapRODMUR (int partition, int crate, int rod, int order, int number)
 Map an MUR.

void mapBarrelMUR (int MUR, int barrel, int row, int position)
 Map Barrel MUR.

void mapEndcapMUR (int MUR, int disk, int quadrant, int position)
 Map Endcap MUR.

void swapMURNames (int MUR1, int MUR2)
 Swap two MUR names around.

void mapPowerChannel (int MUR, int number, unsigned int partition, unsigned int crate, unsigned int channel)
 Map Power channel.

void modifyPowerParam (int MUR, int number, std::string name, float value)
 Set power supply parameter.

void modifyDefaultPowerParam (std::string name, float value)
 Set default power supply parameter.

float getPowerParam (int MUR, int number, std::string name)
 Get power supply parameter.

void loadConfiguration (const std::string &filename)
 Load configuration from named file.

void saveConfiguration (const std::string filename="")
 Save the current configuration.

void saveModuleConfiguration (const std::string modsn, const std::string filename)
 Save the current configuration for a module.

std::string getModuleConfigurationString (const std::string modsn, const ABCDModule config)
 Construct the XML for a module configuration and return as a string.

void writePowerSupplyConfiguration (std::string filename)
 Dump power supply configuration to a file.


Protected Member Functions

void createPartition (int partition)
 Create a partition.

void createCrate (int partition, int crate)
 Create a crate.

void createROD (int partition, int crate, int rod)
 Create a ROD.

void createMUR (int partition, int crate, int rod, int order, int number)
 Create an MUR.

void createBOCConfig (int MUR, int order, const SctConfiguration::BOCChannelConfig &bConf)
 Create a BOC configuration.


Private Member Functions

 ConfigurationXMLImpl (const ConfigurationXMLImpl &)
ConfigurationXMLImpl & operator= (const ConfigurationXMLImpl &)
void updateRodConfig (unsigned int partition, unsigned int crate, unsigned int rod, SctConfiguration::RodConfig conf)
 Update the ROD configuration stored in memory.

xmlNodePtr getQueryNode (const std::string query, const std::string task)
 Query the configuration with an XPath expression, task is for error reporting.

int getAttrAsInt (xmlNodePtr node, const char *attr, int base=0)
 Return contents of named attribute parsed as an int.

std::string getAttrAsString (xmlNodePtr node, const char *attr)
 Return contents of named attribute as a standard string.

xmlNodePtr getChildNode (xmlNodePtr node, const char *name)
 Return the first element node called name that is a child of node.

xmlNodePtr getOrNewChildNode (xmlNodePtr node, const char *name)
 Return the first element node called name that is a child of node.

void setOrCreateChildNodeWithContent (xmlNodePtr node, const char *name, const char *content)
 Set the content of the named child to content.

xmlNodePtr getOrNewChildWithIntAttr (xmlNodePtr, const char *name, const char *attr, int integer)
 Return child with integer attribute.

xmlNodePtr getNodeWithIntAttr (xmlNodePtr node, const char *name, const char *attr, int integer)
 Return the first child element with the attribute equal to integer.

void setIntAttr (xmlNodePtr node, const char *attr, int integer)
 Set integer attribute.

const ABCDModule parseModuleConfig (xmlNodePtr node)
 Parse the xml tree provided and return the module configuration.

const SctConfiguration::RodConfig parseRodConfig (xmlNodePtr node)
 Parse the xml tree provided and return the ROD configuration.

const SctConfiguration::TimConfig parseTimConfig (xmlNodePtr node)
 Parse the xml tree provided and return the TIM configuration.

void replaceModuleConfig (xmlNodePtr node, const ABCDModule conf, const std::string name)
 Replace the configuration in the given node with the data stored in the given configuration.

void writeCSV (std::string filename, std::vector< std::pair< std::string, bool > > headers, std::vector< std::vector< std::string > > body)
 Write a CSV file (or whatever you call it with tabs) to filename headers provides the header name and bool saying that the contents should be enclosed in "".


Private Attributes

xmlDocPtr document
xmlXPathContextPtr xpathContext
Log log
std::string lastFilename

Static Private Attributes

ConfigurationXMLImpl * m_config

Constructor & Destructor Documentation

ConfigurationXMLImpl::ConfigurationXMLImpl const ConfigurationXMLImpl &    [private]
 

ConfigurationXMLImpl::ConfigurationXMLImpl  
 

Parse the xml configuration and do XInclude processing The Configuration file will be loaded from environment variable SCTDAQ_ROD_CONFIGURATION_PATH.

virtual ConfigurationXMLImpl::~ConfigurationXMLImpl   [virtual]
 

Free resources.


Member Function Documentation

void ConfigurationXMLImpl::clearAll   [virtual]
 

Remove all configuration.

Very dangerous!!

Implements SctConfiguration::Configuration.

void ConfigurationXMLImpl::configureBOC unsigned int    partition,
unsigned int    crate,
unsigned int    rod,
const SctConfiguration::BOCGlobalConfig   conf
 

Set a BOC configuration.

void ConfigurationXMLImpl::configureBOCChannel int    MUR,
int    position,
const SctConfiguration::BOCChannelConfig   conf
 

Set a BOC configuration.

void ConfigurationXMLImpl::configureModuleFromFile const std::string    filename [virtual]
 

Update or add the configuration of a module stored in memory Replace the configuration for the given module with the data stored in the given file (the serial number is read from the file).

Implements SctConfiguration::Configuration.

void ConfigurationXMLImpl::configureModuleFromStructure const std::string    module,
const ABCDModule    conf
[virtual]
 

Update or add the configuration of a module stored in memory Replace the configuration for the given module with the data stored in the given configuration.

Implements SctConfiguration::Configuration.

void ConfigurationXMLImpl::configureROD unsigned int    partition,
unsigned int    crate,
unsigned int    rod,
SctConfiguration::RodConfig    conf
[virtual]
 

Configure a ROD.

Replace the in memory configuration for the given ROD with the configuration provided.

If no configuration then construct it

Implements SctConfiguration::Configuration.

void ConfigurationXMLImpl::configureTIM unsigned int    partition,
unsigned int    crate,
SctConfiguration::TimConfig    conf
[virtual]
 

Configure a TIM.

Replace the in memory configuration for the given TIM with the configuration provided.

If no configuration then construct it

Implements SctConfiguration::Configuration.

void ConfigurationXMLImpl::createBOCConfig int    MUR,
int    order,
const SctConfiguration::BOCChannelConfig   bConf
[protected]
 

Create a BOC configuration.

void ConfigurationXMLImpl::createCrate int    partition,
int    crate
[protected]
 

Create a crate.

void ConfigurationXMLImpl::createMUR int    partition,
int    crate,
int    rod,
int    order,
int    number
[protected]
 

Create an MUR.

void ConfigurationXMLImpl::createPartition int    partition [protected]
 

Create a partition.

void ConfigurationXMLImpl::createROD int    partition,
int    crate,
int    rod
[protected]
 

Create a ROD.

int ConfigurationXMLImpl::getAttrAsInt xmlNodePtr    node,
const char *    attr,
int    base = 0
[private]
 

Return contents of named attribute parsed as an int.

Default to guessing the base

Throws: ConfigurationException if no attribute

std::string ConfigurationXMLImpl::getAttrAsString xmlNodePtr    node,
const char *    attr
[private]
 

Return contents of named attribute as a standard string.

Frees the value returned by xmlGetProp Throws: ConfigurationException if no attribute

SctConfiguration::BOCChannelConfig ConfigurationXMLImpl::getBOCConfig unsigned int    partition,
unsigned int    crate,
unsigned int    rod,
unsigned int    channel
[virtual]
 

Get the BOC configuration of one of 48 channels.

Input channels are paired as one.

Implements SctConfiguration::Configuration.

SctConfiguration::BOCGlobalConfig ConfigurationXMLImpl::getBOCGlobalConfig unsigned int    partition,
unsigned int    crate,
unsigned int    rod
[virtual]
 

Get the BOCs global configuration.

Implements SctConfiguration::Configuration.

xmlNodePtr ConfigurationXMLImpl::getChildNode xmlNodePtr    node,
const char *    name
[private]
 

Return the first element node called name that is a child of node.

If not present throw exception

char* ConfigurationXMLImpl::getFibreMappings unsigned int    partition,
unsigned int    crate,
unsigned int    rod
[virtual]
 

Get the BOC fibre mappings.

An array of 48*3 chars (out, in0, in1)

Implements SctConfiguration::Configuration.

ABCDModule ConfigurationXMLImpl::getModuleConfig const std::string    module [virtual]
 

Return the configuration for the module.

Deprecated: Should take MUR argument

Implements SctConfiguration::Configuration.

std::string ConfigurationXMLImpl::getModuleConfigurationString const std::string    modsn,
const ABCDModule    config
[virtual]
 

Construct the XML for a module configuration and return as a string.

Implements SctConfiguration::Configuration.

SctConfiguration::MURType ConfigurationXMLImpl::getMURType unsigned int    MUR [virtual]
 

Implements SctConfiguration::Configuration.

xmlNodePtr ConfigurationXMLImpl::getNodeWithIntAttr xmlNodePtr    node,
const char *    name,
const char *    attr,
int    integer
[private]
 

Return the first child element with the attribute equal to integer.

xmlNodePtr ConfigurationXMLImpl::getOrNewChildNode xmlNodePtr    node,
const char *    name
[private]
 

Return the first element node called name that is a child of node.

If not present return new one

xmlNodePtr ConfigurationXMLImpl::getOrNewChildWithIntAttr xmlNodePtr   ,
const char *    name,
const char *    attr,
int    integer
[private]
 

Return child with integer attribute.

Create if doesn't already exist

float ConfigurationXMLImpl::getPowerParam int    MUR,
int    number,
std::string    name
[virtual]
 

Get power supply parameter.

Implements SctConfiguration::Configuration.

xmlNodePtr ConfigurationXMLImpl::getQueryNode const std::string    query,
const std::string    task
[private]
 

Query the configuration with an XPath expression, task is for error reporting.

Throws ConfigurationException if not exactly 1 node in result

SctConfiguration::RodConfig ConfigurationXMLImpl::getRodConfig unsigned int    partition,
unsigned int    crate,
unsigned int    rod
[virtual]
 

Return the Rod configuration Find the configuration associated with the specified ROD.

Return a RodConfig structure.

Implements SctConfiguration::Configuration.

SctConfiguration::TimConfig ConfigurationXMLImpl::getTimConfig unsigned int    partition,
unsigned int    crate
[virtual]
 

Return the TIM configuration Find the configuration associated with the specified TIM.

Return a TimConfig structure.

Implements SctConfiguration::Configuration.

bool ConfigurationXMLImpl::isDummyCrate unsigned int    partition,
unsigned int    crate
[virtual]
 

Check if this should be a dummy crate.

Implements SctConfiguration::Configuration.

std::list<std::string> ConfigurationXMLImpl::listAllModules   [virtual]
 

Return a list of serial numbers of all modules that have configuration.

This includes those that are not attached to a ROD or MUR

Implements SctConfiguration::Configuration.

std::list<unsigned int> ConfigurationXMLImpl::listCratesInPartition unsigned int    partition [virtual]
 

List crate ids with reference to the given partition Lookup the crates defined in the specified partition and return a list of integer ID's.

Implements SctConfiguration::Configuration.

std::list<std::string> ConfigurationXMLImpl::listModulesInMUR unsigned int    partition,
unsigned int    MUR
[virtual]
 

List the modules in the given MUR Return a list of serial numbers associated with the specified MUR.

FIXME: Should be in numbered order

Implements SctConfiguration::Configuration.

std::list<unsigned int> ConfigurationXMLImpl::listMURSInRod unsigned int    partition,
unsigned int    crate,
unsigned int    rod
[virtual]
 

List the MURs associated with a ROD Return integer id's of the MURs in the specified rod.

FIXME: Should be in numbered order

Implements SctConfiguration::Configuration.

std::list<unsigned int> ConfigurationXMLImpl::listPartitions   [virtual]
 

List partition ids Lookup the partitions defined in the configuration and return a list of integer ID's.

Implements SctConfiguration::Configuration.

std::list<std::string> ConfigurationXMLImpl::listRModulesInMUR unsigned int    partition,
unsigned int    MUR
[virtual]
 

List the modules in the given MUR Return a list of serial numbers associated with the redundancy links of the specified MUR.

FIXME: Should be in numbered order (array?)

Implements SctConfiguration::Configuration.

std::list<unsigned int> ConfigurationXMLImpl::listRodsInCrate unsigned int    partition,
unsigned int    crate
[virtual]
 

List the rods present in a crate Lookup the RODs defined in the specified crate and return a list of integer ID's.

Implements SctConfiguration::Configuration.

std::list<std::string> ConfigurationXMLImpl::listUnusedModules   [virtual]
 

Return a list of serial numbers of modules that have configuration but are not attached to an MUR.

Implements SctConfiguration::Configuration.

void ConfigurationXMLImpl::loadConfiguration const std::string &    filename [virtual]
 

Load configuration from named file.

Implements SctConfiguration::Configuration.

void ConfigurationXMLImpl::mapBarrelMUR int    MUR,
int    barrel,
int    row,
int    position
[virtual]
 

Map Barrel MUR.

Implements SctConfiguration::Configuration.

void ConfigurationXMLImpl::mapEndcapMUR int    MUR,
int    disk,
int    quadrant,
int    position
[virtual]
 

Map Endcap MUR.

Implements SctConfiguration::Configuration.

void ConfigurationXMLImpl::mapModuleMUR int    MUR,
int    order,
int    RMUR,
int    rorder,
std::string    number
[virtual]
 

Map a module (by serial number) onto a position in an MUR.

Implements SctConfiguration::Configuration.

void ConfigurationXMLImpl::mapPowerChannel int    MUR,
int    number,
unsigned int    partition,
unsigned int    crate,
unsigned int    channel
[virtual]
 

Map Power channel.

Implements SctConfiguration::Configuration.

void ConfigurationXMLImpl::mapRODMUR int    partition,
int    crate,
int    rod,
int    order,
int    number
[virtual]
 

Map an MUR.

Implements SctConfiguration::Configuration.

void ConfigurationXMLImpl::modifyDefaultPowerParam std::string    name,
float    value
[virtual]
 

Set default power supply parameter.

Implements SctConfiguration::Configuration.

void ConfigurationXMLImpl::modifyPowerParam int    MUR,
int    number,
std::string    name,
float    value
[virtual]
 

Set power supply parameter.

Implements SctConfiguration::Configuration.

void ConfigurationXMLImpl::namePartition int    partition,
const std::string    name
[virtual]
 

Name a partition (for information, any use?).

Implements SctConfiguration::Configuration.

ConfigurationXMLImpl& ConfigurationXMLImpl::operator= const ConfigurationXMLImpl &    [private]
 

const ABCDModule ConfigurationXMLImpl::parseModuleConfig xmlNodePtr    node [private]
 

Parse the xml tree provided and return the module configuration.

const SctConfiguration::RodConfig ConfigurationXMLImpl::parseRodConfig xmlNodePtr    node [private]
 

Parse the xml tree provided and return the ROD configuration.

const SctConfiguration::TimConfig ConfigurationXMLImpl::parseTimConfig xmlNodePtr    node [private]
 

Parse the xml tree provided and return the TIM configuration.

void ConfigurationXMLImpl::printModuleConfig const ABCDModule   conf [virtual]
 

Print module configuration to cout.

Implements SctConfiguration::Configuration.

void ConfigurationXMLImpl::replaceModuleConfig xmlNodePtr    node,
const ABCDModule    conf,
const std::string    name
[private]
 

Replace the configuration in the given node with the data stored in the given configuration.

void ConfigurationXMLImpl::saveConfiguration const std::string    filename = "" [virtual]
 

Save the current configuration.

Write configuration to disc. If no filename is provided a unique filename based on the date and time is created.

Filename eg Conf_dump_20021210142311.xml.gz (in current directory)

Implements SctConfiguration::Configuration.

void ConfigurationXMLImpl::saveModuleConfiguration const std::string    modsn,
const std::string    filename
[virtual]
 

Save the current configuration for a module.

Write the configuration for the module modsn to disc.

Implements SctConfiguration::Configuration.

void ConfigurationXMLImpl::setFibreMapping unsigned int    partition,
unsigned int    crate,
unsigned int    rod,
unsigned int    channel,
unsigned int    tx,
unsigned int    rx0,
unsigned int    rx1
[virtual]
 

Set fibre mappings for one channel.

Any value over 48/96 leaves current value unchanged

Implements SctConfiguration::Configuration.

void ConfigurationXMLImpl::setIntAttr xmlNodePtr    node,
const char *    attr,
int    integer
[private]
 

Set integer attribute.

void ConfigurationXMLImpl::setOrCreateChildNodeWithContent xmlNodePtr    node,
const char *    name,
const char *    content
[private]
 

Set the content of the named child to content.

If not present create new child node

void ConfigurationXMLImpl::swapMURNames int    MUR1,
int    MUR2
[virtual]
 

Swap two MUR names around.

This means in regards to everything about one MUR you can use the other name If either doesn't exist then just one MUR is renamed

Implements SctConfiguration::Configuration.

void ConfigurationXMLImpl::translateFromBarrel unsigned int    barrel,
unsigned int    row,
int    number,
unsigned int &    MUR,
unsigned int &    module
[virtual]
 

Translate to MUR / module(1-6) number from geographical barrel system.

Implements SctConfiguration::Configuration.

void ConfigurationXMLImpl::translateFromEndcap unsigned int    disk,
unsigned int    ring,
unsigned int    number,
unsigned int &    MUR,
unsigned int &    module
[virtual]
 

Translate to MUR / module(1-6) number from geographical endcap system.

Implements SctConfiguration::Configuration.

void ConfigurationXMLImpl::translateFromPowerSupply unsigned int    partition,
unsigned int    crate,
unsigned int    channel,
unsigned int &    MUR,
unsigned int &    module
[virtual]
 

Translate from power supply channel address to MUR / module(1-6) number.

Implements SctConfiguration::Configuration.

void ConfigurationXMLImpl::translateFromROD unsigned int    partition,
unsigned int    crate,
unsigned int    rod,
unsigned int    channel,
unsigned int &    MUR,
unsigned int &    module
[virtual]
 

Translate to MUR / module(1-6) number from p/k/r/c.

Implements SctConfiguration::Configuration.

void ConfigurationXMLImpl::translateFromRROD unsigned int    partition,
unsigned int    crate,
unsigned int    rod,
unsigned int    channel,
unsigned int &    MUR,
unsigned int &    module
[virtual]
 

Translate to MUR / module(1-6) number from address of redundant module.

This returns the MUR/module of the module connected using its redundant link to the p/k/r/c address

Implements SctConfiguration::Configuration.

void ConfigurationXMLImpl::translateFromSN const std::string    sn,
unsigned int &    MUR,
unsigned int &    module
[virtual]
 

Translate to MUR / module(1-6) number from serial number.

Implements SctConfiguration::Configuration.

void ConfigurationXMLImpl::translateToBarrel unsigned int    MUR,
unsigned int    module,
unsigned int &    barrel,
unsigned int &    row,
int &    number
[virtual]
 

Translate from MUR / module(1-6) number to geographical barrel system.

Implements SctConfiguration::Configuration.

void ConfigurationXMLImpl::translateToEndcap unsigned int    MUR,
unsigned int    module,
unsigned int &    disk,
unsigned int &    ring,
unsigned int &    number
[virtual]
 

Translate from MUR / module(1-6) number to geographical endcap system.

Implements SctConfiguration::Configuration.

void ConfigurationXMLImpl::translateToPowerSupply unsigned int    MUR,
unsigned int    module,
unsigned int &    partition,
unsigned int &    crate,
unsigned int &    channel
[virtual]
 

Translate from MUR / module(1-6) number to power supply channel address.

Implements SctConfiguration::Configuration.

void ConfigurationXMLImpl::translateToROD unsigned int    MUR,
unsigned int    module,
unsigned int &    partition,
unsigned int &    crate,
unsigned int &    rod,
unsigned int &    channel
[virtual]
 

Translate from MUR / module(1-6) number to p/k/r/c.

Implements SctConfiguration::Configuration.

void ConfigurationXMLImpl::translateToRROD unsigned int    MUR,
unsigned int    module,
unsigned int &    partition,
unsigned int &    crate,
unsigned int &    rod,
unsigned int &    channel
[virtual]
 

Translate from MUR / module(1-6) number to p/k/r/c.

This returns the channel to which the module referred to by MUR/module is connected in its redundant configuration

Implements SctConfiguration::Configuration.

void ConfigurationXMLImpl::translateToSN unsigned int    MUR,
unsigned int    module,
std::string &    sn
[virtual]
 

Translate from MUR / module(1-6) number to serial number.

Implements SctConfiguration::Configuration.

void ConfigurationXMLImpl::updateRodConfig unsigned int    partition,
unsigned int    crate,
unsigned int    rod,
SctConfiguration::RodConfig    conf
[private]
 

Update the ROD configuration stored in memory.

Replace the in memory configuration for the given ROD with the configuration provided.

void ConfigurationXMLImpl::writeCSV std::string    filename,
std::vector< std::pair< std::string, bool > >    headers,
std::vector< std::vector< std::string > >    body
[private]
 

Write a CSV file (or whatever you call it with tabs) to filename headers provides the header name and bool saying that the contents should be enclosed in "".

void ConfigurationXMLImpl::writePowerSupplyConfiguration std::string    filename [virtual]
 

Dump power supply configuration to a file.

Implements SctConfiguration::Configuration.


Field Documentation

xmlDocPtr ConfigurationXMLImpl::document [private]
 

Definition at line 17 of file configXMLImpl.h.

std::string ConfigurationXMLImpl::lastFilename [private]
 

Definition at line 22 of file configXMLImpl.h.

Log ConfigurationXMLImpl::log [private]
 

Definition at line 20 of file configXMLImpl.h.

ConfigurationXMLImpl* ConfigurationXMLImpl::m_config [static, private]
 

Definition at line 15 of file configXMLImpl.h.

xmlXPathContextPtr ConfigurationXMLImpl::xpathContext [private]
 

Definition at line 18 of file configXMLImpl.h.


The documentation for this class was generated from the following file:
Generated on Mon Dec 15 19:37:01 2003 for SCT DAQ/DCS Software by doxygen1.3-rc3