6 from TrigConfMuctpi.XMLReader
import MioctGeometryXMLReader
10 return MioctGeometryXMLReader(filename)
13 stats = {
'miocts' : 0,
'sectors' : 0,
'rois' : 0,
'decodes' : 0,
'topocells' : 0}
15 stats[
'miocts'] = len(geometry.getMIOCTs())
17 for mioct
in geometry.getMIOCTs():
18 stats[
'sectors'] += len(mioct.Sectors)
19 for sector
in mioct.Sectors:
20 stats[
'rois'] += len(sector.ROIs)
23 stats[
'decodes'] += len(mioct.Decodes)
24 for decode
in mioct.Decodes:
25 stats[
'topocells'] += len(decode.TopoCells)
26 print(
"#MIOCTs : %i" % stats[
'miocts'])
27 print(
"#Sectors : %i" % stats[
'sectors'])
28 print(
"#ROIs : %i" % stats[
'rois'])
29 print(
"#Decodes : %i" % stats[
'decodes'])
30 print(
"#TopoCells : %i" % stats[
'topocells'])
38 print(
"Using input %s" % args.infile)
39 geometry =
readXML( args.infile )
43 if __name__==
"__main__":
45 parser = argparse.ArgumentParser( description=__doc__,
46 formatter_class = argparse.RawTextHelpFormatter)
48 parser.add_argument(
'-i', dest=
'infile', default=
"TrigConfMuctpi/TestMioctGeometry2016.xml", type=str,
49 help=
'name of input combined muon geometry filei [TrigConfMuctpi/TestMioctGeometry2016.xml]')
51 opts = parser.parse_args()
53 sys.exit(
main(opts) )