ConfigurationXMLImpl Class Reference

xml implimentation of configuration More...

#include <configXMLImpl.h>

Inheritance diagram for ConfigurationXMLImpl:

Inheritance graph
[legend]
Collaboration diagram for ConfigurationXMLImpl:

Collaboration graph
[legend]

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.
short getModuleGroup (const std::string module)
 Return the group for this module.
void setModuleGroup (const std::string module, short group)
 Set the group for this module.
unsigned int getModuleErrorMask (unsigned int partition, unsigned int crate, unsigned int rod, unsigned int channel, unsigned int link)
 Return the error mask for this module, link = 0,1.
void setModuleErrorMask (unsigned int partition, unsigned int crate, unsigned int rod, unsigned int channel, unsigned int link, unsigned int mask)
 Set the error mask for this module, link = 0,1.
void setDefaultModuleErrorMask (unsigned int mask)
 Set the default error mask for all modules.
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::SlaveConfig getDefaultSlaveConfig (char type)
 Return the default slave configuration Find the configuration associated with the slave of the specified type Return a SlaveConfig structure.
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.
unsigned 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.
std::string printModuleConfig (const ABCDModule &conf)
 Print module configuration to cout.
SctConfiguration::MURType getMURType (unsigned int MUR)
unsigned int getFreeMurId ()
 Return an unused MUR id.
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 translateToRMUR (unsigned int MUR, unsigned int module, unsigned int &RMUR, unsigned int &rmodule)
 Translate from MUR / module(1-6) number to MUR/module of redundant connection.
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, 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 translateFromRMUR (unsigned int RMUR, unsigned int rmodule, unsigned int &MUR, unsigned int &module)
 Translate from redundant MUR / module(1-6) number to MUR/module via redundant connection.
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 (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 (unsigned int partition, const std::string name)
 Name a partition (for information, any use?).
void configureBOCChannel (unsigned int MUR, unsigned int position, const SctConfiguration::BOCChannelConfig &conf)
 Set a BOC configuration.
void mapModuleMUR (unsigned int MUR, unsigned int order, unsigned int RMUR, unsigned int rorder, std::string number)
 Map a module (by serial number) onto a position in an MUR.
void unmapModuleMUR (unsigned int MUR, unsigned int order)
 Unmap a module from a position in an MUR.
void mapRODMUR (unsigned int partition, unsigned int crate, unsigned int rod, unsigned int order, unsigned int number)
 Map an MUR.
void unmapRODMUR (unsigned int number)
 Unmap an MUR from a ROD.
void mapBarrelMUR (unsigned int MUR, unsigned int barrel, unsigned int row, int position)
 Map Barrel MUR.
void unmapBarrelMUR (unsigned int MUR)
 Unmap MUR from Barrel.
void getMapMURROD (unsigned int MUR, unsigned int &partition, unsigned int &crate, unsigned int &rod, unsigned int &order)
 Get mapping of MUR to ROD.
void getMapRODMUR (unsigned int partition, unsigned int crate, unsigned int rod, unsigned int order, unsigned int &MUR)
 Get mapping of ROD to MUR.
void getMapMURPhysical (unsigned int MUR, SctConfiguration::MURType &type, int &plane, int &section, int &position)
void mapEndcapMUR (unsigned int MUR, int disk, unsigned int quadrant, unsigned int position)
 Map Endcap MUR.
void unmapEndcapMUR (unsigned int MUR)
 Unmap Endcap MUR.
void swapMURNames (unsigned int MUR1, unsigned int MUR2)
 Swap two MUR names around.
void mapPowerChannel (unsigned int MUR, unsigned int number, unsigned int partition, unsigned int crate, unsigned int channel)
 Map Power channel.
void unmapPowerChannel (unsigned int MUR, unsigned int number)
 Unmap Power channel.
void modifyDefaultPowerParam (std::string state, std::string name, std::string type, float value)
 Set default power supply parameter.
void modifyHVCardParam (unsigned int crate, unsigned int card, std::string name, std::string type, float value)
 Set MoPS HV card parameter.
void modifyLVCardParam (unsigned int crate, unsigned int card, std::string name, std::string type, float value)
 Set MoPS LV card parameter.
void modifyPowerParam (unsigned int MUR, unsigned int number, std::string state, std::string name, std::string type, float value)
 Set MoPS channel parameter referenced by MUR/number.
void modifyPowerParamCC (unsigned int crate, unsigned int channel, std::string state, std::string name, std::string type, float value)
 Set MoPS channel parameter referenced by MoPS crate/channel.
float getDefaultPowerParam (std::string state, std::string name, std::string type)
 Get default value of any MoPS parameter.
float getHVCardParam (unsigned int crate, unsigned int card, std::string name, std::string type)
 Get MoPS HV card parameter.
float getLVCardParam (unsigned int crate, unsigned int card, std::string name, std::string type)
 Get MoPS LV card parameter.
float getPowerParam (unsigned int MUR, unsigned int number, std::string state, std::string name, std::string type)
 Get MoPS channel parameter referenced by MUR/number.
float getPowerParamCC (unsigned int crate, unsigned int channel, std::string state, std::string name, std::string type)
 Get MoPS channel parameter referenced by MoPS crate/channel.
std::list< std::string > listDefaultPowerParams ()
 List power params.
float getCratePowerParam (unsigned int crate, std::string name)
 Get param associated with the crate.
std::list< std::string > listDCSChannelParams ()
 List the channel parameters for DCS.
std::list< std::string > listDCSCardParams ()
 List the card parameters for DCS.
std::list< std::string > listDCSCrateParams ()
 List the crate parameters for DCS.
void useISForChanges (bool valid=true)
 Use IS.
void useMRSForMessages (bool valid=true)
 Use MRS.
void loadConfiguration (const std::string &filename)
 Load configuration from named file.
std::string getConfigurationFileName ()
 For informational purposes only.
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 (unsigned int partition)
 Create a partition.
void createCrate (unsigned int partition, unsigned int crate)
 Create a crate.
void createROD (unsigned int partition, unsigned int crate, unsigned int rod)
 Create a ROD.
xmlNodePtr getModuleConfigurationNode (std::string sn, std::string reason)
void notifyModuleConfChange ()
void notifyModuleMappingChange ()
void notifySystemStructureChange ()
void checkInitialised ()
void buildSerialToMurNode ()
void buildSerialToConfigNode ()

Protected Attributes

boost::mutex initialise_mutex
std::map< std::string, xmlNodePtr > serialToMurNode
bool serialToMurNodeBuilt
std::map< std::string, xmlNodePtr > serialToConfigNode
bool serialToConfigNodeBuilt

Private Member Functions

 ConfigurationXMLImpl (const ConfigurationXMLImpl &)
ConfigurationXMLImploperator= (const ConfigurationXMLImpl &)
ISInfoDictionary * getIsDict ()
 Return IS dictionary Find if not already created.
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.
std::list< xmlNodePtr > getQueryNodeList (const std::string query, const std::string task)
 Query the configuration with an XPath expression, task is for error reporting Returns list of nodes.
float getAttrAsFloat (xmlNodePtr node, const char *attr)
 Return contents of named attribute parsed as a float.
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 getChildNodeWithContent (xmlNodePtr node, const char *name, const char *content)
 Get child of node called name containing content.
xmlNodePtr getOrNewChildWithIntAttr (xmlNodePtr, const char *name, const char *attr, int integer)
 Return child with integer attribute.
xmlNodePtr getOrNewChildWithStringAttr (xmlNodePtr parent, const char *name, const char *attr, std::string value)
 Return child with string attribute.
xmlNodePtr getNodeWithIntAttr (xmlNodePtr node, const char *name, const char *attr, int integer)
 Return the first child element with the attribute equal to integer.
xmlNodePtr getNodeWithStringAttr (xmlNodePtr node, const char *name, const char *attr, std::string value)
 Return the first child element with the attribute equal to value.
void setFloatAttr (xmlNodePtr node, const char *attr, float floater)
 Set float attribute.
void setIntAttr (xmlNodePtr node, const char *attr, int integer)
 Set integer attribute.
void clearAttr (xmlNodePtr node, const char *attr)
 Clear 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.
xmlNodePtr 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.

Private Attributes

xmlDocPtr document
xmlXPathContextPtr xpathContext
Log log
std::string lastFilename
ISInfoDictionary * is_dict
bool useIS
bool useMRS
Timings timings

Static Private Attributes

static ConfigurationXMLImplm_config

Detailed Description

xml implimentation of configuration

Definition at line 19 of file configXMLImpl.h.


Constructor & Destructor Documentation

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::clearAttr xmlNodePtr  node,
const char *  attr
[private]
 

Clear attribute.

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

Set a BOC configuration.

Implements SctConfiguration::Configuration.

void ConfigurationXMLImpl::configureBOCChannel unsigned int  MUR,
unsigned int  position,
const SctConfiguration::BOCChannelConfig conf
[virtual]
 

Set a BOC configuration.

Implements SctConfiguration::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::createCrate unsigned int  partition,
unsigned int  crate
[protected]
 

Create a crate.

used by createROD

void ConfigurationXMLImpl::createPartition unsigned int  partition  )  [protected]
 

