1 import xml.etree.cElementTree
as ET
8 self.
fjr = ET.Element(
"FrameworkJobReport")
14 Name=
"Parameter-untracked-bool-enabled", Value=
"true")
16 Name=
"Parameter-untracked-bool-stats", Value=
"true")
18 Name=
"Parameter-untracked-string-cacheHint", Value=
"application-only")
20 Name=
"Parameter-untracked-string-readHint", Value=
"auto-detect")
22 Name=
"ROOT-tfile-read-totalMegabytes", Value=
"0")
24 Name=
"ROOT-tfile-write-totalMegabytes", Value=
"0")
36 def addInputFile(self, filename, eventsRead=1, runsAndLumis={"1": [1]}):
37 infile = ET.SubElement(self.
fjr,
"InputFile")
38 ET.SubElement(infile,
"LFN").text = re.sub(
39 r".*?(/store/.*\.root)(\?.*)?",
r"\1", filename)
40 ET.SubElement(infile,
"PFN").text =
"" 41 ET.SubElement(infile,
"Catalog").text =
"" 42 ET.SubElement(infile,
"InputType").text =
"primaryFiles" 43 ET.SubElement(infile,
"ModuleLabel").text =
"source" 44 ET.SubElement(infile,
"InputSourceClass").text =
"PoolSource" 45 ET.SubElement(infile,
"GUID").text =
"" 46 ET.SubElement(infile,
"EventsRead").text =
"%s" % eventsRead
47 runs = ET.SubElement(infile,
"Runs")
48 for r, ls
in runsAndLumis.items():
49 run = ET.SubElement(runs,
"Run", ID=
"%s" % r)
51 ET.SubElement(run,
"LumiSection", ID=
"%s" % l)
54 infile = ET.SubElement(self.
fjr,
"File")
55 ET.SubElement(infile,
"LFN").text =
"" 56 ET.SubElement(infile,
"PFN").text = filename
57 ET.SubElement(infile,
"Catalog").text =
"" 58 ET.SubElement(infile,
"ModuleLabel").text =
"NANO" 59 ET.SubElement(infile,
"OutputModuleClass").text =
"PoolOutputModule" 60 ET.SubElement(infile,
"GUID").text =
"" 61 ET.SubElement(infile,
"DataType").text =
"" 63 infile,
"BranchHash").text =
"dc90308e392b2fa1e0eff46acbfa24bc" 64 ET.SubElement(infile,
"TotalEvents").text =
"%s" % events
65 runs = ET.SubElement(infile,
"Runs")
66 for r, ls
in runsAndLumis.items():
67 run = ET.SubElement(runs,
"Run", ID=
"%s" % r)
69 ET.SubElement(run,
"LumiSection", ID=
"%s" % l)
71 def save(self, filename="FrameworkJobReport.xml"):
72 tree = ET.ElementTree(self.
fjr)
def save(self, filename="FrameworkJobReport.xml")
def addInputFile(self, filename, eventsRead=1, runsAndLumis={"1":[1]})
def addOutputFile(self, filename, events=1, runsAndLumis={"1":[1]})