/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Member Functions | Public Attributes
XmlDetDescGen::structure::DetElem Class Reference
Inheritance diagram for XmlDetDescGen::structure::DetElem:
Inheritance graph
[legend]
Collaboration diagram for XmlDetDescGen::structure::DetElem:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def xml
def set_path

Public Attributes

 npath
 logvol
 support
 refs
 name
 full_path

Detailed Description

A class to hold detelem information

Definition at line 9 of file structure.py.


Constructor & Destructor Documentation

def XmlDetDescGen::structure::DetElem::__init__ (   self,
  name,
  logvol,
  npath = None,
  support = None,
  refs = [] 
)

Definition at line 13 of file structure.py.

00014                                                                   :
00015         "Create a DetElem"
00016         reference.Referable.__init__(self,name)
00017         self.npath = npath
00018         self.logvol = logvol
00019         self.support = support
00020         self.refs = refs
00021         return


Member Function Documentation

def XmlDetDescGen::structure::DetElem::xml (   self,
  fo,
  pre = "  " 
)

Definition at line 22 of file structure.py.

00023                              :
00024         "Write XML representation to file object fo, prefacing each line with pre."
00025 
00026         from geometry import Logvol
00027         if self.logvol.__class__ == Logvol:
00028             lvname = self.logvol.full_path
00029         else:
00030             lvname = self.logvol
00031 
00032         fo.write('''
00033 %(pre)s<!-- Detector Element "%(name)s" -->
00034 %(pre)s<detelem name="%(name)s">
00035 %(pre)s  <geometryinfo lvname="%(lvname)s"'''
00036                  %{"pre":pre, "name":self.name, "lvname":lvname})
00037         if self.npath:
00038             fo.write('''
00039 %(pre)s                npath="%(npath)s"
00040 %(pre)s                support="%(support)s" />\n'''
00041                      %{"pre":pre, "npath":self.npath, "support":self.support})
00042         else:
00043             fo.write(' />\n')
00044 
00045         for der in self.refs:
00046             der.xml(fo,pre+'  ')
00047             continue
00048         fo.write('%s</detelem>\n'%pre)
00049         return

def XmlDetDescGen::reference::Referable::set_path (   self,
  base 
) [inherited]

Definition at line 10 of file reference.py.

00011                            :
00012         self.full_path=base+"/"+self.name


Member Data Documentation

Definition at line 13 of file structure.py.

Definition at line 13 of file structure.py.

Definition at line 13 of file structure.py.

Definition at line 13 of file structure.py.

Definition at line 5 of file reference.py.

Reimplemented in XmlDetDescGen::catalog::Catalog.

Definition at line 5 of file reference.py.


The documentation for this class was generated from the following file:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 09:56:07 for XmlDetDesc by doxygen 1.7.4