Create a partition.

used by namePartition, createCrate

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

Create a ROD.

used by mapRODMUR, configureROD

float ConfigurationXMLImpl::getAttrAsFloat xmlNodePtr  node,
const char *  attr
[private]
 

Return contents of named attribute parsed as a float.

Throws: ConfigurationException if no attribute

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

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

Get child of node called name containing content.

std::string ConfigurationXMLImpl::getConfigurationFileName  )  [virtual]
 

For informational purposes only.

Implements SctConfiguration::Configuration.

float ConfigurationXMLImpl::getCratePowerParam unsigned int  crate,
std::string  name
 

Get param associated with the crate.

float ConfigurationXMLImpl::getDefaultPowerParam std::string  state,
std::string  name,
std::string  type
[virtual]
 

Get default value of any MoPS parameter.

Implements SctConfiguration::Configuration.

SctConfiguration::SlaveConfig ConfigurationXMLImpl::getDefaultSlaveConfig char  type  )  [virtual]
 

Return the default slave configuration Find the configuration associated with the slave of the specified type Return a SlaveConfig structure.

Implements SctConfiguration::Configuration.

unsigned 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.

unsigned int ConfigurationXMLImpl::getFreeMurId  )  [virtual]
 

Return an unused MUR id.

Implements SctConfiguration::Configuration.

