#include <oksImpl.h>
Inheritance diagram for OksImpl:
Public Member Functions | |
OksImpl (bool readOnly=true) | |
Initialise system. | |
~OksImpl () | |
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. | |
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. | |
ABCDModule | getModuleConfig (std::string module) |
Return the configuration for the module. | |
RodConfig | getRodConfig (unsigned int partition, unsigned int crate, unsigned int rod) |
Return the Rod configuration Find the configuration associated with the specified ROD. | |
BOCChannelConfig | getBOCConfig (unsigned int partition, unsigned int crate, unsigned int rod, unsigned int channel) |
Get the BOC configuration of one of 48 channels. | |
char * | getBOCMappings (unsigned int partition, unsigned int crate, unsigned int rod) |
Get the BOC fibre mappings. | |
TimConfig | getTimConfig (unsigned int partition, unsigned int crate) |
Return the TIM configuration Find the configuration associated with the specified TIM. | |
void | setBOCMapping (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. | |
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 / redundant 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 | translateFromSN (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 | updateModuleConfig (std::string module, ABCDModule conf) |
Update the configuration of a module stored in memory Replace the configuration for the given module with the data stored in the given configuration. | |
void | updateRodConfig (unsigned int partition, unsigned int crate, unsigned int rod, RodConfig conf) |
Update the ROD configuration stored in memory. | |
void | clearAll () |
Remove all configuration. | |
void | namePartition (int partition, string name) |
Name a partition (for information, any use?). | |
void | createPartition (int partition) |
Create a partition. | |
void | createCrate (int partition, int crate) |
Create a crate. | |
void | createROD (int partition, int crate, int rod, RodConfig conf) |
Create a ROD. | |
void | createMUR (int partition, int crate, int rod, int order, int number) |
Create an MUR. | |
void | createModule (int MUR, int order, int RMUR, int rorder, string number, const ABCDModule &mConf) |
Create a module. | |
void | createBOCConfig (int MUR, int order, const BOCChannelConfig &bConf) |
Create a BOC configuration. | |
void | setBOCConfig (int partition, int crate, int rod, int channel, const BOCChannelConfig &conf) |
Set a BOC configuration. | |
void | loadConfiguration (const std::string &filename) |
Load configuration from named file. | |
void | saveConfiguration (std::string filename="") |
Save the current configuration. | |
Private Member Functions | |
OksImpl (const OksImpl &) | |
OksImpl & | operator= (const OksImpl &) |
xmlNodePtr | getQueryNode (std::string query, std::string task) |
Query the configuration with an XPath expression, task is for error reporting. | |
int | getAttrAsInt (xmlNodePtr node, const char *attr) |
Return contents of named attribute parsed as an int. | |
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. | |
const ABCDModule | parseModuleConfig (xmlNodePtr node) |
Parse the xml tree provided and return the module configuration. | |
const RodConfig | parseRodConfig (xmlNodePtr node) |
Parse the xml tree provided and return the ROD configuration. | |
const TimConfig | parseTimConfig (xmlNodePtr node) |
Parse the xml tree provided and return the TIM configuration. | |
void | replaceModuleConfig (xmlNodePtr node, ABCDModule conf, std::string name) |
Replace the configuration in the given node with the data stored in the given configuration. | |
OksObject * | getPartition (unsigned int p) |
OksObject * | getCrate (unsigned int p, unsigned int c) |
OksObject * | getRod (unsigned int p, unsigned int c, unsigned int r) |
OksObject * | getMUR (unsigned int m) |
OksObject * | getModule (unsigned short mur, unsigned char position) |
OksObject * | getObjectFromRelationship (const OksObject *obj, const std::string rel) |
unsigned long | getULongData (const OksObject *obj, const std::string attr) |
unsigned short | getUShortData (const OksObject *obj, const std::string attr) |
unsigned char | getUCharData (const OksObject *obj, const std::string attr) |
std::string | getStringData (const OksObject *obj, const std::string attr) |
Private Attributes | |
OksClass * | partClass |
OksClass * | crateClass |
OksClass * | rodClass |
OksClass * | murClass |
OksClass * | moduleClass |
OksKernel | kernel |
This will be replaced by an interface to the DAQ confDB system.
The primary function of this class is the readout of configuration data from the database.
Translation functions:
Barrel barrel, row, number 3 to 6 0 to 55 -1 to -6 and 1 to 6
Internals: position on row given as -1 for -ve numbers and 1 for +ve numbers
Endcap disc quadrant number 0 to 17 0 to 3 0 to 33
Internals: position of MUR in quadrant number is left to right top to bottom 00000012222223 4444455555 1111133333
Definition at line 124 of file oksImpl.h.
|
Initialise system.
|
|
Free resources.
|
|
Remove all configuration. Very dangerous!! |
|
Create a BOC configuration.
|
|
Create a crate.
|
|
Create a module.
|
|
Create an MUR.
|
|
Create a partition.
|
|
Create a ROD.
|
|
Return contents of named attribute parsed as an int. Throws: runtime_error if no attribute |
|
Get the BOC configuration of one of 48 channels. Input channels are paired as one. |
|
Get the BOC fibre mappings. An array of 48*3 chars (out, in0, in1) |
|
Return the first element node called name that is a child of node. If not present throw exception |
|
Return the configuration for the module. Deprecated: Should take MUR argument |
|
Return the first element node called name that is a child of node. If not present return new one |
|
Query the configuration with an XPath expression, task is for error reporting.
|
|
Return the Rod configuration Find the configuration associated with the specified ROD. Return a RodConfig structure. |
|
Return the TIM configuration Find the configuration associated with the specified TIM. Return a TimConfig structure. |
|
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.
|
|
List the modules in the given MUR Return a list of serial numbers associated with the specified MUR. FIXME: Should be in numbered order |
|
List the MURs associated with a ROD Return integer id's of the MURs in the specified rod. FIXME: Should be in numbered order |
|
List partition ids Lookup the partitions defined in the configuration and return a list of integer ID's.
|
|
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?) |
|
List the rods present in a crate Lookup the RODs defined in the specified crate and return a list of integer ID's.
|
|
Load configuration from named file.
|
|
Name a partition (for information, any use?).
|
|
Parse the xml tree provided and return the module configuration.
|
|
Parse the xml tree provided and return the ROD configuration.
|
|
Parse the xml tree provided and return the TIM configuration.
|
|
Print module configuration to cout.
|
|
Replace the configuration in the given node with the data stored in the given configuration.
|
|
Save the current configuration. Write configuration to disc. This creates a unique filename based on the date and time and saves the current configuration to it. Filename eg Conf_dump_20021210142311.xml.gz (in current directory) |
|
Set a BOC configuration.
|
|
Set fibre mappings for one channel. Any value over 48/96 leaves current value unchanged |
|
Translate to MUR / module(1-6) number from geographical barrel system.
|
|
Translate to MUR / module(1-6) number from geographical endcap system.
|
|
Translate to MUR / module(1-6) number from p/k/r/c.
|
|
Translate to MUR / module(1-6) number from serial number.
|
|
Translate from MUR / module(1-6) number to geographical barrel system.
|
|
Translate from MUR / module(1-6) number to geographical endcap system.
|
|
Translate from MUR / module(1-6) number to power supply channel address.
|
|
Translate from MUR / module(1-6) number to p/k/r/c.
|
|
Translate from MUR / redundant module(1-6) number to p/k/r/c.
|
|
Translate from MUR / module(1-6) number to serial number.
|
|
Update the configuration of a module stored in memory Replace the configuration for the given module with the data stored in the given configuration.
|
|
Update the ROD configuration stored in memory. Replace the in memory configuration for the given ROD with the configuration provided. |