Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:29:00

0001 #------------------------------------------------------------
0002 #
0003 # This is an annotated example of a configuration file.
0004 # It is intended to illustrate the mapping between the configuration
0005 # language and the Python representation of the configuration
0006 # description that is used by the Data Management tools.
0007 #
0008 #
0009 #------------------------------------------------------------
0010 
0011 
0012 # The configuration grammar accepts documents which have the general
0013 # form of a nested collection of 'blocks' of various kinds. These
0014 # blocks are delimted by braces: '{' and '}'.
0015 
0016 # Newlines are meaningless in the configuration langauge.
0017 
0018 # Comments (obviously!) are introduced by a sharp ('#'), and continue
0019 # to the end of line.
0020 
0021 # C++-style comments (beginning with a cms.double(d forward slash: '//')
0022 # are also accepted.
0023 
0024 # Each configuration must have exactly one process block.
0025 
0026 # Eventually, the software may restrict the process name to being one
0027 # of a recognized set (such as HLT, PROD, TEST, USER). This is not yet
0028 # implemented.
0029 import FWCore.ParameterSet.Config as cms
0030 
0031 process = cms.Process("PROCESSNAME")
0032 
0033 process.source = cms.Source("PoolSource",
0034     fileNames = cms.untracked.vstring("file:no_real_file_here"),
0035     debugFlag = cms.untracked.bool(False),
0036     maxEvents = cms.untracked.int32(-1),
0037     debugVebosity = cms.untracked.uint32(10)
0038   )
0039 
0040 process.a = cms.EDProducer("AProducer",
0041     a = cms.int32(32),
0042     h1 = cms.uint32(0xCFDFEFFF),
0043     b = cms.vdouble(1.1, 2.2),
0044     c = cms.vstring(),
0045     d = cms.vstring('boo', "yah" ),
0046     nothing =cms.string(""),
0047     moreNothing = cms.string(''),
0048     absolutelyNothing = cms.string('\0'),
0049     justATick = cms.string('\'')
0050   )
0051 
0052 process.b = cms.EDProducer("BProducer",
0053    a = cms.untracked.int32(14),
0054    b= cms.string("sillyness ensues"),
0055    c = cms.PSet
0056    (
0057      a = cms.string('nested'),
0058      b = cms.string("more")
0059    ),
0060    d = cms.VPSet(cms.PSet(i=cms.int32(10101),
0061                   b = cms.bool(False) ), cms.PSet() ),
0062    e = cms.VPSet(),
0063    f = cms.VPSet(cms.PSet(inner = cms.VPSet()), cms.PSet() ),
0064    tag = cms.InputTag("y","z"),
0065    tags = cms.VInputTag(cms.InputTag("a","b"), cms.InputTag("c"), cms.InputTag("d","e"))
0066   )
0067 
0068 
0069 process.c = cms.EDProducer("CProducer")
0070 
0071 process.y = cms.EDProducer("PoolOutputModule",
0072   fileName = cms.untracked.string("file:myfile_y.root"),
0073   maxEvents = cms.untracked.int32(2112)
0074  )
0075 
0076 
0077 process.z = cms.OutputModule("PoolOutputModule",
0078     fileName = cms.untracked.string("file:myfile_z.root"),
0079     maxEvents = cms.untracked.int32(91624)
0080   )
0081 
0082 process.vp = cms.EDProducer("VPProducer",
0083     c = cms.PSet(
0084       d = cms.VPSet(
0085           cms.PSet(
0086             a = cms.int32(32),
0087             d = cms.PSet(
0088               e = cms.VPSet()
0089             )
0090           ),
0091           cms.PSet(b=cms.int32(12))
0092       )
0093     )
0094   )
0095 
0096 process.s1 = cms.Sequence(process.a+process.b)
0097 process.s2 = cms.Sequence(process.b)
0098 process.s3 = cms.Sequence(process.a)
0099   # It is not an error for two sequences (here, s3 and s4) to be identical.
0100 process.s4 = cms.Sequence(process.a)
0101 
0102 process.p1 = cms.Path((process.a+process.b)* process.c )
0103 process.p2 = cms.Path(process.s1+ (process.s3*process.s2) )
0104   
0105 process.ep1 = cms.EndPath(process.y*process.z)
0106 
0107 process.schedule = cms.Schedule(process.p1, process.p2, process.ep1)
0108 
0109 process.ess1 = cms.ESSource("ESSType1",
0110     b=cms.int32(2)
0111   )
0112 
0113 ESSType1 = cms.ESSource("ESSType1",
0114     b=cms.int32(0)
0115   )
0116 process.add_(ESSType1)
0117 
0118 ESSType2 = cms.ESSource("ESSType2",
0119    x = cms.double(1.5)
0120   )
0121 process.add_(ESSType2)
0122 
0123 process.esm1 = cms.ESProducer("ESMType1",
0124     s= cms.string("hi")
0125   )
0126 
0127 ESMType2 = cms.ESProducer("ESMType2", 
0128     a=cms.int32(3)
0129   )
0130 process.add_(ESMType2)
0131 
0132 s1 = cms.Service("ServiceType1", 
0133   b=cms.double(2)
0134 )
0135 
0136 s2 = cms.Service("ServiceType2", 
0137   x=cms.double(1.5)
0138 )
0139 
0140 process.add_(s1)
0141 process.add_(s2)
0142 
0143 process.looper = cms.Looper("ALooper",
0144   nLoops = cms.uint32(10)
0145 )
0146 
0147 process.mix = cms.EDProducer("MixingModule",
0148     input = cms.SecSource("EmbeddedRootSource",
0149       fileNames = cms.untracked.vstring("file:pileup.root")
0150     ),
0151     mixtype = cms.string("fixed"),
0152     average_number = cms.double(14.3),
0153     min_bunch = cms.int32(-5),
0154     max_bunch = cms.int32(3)
0155   )
0156 
0157