float ConfigurationXMLImpl::getHVCardParam unsigned int  crate,
unsigned int  card,
std::string  name,
std::string  type
[virtual]
 

Get MoPS HV card parameter.

Implements SctConfiguration::Configuration.

ISInfoDictionary* ConfigurationXMLImpl::getIsDict  )  [private]
 

Return IS dictionary Find if not already created.

float ConfigurationXMLImpl::getLVCardParam unsigned int  crate,
unsigned int  card,
std::string  name,
std::string  type
[virtual]
 

Get MoPS LV card parameter.

Implements SctConfiguration::Configuration.

void ConfigurationXMLImpl::getMapMURROD unsigned int  MUR,
unsigned int &  partition,
unsigned int &  crate,
unsigned int &  rod,
unsigned int &  order
[virtual]
 

Get mapping of MUR to ROD.

Implements SctConfiguration::Configuration.

void ConfigurationXMLImpl::getMapRODMUR unsigned int  partition,
unsigned int  crate,
unsigned int  rod,
unsigned int  order,
unsigned int &  MUR
[virtual]
 

Get mapping of ROD to MUR.

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.

unsigned int ConfigurationXMLImpl::getModuleErrorMask unsigned int  partition,
unsigned int  crate,
unsigned int  rod,
unsigned int  channel,
unsigned int  link
[virtual]
 

Return the error mask for this module, link = 0,1.

Implements SctConfiguration::Configuration.

short ConfigurationXMLImpl::getModuleGroup const std::string  module  )  [virtual]
 

Return the group for this module.

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::getNodeWithStringAttr xmlNodePtr  node,
const char *  name,
const char *  attr,
std::string  value
[private]
 

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

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

xmlNodePtr ConfigurationXMLImpl::getOrNewChildWithStringAttr xmlNodePtr  parent,
const char *  name,
const char *  attr,
std::string  value
[private]
 

Return child with string attribute.

Create if doesn't already exist

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

Get MoPS channel parameter referenced by MUR/number.

Implements SctConfiguration::Configuration.

float ConfigurationXMLImpl::getPowerParamCC unsigned int  crate,
unsigned int  channel,
std::string  state,
std::string  name,
std::string  type
[virtual]
 

Get MoPS channel parameter referenced by MoPS crate/channel.

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

std::list<xmlNodePtr> ConfigurationXMLImpl::getQueryNodeList const std::string  query,
const std::string  task
[private]
 

Query the configuration with an XPath expression, task is for error reporting Returns list of nodes.

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::listDCSCardParams  )  [virtual]
 

List the card parameters for DCS.

Implements SctConfiguration::Configuration.

std::list<std::string> ConfigurationXMLImpl::listDCSChannelParams  )  [virtual]
 

List the channel parameters for DCS.

Implements SctConfiguration::Configuration.

std::list<std::string> ConfigurationXMLImpl::listDCSCrateParams  )  [virtual]
 

