ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
ReadRPCRun2DataFile.MuonGeometry Class Reference
Inheritance diagram for ReadRPCRun2DataFile.MuonGeometry:
Collaboration diagram for ReadRPCRun2DataFile.MuonGeometry:

Public Member Functions

def __init__ (self, name, miocts=[])
 
def getMioct (self, mioctId)
 
def addMioct (self, mioct)
 
def writeXML (self, outfilename)
 
def getStats (self, stats)
 
def printStats (self)
 

Public Attributes

 name
 
 miocts
 
 mioctdic
 

Detailed Description

Definition at line 236 of file ReadRPCRun2DataFile.py.

Constructor & Destructor Documentation

◆ __init__()

def 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])

Member Function Documentation

◆ 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
248  return mioct

◆ getMioct()

def ReadRPCRun2DataFile.MuonGeometry.getMioct (   self,
  mioctId 
)

Definition at line 241 of file ReadRPCRun2DataFile.py.

241  def getMioct(self,mioctId):
242  return self.mioctdic.get(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.

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 

◆ writeXML()

def ReadRPCRun2DataFile.MuonGeometry.writeXML (   self,
  outfilename 
)

Definition at line 249 of file ReadRPCRun2DataFile.py.

249  def writeXML(self,outfilename):
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)

Member Data Documentation

◆ mioctdic

ReadRPCRun2DataFile.MuonGeometry.mioctdic

Definition at line 240 of file ReadRPCRun2DataFile.py.

◆ miocts

ReadRPCRun2DataFile.MuonGeometry.miocts

Definition at line 239 of file ReadRPCRun2DataFile.py.

◆ name

ReadRPCRun2DataFile.MuonGeometry.name

Definition at line 238 of file ReadRPCRun2DataFile.py.


The documentation for this class was generated from the following file:
DerivationFramework::TriggerMatchingUtils::sorted
std::vector< typename T::value_type > sorted(T begin, T end)
Helper function to create a sorted vector from an unsorted one.
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18
dlldep.printStats
def printStats()
Definition: dlldep.py:226
Trk::open
@ open
Definition: BinningType.h:40
get
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition: hcg.cxx:127
dbg::print
void print(std::FILE *stream, std::format_string< Args... > fmt, Args &&... args)
Definition: SGImplSvc.cxx:70
calibdata.copy
bool copy
Definition: calibdata.py:27
writeXML
StatusCode writeXML(const string &name, int type)