latte2latcXML Class Reference

Converts LATTE schema into LATC input .xml format. More...

List of all members.

Public Member Functions

def __init__
def __trace
def setLogLevel
def setTrace
def readLatteXML
def readLatcXML
def __seedLists
 Seed the list of lists, keyed on the broadcast section.
def computeNodeModes
 Computes broadcast nodes from a starting glatc block.
def __buildNodeStats
def buildLatcBcast
def convertAOCNode
def addBcastNode
def purgeBcast
def purgeBcastNodes
def __findBcastChild
def __isNodeContentsBcast
def __killDataChildren
def writeLatcXML
def convertTfeDacToFields
def convertTfeFieldsToDac
def intValue
def findSptChild
def __addNode
def getGLAT
def getLATC
 get start of LATC hierarchy from in memory .xml
def __getChildNodes
def splitLatcXML
 Given a LATc DOM split it into multiple DOMs.
def isEmptyNode
 Check if there are any registers declared under node.
def addSplitNode
 Adds a copy of splitNode and its registers, creating the parents listed in branch if necessary.
def findNode
 Find a LATc node based on its tagName and ID attribute value.
def calculateBranch
 Calculate a list of parents leading to node in the DOM tree.
def getDomList
 Return a list of DOMs created during processing.

Private Attributes

 __map
 __attrDef
 __currentTCCid
 __currentTRCid
 __latteInputType
 __latteInputFile
 __latteCfgName
 __latteCfgVersion
 __bcastFlag
 __log
 __latcInputType
 __latcInputFile
 __latcDOM
 __convertDate
 __convertPC
 __convertUser
 __maskDict


Detailed Description

Converts LATTE schema into LATC input .xml format.

This application accepts LATTE schema in .xml or in the %CAL_ROOT% root directory.

The following actions are performed:

  1. Copy the file %CAL_ROOT%\setup\Configurations\runId.cfg.template to %ONLINE_ROOT%\LATTE\start\runId.cfg
  2. Copy the file %CAL_ROOT%\setup\Configurations\runControl.cfg.template to %ONLINE_ROOT%\LATTE\start\runControl.cfg
  3. Queries the user for the name of the test unit name (e.g. FM101).
  4. Creates a subdirectory %CAL_ROOT%\<Test_Unit>
  5. Creates the %CAL_ROOT%\Configurations subdirectory
  6. Queries the user for the test setup parameters such as test site, test phase, etc.
  7. Creates the test configuration files in %CAL_ROOT%\Configurations and %CAL_ROOT%\<Test_Unit>\Configurations from the template files in %CAL_ROOT%\setup\Configurations
  8. Runs the calDoc utility to generate the calorimeter API documentation files

Definition at line 88 of file latte2latcXML.py.


Member Function Documentation

def __addNode   self,
  doc,
  gLatNode,
  latcNode,
  localDict,
  bcastSection = None
 

\brief Generate a LATC .xml formatted document inMemory.

\param doc doc LATC document object.
\param gLatNode Current gLat node object.
\param latcNode Current LATC node object.
\param localDict Dictionary of LATTE to LATC register mappings for current component.
\param bcastSection BCAST data for this component (None if not a BCAST component)

Definition at line 565 of file latte2latcXML.py.

def __buildNodeStats   self,
  node,
  indent = ""
 

Definition at line 275 of file latte2latcXML.py.

def __findBcastChild   self,
  name,
  bcastNode
 

Definition at line 384 of file latte2latcXML.py.

def __getChildNodes   self,
  node
 

\brief get list of child node pointers.

\param node parent node.

Definition at line 623 of file latte2latcXML.py.

def __init__   self,
  configMap,
  regAttrDef,
  logLevel = logging.WARN,
  trace = False
 

Definition at line 89 of file latte2latcXML.py.

def __isNodeContentsBcast   self,
  node,
  bcast
 

Definition at line 390 of file latte2latcXML.py.

def __killDataChildren   self,
  node
 

Definition at line 409 of file latte2latcXML.py.

def __seedLists   self  ) 
 

Seed the list of lists, keyed on the broadcast section.

Some lists aren't used for a particular mode of operation

Definition at line 183 of file latte2latcXML.py.

def __trace   self,
  prefix,
  n = 0
 

\brief latte2latcXML module execution trace routine.

\param prefix Execution message prefix string.
\param n Stack level, 0 = top level.

Definition at line 127 of file latte2latcXML.py.

def addBcastNode   self,
  doc,
  parent,
  nodeDict
 

Definition at line 336 of file latte2latcXML.py.

def addSplitNode   self,
  splitNode,
  branch
 

Adds a copy of splitNode and its registers, creating the parents listed in branch if necessary.

Parameters:
splitNode 
branch List of parent nodes that need to exist before adding a copy of splitNode

Definition at line 671 of file latte2latcXML.py.

def buildLatcBcast   self  ) 
 

Definition at line 303 of file latte2latcXML.py.

def calculateBranch   self,
  node
 

Calculate a list of parents leading to node in the DOM tree.

Go through the parents of node and construct the branch in the form of a list (not including node itself).