List the crate parameters for DCS.

Implements SctConfiguration::Configuration.

std::list<std::string> ConfigurationXMLImpl::listDefaultPowerParams  )  [virtual]
 

List power params.

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 unsigned int  MUR,
unsigned int  barrel,
unsigned int  row,
int  position
[virtual]
 

Map Barrel MUR.

Implements SctConfiguration::Configuration.

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

Map Endcap MUR.

Implements SctConfiguration::Configuration.

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

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

Implements SctConfiguration::Configuration.

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

Map Power channel.

Implements SctConfiguration::Configuration.

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

Map an MUR.

Implements SctConfiguration::Configuration.

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

Set default power supply parameter.

Implements SctConfiguration::Configuration.

void ConfigurationXMLImpl::modifyHVCardParam unsigned int  crate,
unsigned int  card,
std::string  name,
std::string  type,
float  value
[virtual]
 

Set MoPS HV card parameter.

Implements SctConfiguration::Configuration.

void ConfigurationXMLImpl::modifyLVCardParam unsigned int  crate,
unsigned int  card,
std::string  name,
std::string  type,
float  value
[virtual]
 

Set MoPS LV card parameter.

Implements SctConfiguration::Configuration.

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

Set MoPS channel parameter referenced by MUR/number.

Implements SctConfiguration::Configuration.

void ConfigurationXMLImpl::modifyPowerParamCC unsigned int  crate,
unsigned int  channel,
std::string  state,
std::string  name,
std::string  type,
float  value
[virtual]
 

Set MoPS channel parameter referenced by MoPS crate/channel.

Implements SctConfiguration::Configuration.

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

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

Implements SctConfiguration::Configuration.

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.

std::string ConfigurationXMLImpl::printModuleConfig const ABCDModule &  conf  )  [virtual]
 

Print module configuration to cout.

Implements SctConfiguration::Configuration.

xmlNodePtr 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::setDefaultModuleErrorMask unsigned int  mask  )  [virtual]
 

Set the default error mask for all modules.

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::setFloatAttr xmlNodePtr  node,
const char *  attr,
float  floater
[private]
 

Set float attribute.

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

Set integer attribute.

void ConfigurationXMLImpl::setModuleErrorMask unsigned int  partition,
unsigned int  crate,
unsigned int  rod,
unsigned int  channel,
unsigned int  link,
unsigned int  mask
[virtual]
 

Set the error mask for this module, link = 0,1.

Implements SctConfiguration::Configuration.

void ConfigurationXMLImpl::setModuleGroup const std::string  module,
short  group
[virtual]
 

Set the group for this module.

Implements SctConfiguration::Configuration.

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 unsigned int  MUR1,
unsigned 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 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::translateFromRMUR unsigned int  RMUR,
unsigned int  rmodule,
unsigned int &  MUR,
unsigned int &  module
[virtual]
 

Translate from redundant MUR / module(1-6) number to MUR/module via redundant connection.

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,
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::translateToRMUR unsigned int  MUR,
unsigned int  module,
unsigned int &  RMUR,
unsigned int &  rmodule
[virtual]
 

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

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::unmapBarrelMUR unsigned int  MUR  )  [virtual]
 

Unmap MUR from Barrel.

Implements SctConfiguration::Configuration.

void ConfigurationXMLImpl::unmapEndcapMUR unsigned int  MUR  )  [virtual]
 

Unmap Endcap MUR.

Implements SctConfiguration::Configuration.

void ConfigurationXMLImpl::unmapModuleMUR unsigned int  MUR,
unsigned int  order
[virtual]
 

Unmap a module from a position in an MUR.

Implements SctConfiguration::Configuration.

void ConfigurationXMLImpl::unmapPowerChannel unsigned int  MUR,
unsigned int  number
[virtual]
 

Unmap Power channel.

Implements SctConfiguration::Configuration.

void ConfigurationXMLImpl::unmapRODMUR unsigned int  number  )  [virtual]
 

Unmap an MUR from a ROD.

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::useISForChanges bool  valid = true  )  [virtual]
 

Use IS.

Implements SctConfiguration::Configuration.

void ConfigurationXMLImpl::useMRSForMessages bool  valid = true  )  [virtual]
 

Use MRS.

Implements SctConfiguration::Configuration.

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

Dump power supply configuration to a file.

Implements SctConfiguration::Configuration.


The documentation for this class was generated from the following file:
Generated on Mon Feb 6 14:01:47 2006 for SCT DAQ/DCS Software - C++ by  doxygen 1.4.6