1 import FWCore.ParameterSet.Config
as cms
4 return cms.PSet( name = cms.string(name), kind = cms.string(
"none"))
6 def Count1D(name, nbins, xmin, xmax, title=""):
7 return cms.PSet( name = cms.string(name), kind = cms.string(
"count1d"), nbins = cms.uint32(nbins), min = cms.double(xmin), max = cms.double(xmax), title = cms.string(title) )
9 def Plot1D(name, column, nbins, xmin, xmax, title=""):
10 return cms.PSet( name = cms.string(name), kind = cms.string(
"hist1d"), column = cms.string(column), nbins = cms.uint32(nbins), min = cms.double(xmin), max = cms.double(xmax), title = cms.string(title) )
12 def Profile1D(name, ycolumn, xcolumn, nbins, xmin, xmax, title=""):
13 return cms.PSet( name = cms.string(name), kind = cms.string(
"prof1d"), ycolumn = cms.string(ycolumn), xcolumn = cms.string(xcolumn), nbins = cms.uint32(nbins), min = cms.double(xmin), max = cms.double(xmax), title = cms.string(title) )
16 kind = pset.kind.value()
18 return "NoPlot(%r)" % (pset.name.value())
19 elif kind ==
"count1d":
20 return (
"Count1D(%r, %d, %g, %g%s)" % (pset.name.value(), pset.nbins.value(), pset.min.value(), pset.max.value(),
", %r" % pset.title.value()
if pset.title.value()
else ""))
21 elif kind ==
"hist1d":
22 return (
"Plot1D(%r, %r, %d, %g, %g%s)" % (pset.name.value(), pset.column.value(), pset.nbins.value(), pset.min.value(), pset.max.value(),
", %r" % pset.title.value()
if pset.title.value()
else ""))
23 elif kind ==
"prof1d":
24 return (
"Profile1D(%r, %r, %r, %d, %g, %g%s)" % (pset.name.value(), pset.ycolumn.value(), pset.xcolumn.value(), pset.nbins.value(), pset.min.value(), pset.max.value(),
", %r" % pset.title.value()
if pset.title.value()
else ""))