Definition at line 236 of file ReadRPCRun2DataFile.py.
◆ result
◆ __init__()
| ReadRPCRun2DataFile.MuonGeometry.__init__ |
( |
| self, |
|
|
| name, |
|
|
| miocts = [] ) |
Definition at line 237 of file ReadRPCRun2DataFile.py.
237 def __init__(self, name, miocts=[]):
238 self.name = name
239 self.miocts = copy(miocts)
240 self.mioctdic = dict([ (m.id, m) for m in miocts])
◆ addMioct()
| 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
248 return mioct
◆ getMioct()
| ReadRPCRun2DataFile.MuonGeometry.getMioct |
( |
| self, |
|
|
| mioctId ) |
Definition at line 241 of file ReadRPCRun2DataFile.py.
241 def getMioct(self,mioctId):
242 return self.mioctdic.
get(mioctId)
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
◆ getStats()
| 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()
| ReadRPCRun2DataFile.MuonGeometry.printStats |
( |
| self | ) |
|
Definition at line 271 of file ReadRPCRun2DataFile.py.
271 def printStats(self):
272 stats = {'miocts' : 0, 'sectors' : 0, 'rois' : 0, 'decodes' : 0, 'topocells' : 0}
273 self.getStats(stats)
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'])
280
281
282
283
284
void print(char *figname, TCanvas *c1)
◆ writeXML()
| 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)
265 f.close()
266 print(
"Wrote %s" % outfilename)
StatusCode writeXML(const string &name, int type)
◆ mioctdic
| ReadRPCRun2DataFile.MuonGeometry.mioctdic = dict([ (m.id, m) for m in miocts]) |
◆ miocts
| ReadRPCRun2DataFile.MuonGeometry.miocts = copy(miocts) |
◆ name
| ReadRPCRun2DataFile.MuonGeometry.name = name |
The documentation for this class was generated from the following file: