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)