Definition at line 13 of file dumpparser.py.
References genParticles_cff.map.
Referenced by FWItemValueGetter.addEntry(), ConfigurationDBHandler.characters(), reco::parser.cutParser(), DDTokenize2(), cand::parser.decayParser(), reco::parser.expressionParser(), DBSApi_cff.loadXML(), main(), BeamSpotWorkflow.main(), helper::Parser.makeExpression(), helper::Parser.makeSelector(), FWGUIManager.open3DRegion(), amc13::Packet.Packet(), HcalPatternXMLParser.parse(), DDLVector.parse_numbers(), DDLVector.parse_strings(), DDLMap.processElement(), TrackingNtuple::DetIdOTCommon.push_back(), TrackingNtuple::DetIdStripOnly.push_back(), loadConditions.readTagAndSince(), FWModelExpressionSelector.select(), TrackingNtuple::DetIdOTCommon.set(), TrackingNtuple::DetIdStripOnly.set(), FWExpressionEvaluator.setExpression(), FWModelFilter.setExpression(), and Args.~Args().
14 logger = logging.getLogger(
"mpsvalidate")
18 pedeDump = mpsv_classes.PedeDumpData()
25 with gzip.open(path)
as gzipFile:
26 dumpFile = gzipFile.readlines()
28 logger.error(
"PedeDump: {0} does not exist".
format(path))
31 for i, line
in enumerate(dumpFile):
33 if (
"Sum(Chi^2)/Sum(Ndf) =" in line):
35 number.append(
map(float, re.findall(
36 r"[-+]?\d*\.\d+", dumpFile[i])))
37 number.append(
map(int, re.findall(
r"[-+]?\d+", dumpFile[i + 1])))
38 number.append(
map(float, re.findall(
39 r"[-+]?\d*\.\d+", dumpFile[i + 2])))
40 pedeDump.sumSteps =
"{0} / ( {1} - {2} )".
format(
41 number[0][0], number[1][0], number[1][1])
42 pedeDump.sumValue = number[2][0]
45 if (
"Sum(W*Chi^2)/Sum(Ndf)/<W> =" in line):
47 number.append(
map(float, re.findall(
48 r"[-+]?\d*\.\d+", dumpFile[i])))
49 number.append(
map(int, re.findall(
r"[-+]?\d+", dumpFile[i + 1])))
50 number.append(
map(float, re.findall(
51 r"[-+]?\d*\.\d+", dumpFile[i + 2])))
52 number.append(
map(float, re.findall(
53 r"[-+]?\d*\.\d+", dumpFile[i + 3])))
54 pedeDump.sumSteps =
"{0} / ( {1} - {2} ) / {3}".
format(
55 number[0][0], number[1][0], number[1][1], number[2][0])
56 pedeDump.sumWValue = number[3][0]
58 if (
"with correction for down-weighting" in line):
59 number =
map(float, re.findall(
r"[-+]?\d*\.\d+", dumpFile[i]))
60 pedeDump.correction = number[0]
63 if (
"Peak dynamic memory allocation:" in line):
64 number =
map(float, re.findall(
r"[-+]?\d*\.\d+", dumpFile[i]))
65 pedeDump.memory = number[0]
68 if (
"Iteration-end" in line):
69 number =
map(int, re.findall(
r"\d+", dumpFile[i + 1]))
70 pedeDump.time = number[:3]
73 if (
"WarningWarningWarningWarning" in line
and warningBool ==
False):
76 while (
"Warning" not in dumpFile[j]):
77 pedeDump.warning.append(dumpFile[j])
81 if (
" = number of records" in line):
82 number =
map(int, re.findall(
"\d+", dumpFile[i]))
83 pedeDump.nrec = number[0]
86 if (
" = total number of parameters" in line):
87 number =
map(int, re.findall(
"\d+", dumpFile[i]))
88 pedeDump.ntgb = number[0]
91 if (
" = number of variable parameters" in line):
92 number =
map(int, re.findall(
"\d+", dumpFile[i]))
93 pedeDump.nvgb = number[0]