CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
jobreport.JobReport Class Reference

Public Member Functions

def __init__ (self)
 
def addInputFile (self, filename, eventsRead=1, runsAndLumis={"1":[1]})
 
def addOutputFile (self, filename, events=1, runsAndLumis={"1":[1]})
 
def save (self, filename="FrameworkJobReport.xml")
 

Public Attributes

 fjr
 
 performancereport
 
 performancesummary
 
 readbranches
 

Detailed Description

Definition at line 6 of file jobreport.py.

Constructor & Destructor Documentation

◆ __init__()

def jobreport.JobReport.__init__ (   self)

Definition at line 7 of file jobreport.py.

7  def __init__(self):
8  self.fjr = ET.Element("FrameworkJobReport")
9  self.readbranches = ET.SubElement(self.fjr, "ReadBranches")
10  self.performancereport = ET.SubElement(self.fjr, "PerformanceReport")
11  self.performancesummary = ET.SubElement(
12  self.performancereport, "PerformanceSummary", Metric="StorageStatistics")
13  ET.SubElement(self.performancesummary, "Metric",
14  Name="Parameter-untracked-bool-enabled", Value="true")
15  ET.SubElement(self.performancesummary, "Metric",
16  Name="Parameter-untracked-bool-stats", Value="true")
17  ET.SubElement(self.performancesummary, "Metric",
18  Name="Parameter-untracked-string-cacheHint", Value="application-only")
19  ET.SubElement(self.performancesummary, "Metric",
20  Name="Parameter-untracked-string-readHint", Value="auto-detect")
21  ET.SubElement(self.performancesummary, "Metric",
22  Name="ROOT-tfile-read-totalMegabytes", Value="0")
23  ET.SubElement(self.performancesummary, "Metric",
24  Name="ROOT-tfile-write-totalMegabytes", Value="0")
def __init__(self, dataset, job_number, job_id, job_name, isDA, isMC, applyBOWS, applyEXTRACOND, extraconditions, runboundary, lumilist, intlumi, maxevents, gt, allFromGT, alignmentDB, alignmentTAG, apeDB, apeTAG, bowDB, bowTAG, vertextype, tracktype, refittertype, ttrhtype, applyruncontrol, ptcut, CMSSW_dir, the_dir)

Member Function Documentation

◆ addInputFile()

def jobreport.JobReport.addInputFile (   self,
  filename,
  eventsRead = 1,
  runsAndLumis = {"1": [1]} 
)

Definition at line 36 of file jobreport.py.

References jobreport.JobReport.fjr.

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)
50  for l in ls:
51  ET.SubElement(run, "LumiSection", ID="%s" % l)
52 

◆ addOutputFile()

def jobreport.JobReport.addOutputFile (   self,
  filename,
  events = 1,
  runsAndLumis = {"1": [1]} 
)

Definition at line 53 of file jobreport.py.

References jobreport.JobReport.fjr.

53  def addOutputFile(self, filename, events=1, runsAndLumis={"1": [1]}):
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 = ""
62  ET.SubElement(
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)
68  for l in ls:
69  ET.SubElement(run, "LumiSection", ID="%s" % l)
70 

◆ save()

def jobreport.JobReport.save (   self,
  filename = "FrameworkJobReport.xml" 
)

Definition at line 71 of file jobreport.py.

References jobreport.JobReport.fjr.

71  def save(self, filename="FrameworkJobReport.xml"):
72  tree = ET.ElementTree(self.fjr)
73  tree.write(filename) # , pretty_print=True)
74  pass
75 
save
Definition: cuy.py:1164

Member Data Documentation

◆ fjr

jobreport.JobReport.fjr

◆ performancereport

jobreport.JobReport.performancereport

Definition at line 10 of file jobreport.py.

◆ performancesummary

jobreport.JobReport.performancesummary

Definition at line 11 of file jobreport.py.

◆ readbranches

jobreport.JobReport.readbranches

Definition at line 9 of file jobreport.py.