1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
|
#------------------------------------------------------------
#
# This is an annotated example of a configuration file.
# It is intended to illustrate the mapping between the configuration
# language and the Python representation of the configuration
# description that is used by the Data Management tools.
#
#
#------------------------------------------------------------
# The configuration grammar accepts documents which have the general
# form of a nested collection of 'blocks' of various kinds. These
# blocks are delimted by braces: '{' and '}'.
# Newlines are meaningless in the configuration langauge.
# Comments (obviously!) are introduced by a sharp ('#'), and continue
# to the end of line.
# C++-style comments (beginning with a cms.double(d forward slash: '//')
# are also accepted.
# Each configuration must have exactly one process block.
# Eventually, the software may restrict the process name to being one
# of a recognized set (such as HLT, PROD, TEST, USER). This is not yet
# implemented.
import FWCore.ParameterSet.Config as cms
process = cms.Process("PROCESSNAME")
process.source = cms.Source("PoolSource",
fileNames = cms.untracked.vstring("file:no_real_file_here"),
debugFlag = cms.untracked.bool(False),
maxEvents = cms.untracked.int32(-1),
debugVebosity = cms.untracked.uint32(10)
)
process.a = cms.EDProducer("AProducer",
a = cms.int32(32),
h1 = cms.uint32(0xCFDFEFFF),
b = cms.vdouble(1.1, 2.2),
c = cms.vstring(),
d = cms.vstring('boo', "yah" ),
nothing =cms.string(""),
moreNothing = cms.string(''),
absolutelyNothing = cms.string('\0'),
justATick = cms.string('\'')
)
process.b = cms.EDProducer("BProducer",
a = cms.untracked.int32(14),
b= cms.string("sillyness ensues"),
c = cms.PSet
(
a = cms.string('nested'),
b = cms.string("more")
),
d = cms.VPSet(cms.PSet(i=cms.int32(10101),
b = cms.bool(False) ), cms.PSet() ),
e = cms.VPSet(),
f = cms.VPSet(cms.PSet(inner = cms.VPSet()), cms.PSet() ),
tag = cms.InputTag("y","z"),
tags = cms.VInputTag(cms.InputTag("a","b"), cms.InputTag("c"), cms.InputTag("d","e"))
)
process.c = cms.EDProducer("CProducer")
process.y = cms.EDProducer("PoolOutputModule",
fileName = cms.untracked.string("file:myfile_y.root"),
maxEvents = cms.untracked.int32(2112)
)
process.z = cms.OutputModule("PoolOutputModule",
fileName = cms.untracked.string("file:myfile_z.root"),
maxEvents = cms.untracked.int32(91624)
)
process.vp = cms.EDProducer("VPProducer",
c = cms.PSet(
d = cms.VPSet(
cms.PSet(
a = cms.int32(32),
d = cms.PSet(
e = cms.VPSet()
)
),
cms.PSet(b=cms.int32(12))
)
)
)
process.s1 = cms.Sequence(process.a+process.b)
process.s2 = cms.Sequence(process.b)
process.s3 = cms.Sequence(process.a)
# It is not an error for two sequences (here, s3 and s4) to be identical.
process.s4 = cms.Sequence(process.a)
process.p1 = cms.Path((process.a+process.b)* process.c )
process.p2 = cms.Path(process.s1+ (process.s3*process.s2) )
process.ep1 = cms.EndPath(process.y*process.z)
process.schedule = cms.Schedule(process.p1, process.p2, process.ep1)
process.ess1 = cms.ESSource("ESSType1",
b=cms.int32(2)
)
ESSType1 = cms.ESSource("ESSType1",
b=cms.int32(0)
)
process.add_(ESSType1)
ESSType2 = cms.ESSource("ESSType2",
x = cms.double(1.5)
)
process.add_(ESSType2)
process.esm1 = cms.ESProducer("ESMType1",
s= cms.string("hi")
)
ESMType2 = cms.ESProducer("ESMType2",
a=cms.int32(3)
)
process.add_(ESMType2)
s1 = cms.Service("ServiceType1",
b=cms.double(2)
)
s2 = cms.Service("ServiceType2",
x=cms.double(1.5)
)
process.add_(s1)
process.add_(s2)
process.looper = cms.Looper("ALooper",
nLoops = cms.uint32(10)
)
process.mix = cms.EDProducer("MixingModule",
input = cms.SecSource("EmbeddedRootSource",
fileNames = cms.untracked.vstring("file:pileup.root")
),
mixtype = cms.string("fixed"),
average_number = cms.double(14.3),
min_bunch = cms.int32(-5),
max_bunch = cms.int32(3)
)
|