Public Member Functions | |
def | write |
Static Public Attributes | |
list | sites = ['db', 'la', 'far'] |
Definition at line 13 of file gen.py.
def gen::PoolPmtStructure::write | ( | self, | ||
outdir | ||||
) |
Definition at line 17 of file gen.py.
00017 : 00018 from XmlDetDescGen.util import XmlFile, Comment 00019 from XmlDetDescGen.catalog import Catalog 00020 from XmlDetDescGen.reference import Reference 00021 from XmlDetDescGen.util import ExternalEntity 00022 00023 topcat = Catalog('Structure'); 00024 poolcat = Catalog('PoolPmtStructure'); 00025 poolcat.refs = [] 00026 poolcat.things = [] 00027 topcat.refs = [ poolcat ] 00028 topcat.things = [] 00029 00030 ees = [] 00031 for site in PoolPmtStructure.sites: 00032 cat = Catalog('%s-pool'%site); 00033 cat.refs=[] 00034 for ipool in PoolPmts.poolcounts: 00035 eename="%s%spmts"%(site,ipool) 00036 ees.append((eename,"%s%s.xml"%(site,ipool))) 00037 cat.refs.append(ExternalEntity(eename)) 00038 continue 00039 poolcat.refs.append(cat) 00040 00041 file = XmlFile(dtd="../DTD/structure.dtd", 00042 external_entities=ees) 00043 file.objects = [ poolcat ] 00044 file.write(outdir+"/structure.xml") 00045 00046 class PoolPmts:
list gen::PoolPmtStructure::sites = ['db', 'la', 'far'] [static] |