7 for key
in d.iterkeys() :
8 if isinstance(d[key], cms.PSet) :
10 elif type(d[key])
is DictType :
12 elif type(d[key])
is StringType :
13 pset[key] = cms.untracked.string(d[key])
14 elif type(d[key])
is IntType :
15 pset[key] = cms.untracked.int32(d[key])
16 elif type(d[key])
is FloatType :
17 pset[key] = cms.untracked.double(d[key])
18 elif type(d[key])
is BooleanType :
19 pset[key] = cms.untracked.bool(d[key])
20 elif type(d[key])
is ListType :
21 if type(d[key][0])
is StringType :
22 pset[key] = cms.untracked.vstring(*(d[key]))
23 elif type(d[key][0])
is IntType :
24 pset[key] = cms.untracked.vint32(*(d[key]))
25 elif type(d[key][0])
is FloatType :
26 pset[key] = cms.untracked.vdouble(*(d[key]))
28 return cms.untracked.PSet(**pset)
32 for dKey
in dOfD.iterkeys() :
35 for key
in d.iterkeys() :
36 psubset[key] = cms.untracked.string(prefix +
"/" + d[key])
38 pset[dKey] = cms.untracked.PSet(**psubset)
40 return cms.untracked.PSet(**pset)