Parameters:
node Node whose parent list is being requested
Returns:
A list of parents along the branch leading to node

Definition at line 719 of file latte2latcXML.py.

def computeNodeModes   self,
  gLatc
 

Computes broadcast nodes from a starting glatc block.

Definition at line 237 of file latte2latcXML.py.

def convertAOCNode   self,
  bcastNode
 

Definition at line 311 of file latte2latcXML.py.

def convertTfeDacToFields   self,
  node,
  doc
 

Definition at line 445 of file latte2latcXML.py.

def convertTfeFieldsToDac   self,
  node,
  doc
 

Definition at line 475 of file latte2latcXML.py.

def findNode   self,
  node,
  xNode
 

Find a LATc node based on its tagName and ID attribute value.

Go through the children of xNode and find if any of them matches the tagname and the ID attribute of node

Parameters:
node Node to be matched
xNode Parent node of the children searched
Returns:
Matching child node or None if not found

Definition at line 702 of file latte2latcXML.py.

def findSptChild   self,
  pNode,
  sptId
 

Definition at line 559 of file latte2latcXML.py.

def getDomList   self  ) 
 

Return a list of DOMs created during processing.

Returns:
List of DOM ids

Definition at line 735 of file latte2latcXML.py.

def getGLAT   self,
  node
 

\brief get start of gLat node pointer from inMemory .xml document.

\param node gLat node pointer.

Definition at line 595 of file latte2latcXML.py.

def getLATC   self,
  node
 

get start of LATC hierarchy from in memory .xml

Definition at line 617 of file latte2latcXML.py.

def intValue   self,
  strValue
 

Definition at line 503 of file latte2latcXML.py.

def isEmptyNode   self,
  node
 

Check if there are any registers declared under node.

Parameters:
node Node that is being checked
Returns:
True if the node does not declare any registers, False otherwise

Definition at line 658 of file latte2latcXML.py.

def purgeBcast   self,
  gLatcRaw,
  gLatcBcast
 

Definition at line 364 of file latte2latcXML.py.

def purgeBcastNodes   self,
  raw,
  bcast
 

Definition at line 373 of file latte2latcXML.py.

def readLatcXML   self,
  file
 

\brief LATC config xml parser (returns gLatc object).

\param file LATC config xml file name.

Definition at line 170 of file latte2latcXML.py.

def readLatteXML   self,
  file
 

\brief LATTE schema/config xml parser (returns LATTE gLat object).

\param file LATTE schema/config xml file name.

Definition at line 156 of file latte2latcXML.py.

def setLogLevel   self,
  logLevel
 

\brief logger level setting method.

\param logLevel Log Level(DEBUG/WARN/INFO...).

Definition at line 140 of file latte2latcXML.py.

def setTrace   self,
  state
 

\brief Module execution trace enable/disable setting.

\param state Trace state (True/False).

Definition at line 148 of file latte2latcXML.py.

def splitLatcXML   self,
  latcDOM
 

Given a LATc DOM split it into multiple DOMs.

The split is based on the nodes which have declared registers. When the split is made the hierarchy of each split node is preserved.

Parameters:
latcDOM LATc DOM that will be split

Definition at line 642 of file latte2latcXML.py.

def writeLatcXML   self,
  id,
  file = 'latc.xml',
  path = None
 

\brief Write a LATC .xml file given a LATC document in miniDOM format.

\param latcDOM LATC document in miniDOM format
\param file LATC .xml output file name or open file object.

Definition at line 419 of file latte2latcXML.py.


Member Data Documentation

__attrDef [private]
 

Definition at line 94 of file latte2latcXML.py.

__bcastFlag [private]
 

Definition at line 104 of file latte2latcXML.py.

__convertDate [private]
 

Definition at line 112 of file latte2latcXML.py.

__convertPC [private]
 

Definition at line 114 of file latte2latcXML.py.

__convertUser [private]
 

Definition at line 118 of file latte2latcXML.py.

__currentTCCid [private]
 

Definition at line 97 of file latte2latcXML.py.

__currentTRCid [private]
 

Definition at line 98 of file latte2latcXML.py.

__latcDOM [private]
 

Definition at line 110 of file latte2latcXML.py.

__latcInputFile [private]
 

Definition at line 109 of file latte2latcXML.py.

__latcInputType [private]
 

Definition at line 108 of file latte2latcXML.py.

__latteCfgName [private]
 

Definition at line 101 of file latte2latcXML.py.

__latteCfgVersion [private]
 

Definition at line 102 of file latte2latcXML.py.

__latteInputFile [private]
 

Definition at line 100 of file latte2latcXML.py.

__latteInputType [private]
 

Definition at line 99 of file latte2latcXML.py.

__log [private]
 

Definition at line 105 of file latte2latcXML.py.

__map [private]
 

Definition at line 92 of file latte2latcXML.py.

__maskDict [private]
 

Definition at line 123 of file latte2latcXML.py.


The documentation for this class was generated from the following file:
Generated on Thu Apr 27 20:53:57 2006 for LICOS L02-01-00 by doxygen 1.4.6-NO