test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
SaveRandomSeedsSim Namespace Reference

Functions

def customise
 

Function Documentation

def SaveRandomSeedsSim.customise (   process)

Definition at line 7 of file SaveRandomSeedsSim.py.

References reco.return().

7 
8 def customise(process):
9  #Renaming the process
10  process.__dict__['_Process__name']='SIMSavingSeeds'
11  #Storing the random seeds
12  #This would no more be necessary, randomEngineStateProducer is always in the configuration
13  #But I prefer to delete it and call it rndStore:
14  #del process.randomEngineStateProducer
15  process.rndmStore=cms.EDProducer("RandomEngineStateProducer")
16  #Adding the RandomEngine seeds to the content
17  process.output.outputCommands.append("keep RandomEngineStates_*_*_*")
18  process.rndmStore_step=cms.Path(process.rndmStore)
19  #Modifying the schedule:
20  #First delete the current one:
21  del process.schedule[:]
22  #Then add the wanted sequences
23  process.schedule.append(process.simulation_step)
24  process.schedule.append(process.rndmStore_step)
25  process.schedule.append(process.out_step)
26  #Adding SimpleMemoryCheck service:
27  process.SimpleMemoryCheck=cms.Service("SimpleMemoryCheck",
28  ignoreTotal=cms.untracked.int32(1),
29  oncePerEventMode=cms.untracked.bool(True))
30  #Adding Timing service:
31  process.Timing=cms.Service("Timing")
32 
33  #Tweak Message logger to dump G4cout and G4cerr messages in G4msg.log
34  process.MessageLogger.destinations=cms.untracked.vstring('warnings'
35  , 'errors'
36  , 'infos'
37  , 'debugs'
38  , 'cout'
39  , 'cerr'
40  , 'G4msg'
41  )
42  process.MessageLogger.categories=cms.untracked.vstring('FwkJob'
43  ,'FwkReport'
44  ,'FwkSummary'
45  ,'Root_NoDictionary'
46  ,'G4cout'
47  ,'G4cerr'
48  )
49  process.MessageLogger.cerr = cms.untracked.PSet(
50  noTimeStamps = cms.untracked.bool(True)
51  )
52  process.MessageLogger.G4msg = cms.untracked.PSet(
53  noTimeStamps = cms.untracked.bool(True)
54  ,threshold = cms.untracked.string('INFO')
55  ,INFO = cms.untracked.PSet(limit = cms.untracked.int32(0))
56  ,G4cout = cms.untracked.PSet(limit = cms.untracked.int32(-1))
57  ,G4cerr = cms.untracked.PSet(limit = cms.untracked.int32(-1))
58  )
59  return(process)
return(e1-e2)*(e1-e2)+dp *dp