CMS 3D CMS Logo

Functions

dqmpset Namespace Reference

Functions

def dqmpaths
def dqmpset

Function Documentation

def dqmpset::dqmpaths (   prefix,
  dOfD 
)

Definition at line 30 of file dqmpset.py.

00031                            :
00032     pset = dict()
00033     for dKey in dOfD.iterkeys() :
00034         d = dOfD[dKey]
00035         psubset = dict()
00036         for key in d.iterkeys() :
00037             psubset[key] = cms.untracked.string(prefix + "/" + d[key])
00038 
00039         pset[dKey] = cms.untracked.PSet(**psubset)
00040 
00041     return cms.untracked.PSet(**pset)
def dqmpset::dqmpset (   d)

Definition at line 5 of file dqmpset.py.

00006                :
00007     pset = dict()
00008     for key in d.iterkeys() :
00009         if isinstance(d[key], cms.PSet) :
00010             pset[key] = d[key]
00011         elif type(d[key]) is DictType :
00012             pset[key] = dqmpset(d[key])
00013         elif type(d[key]) is StringType :
00014             pset[key] = cms.untracked.string(d[key])
00015         elif type(d[key]) is IntType :
00016             pset[key] = cms.untracked.int32(d[key])
00017         elif type(d[key]) is FloatType :
00018             pset[key] = cms.untracked.double(d[key])
00019         elif type(d[key]) is BooleanType :
00020             pset[key] = cms.untracked.bool(d[key])
00021         elif type(d[key]) is ListType :
00022             if type(d[key][0]) is StringType :
00023                 pset[key] = cms.untracked.vstring(*(d[key]))
00024             elif type(d[key][0]) is IntType :
00025                 pset[key] = cms.untracked.vint32(*(d[key]))
00026             elif type(d[key][0]) is FloatType :
00027                 pset[key] = cms.untracked.vdouble(*(d[key]))
00028 
00029     return cms.untracked.PSet(**pset)