Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:32:48

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 def NoPlot(name):
0004     return cms.PSet( name = cms.string(name), kind = cms.string("none"))
0005 
0006 def Count1D(name, nbins, xmin, xmax, title=""):
0007     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) )
0008 
0009 def Plot1D(name, column, nbins, xmin, xmax, title=""):
0010     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) )
0011 
0012 def Profile1D(name, ycolumn, xcolumn, nbins, xmin, xmax, title=""):
0013     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) )
0014 
0015 def shortDump(pset):
0016     kind = pset.kind.value()
0017     if kind == "none": 
0018         return  "NoPlot(%r)" % (pset.name.value())
0019     elif kind == "count1d":
0020         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 ""))
0021     elif kind == "hist1d":
0022         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 ""))
0023     elif kind == "prof1d":
0024         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 ""))
0025     
0026