Public Member Functions | |
def | write |
Static Public Attributes | |
list | sites = ['db', 'la', 'far'] |
Definition at line 13 of file gen.py.
def gen::AdPmtStructure::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 adcat = Catalog('AdPmtStructure'); 00025 adcat.refs = [] 00026 adcat.things = [] 00027 topcat.refs = [ adcat ] 00028 topcat.things = [] 00029 00030 ees = [] 00031 for site,adcount in zip(AdPmtStructure.sites,AdPmts.adcounts): 00032 cat = Catalog('%s-ad'%site); 00033 cat.refs=[] 00034 for iad in range(0,adcount): 00035 iad += 1 00036 eename="%s%dpmts"%(site,iad) 00037 ees.append((eename,"%s%d.xml"%(site,iad))) 00038 cat.refs.append(ExternalEntity(eename)) 00039 continue 00040 adcat.refs.append(cat) 00041 00042 file = XmlFile(dtd="../DTD/structure.dtd", 00043 external_entities=ees) 00044 file.objects = [ adcat ] 00045 file.write(outdir+"/structure.xml") 00046 00047 class AdPmts:
list gen::AdPmtStructure::sites = ['db', 'la', 'far'] [static] |