Definition at line 236 of file ReadRPCRun2DataFile.py.
◆ __init__()
def ReadRPCRun2DataFile.MuonGeometry.__init__ |
( |
|
self, |
|
|
|
name, |
|
|
|
miocts = [] |
|
) |
| |
◆ addMioct()
def ReadRPCRun2DataFile.MuonGeometry.addMioct |
( |
|
self, |
|
|
|
mioct |
|
) |
| |
Definition at line 243 of file ReadRPCRun2DataFile.py.
243 def addMioct(self,mioct):
244 if mioct.id
in self.mioctdic:
245 raise RuntimeError(
"MIOCT with ID %i already exists" % mioct.id)
246 self.miocts += [ mioct ]
247 self.mioctdic[mioct.id] = mioct
◆ getMioct()
def ReadRPCRun2DataFile.MuonGeometry.getMioct |
( |
|
self, |
|
|
|
mioctId |
|
) |
| |
◆ getStats()
def ReadRPCRun2DataFile.MuonGeometry.getStats |
( |
|
self, |
|
|
|
stats |
|
) |
| |
Definition at line 267 of file ReadRPCRun2DataFile.py.
267 def getStats(self,stats):
268 stats[
'miocts'] = len(self.miocts)
269 for mioct
in self.miocts:
270 mioct.getStats(stats)
◆ printStats()
def ReadRPCRun2DataFile.MuonGeometry.printStats |
( |
|
self | ) |
|
Definition at line 271 of file ReadRPCRun2DataFile.py.
272 stats = {
'miocts' : 0,
'sectors' : 0,
'rois' : 0,
'decodes' : 0,
'topocells' : 0}
274 print(
"Numbers for %s" % self.name)
275 print(
"#MIOCTs : %i" % stats[
'miocts'])
276 print(
"#Sectors : %i" % stats[
'sectors'])
277 print(
"#Decodes : %i" % stats[
'decodes'])
278 print(
"#ROIs : %i" % stats[
'rois'])
279 print(
"#Topocells : %i" % stats[
'topocells'])
◆ writeXML()
def ReadRPCRun2DataFile.MuonGeometry.writeXML |
( |
|
self, |
|
|
|
outfilename |
|
) |
| |
Definition at line 249 of file ReadRPCRun2DataFile.py.
250 f =
open(outfilename,
"write")
251 print(
'<?xml version="1.0" ?>\n', file=f)
252 print(
'<!DOCTYPE MuCTPiGeometry SYSTEM "MUCTPIGeometry.dtd">\n', file=f)
253 print(
'<MuCTPiGeometry>', file=f)
254 for mioct
in sorted(self.miocts,key=
lambda m:m.id):
255 print(mioct.asXML(4), file=f)
256 print(
' <PtEncoding>', file=f)
257 print(
' <PtCodeElement pt="1" code="0" value="4"/>', file=f)
258 print(
' <PtCodeElement pt="2" code="1" value="6"/>', file=f)
259 print(
' <PtCodeElement pt="3" code="2" value="10"/>', file=f)
260 print(
' <PtCodeElement pt="4" code="2" value="11"/>', file=f)
261 print(
' <PtCodeElement pt="5" code="2" value="15"/>', file=f)
262 print(
' <PtCodeElement pt="6" code="2" value="20"/>', file=f)
263 print(
' </PtEncoding>', file=f)
264 print(
"</MuCTPiGeometry>", file=f)
266 print(
"Wrote %s" % outfilename)
◆ mioctdic
ReadRPCRun2DataFile.MuonGeometry.mioctdic |
◆ miocts
ReadRPCRun2DataFile.MuonGeometry.miocts |
◆ name
ReadRPCRun2DataFile.MuonGeometry.name |
The documentation for this class was generated from the following file: