The main building routines
Definition at line 155 of file ConfigBuilder.py.
def ConfigBuilder::ConfigBuilder::__init__ | ( | self, | |
options, | |||
process = None , |
|||
with_output = False , |
|||
with_input = False |
|||
) |
options taken from old cmsDriver and optparse
Definition at line 158 of file ConfigBuilder.py.
00159 : 00160 """options taken from old cmsDriver and optparse """ 00161 00162 options.outfile_name = options.dirout+options.fileout 00163 00164 self._options = options 00165 00166 if self._options.isData and options.isMC: 00167 raise Exception("ERROR: You may specify only --data or --mc, not both") 00168 #if not self._options.conditions: 00169 # raise Exception("ERROR: No conditions given!\nPlease specify conditions. E.g. via --conditions=IDEAL_30X::All") 00170 00171 if hasattr(self._options,"datatier") and self._options.datatier and 'DQMROOT' in self._options.datatier and 'ENDJOB' in self._options.step: 00172 self._options.step=self._options.step.replace(',ENDJOB','') 00173 00174 # what steps are provided by this class? 00175 stepList = [re.sub(r'^prepare_', '', methodName) for methodName in ConfigBuilder.__dict__ if methodName.startswith('prepare_')] 00176 self.stepMap={} 00177 for step in self._options.step.split(","): 00178 if step=='': continue 00179 stepParts = step.split(":") 00180 stepName = stepParts[0] 00181 if stepName not in stepList and not stepName.startswith('re'): 00182 raise ValueError("Step "+stepName+" unknown") 00183 if len(stepParts)==1: 00184 self.stepMap[stepName]="" 00185 elif len(stepParts)==2: 00186 self.stepMap[stepName]=stepParts[1].split('+') 00187 elif len(stepParts)==3: 00188 self.stepMap[stepName]=(stepParts[2].split('+'),stepParts[1]) 00189 else: 00190 raise ValueError("Step definition "+step+" invalid") 00191 #print "map of steps is:",self.stepMap 00192 00193 if 'FASTSIM' in self.stepMap: 00194 #overriding the --fast option to True 00195 self._options.fast=True 00196 00197 self.with_output = with_output 00198 if hasattr(self._options,"no_output_flag") and self._options.no_output_flag: 00199 self.with_output = False 00200 self.with_input = with_input 00201 if process == None: 00202 self.process = cms.Process(self._options.name) 00203 else: 00204 self.process = process 00205 self.imports = [] 00206 self.define_Configs() 00207 self.schedule = list() 00208 00209 # we are doing three things here: 00210 # creating a process to catch errors 00211 # building the code to re-create the process 00212 00213 self.additionalCommands = [] 00214 # TODO: maybe a list of to be dumped objects would help as well 00215 self.blacklist_paths = [] 00216 self.addedObjects = [] 00217 self.additionalOutputs = {} 00218 00219 self.productionFilterSequence = None 00220 self.nextScheduleIsConditional=False 00221 self.conditionalPaths=[]
def ConfigBuilder::ConfigBuilder::addCommon | ( | self | ) |
Definition at line 288 of file ConfigBuilder.py.
00289 : 00290 if 'HARVESTING' in self.stepMap.keys() or 'ALCAHARVEST' in self.stepMap.keys(): 00291 self.process.options = cms.untracked.PSet( Rethrow = cms.untracked.vstring('ProductNotFound'),fileMode = cms.untracked.string('FULLMERGE')) 00292 else: 00293 self.process.options = cms.untracked.PSet( ) 00294 self.addedObjects.append(("","options")) 00295 00296 if self._options.lazy_download: 00297 self.process.AdaptorConfig = cms.Service("AdaptorConfig", 00298 stats = cms.untracked.bool(True), 00299 enable = cms.untracked.bool(True), 00300 cacheHint = cms.untracked.string("lazy-download"), 00301 readHint = cms.untracked.string("read-ahead-buffered") 00302 ) 00303 self.addedObjects.append(("Setup lazy download","AdaptorConfig")) 00304 00305 #self.process.cmsDriverCommand = cms.untracked.PSet( command=cms.untracked.string('cmsDriver.py '+self._options.arguments) ) 00306 #self.addedObjects.append(("what cmsDriver command was used","cmsDriverCommand")) 00307 00308 if self._options.profile: 00309 (start, interval, eventFormat, jobFormat)=self.profileOptions() 00310 self.process.IgProfService = cms.Service("IgProfService", 00311 reportFirstEvent = cms.untracked.int32(start), 00312 reportEventInterval = cms.untracked.int32(interval), 00313 reportToFileAtPostEvent = cms.untracked.string("| gzip -c > %s"%(eventFormat)), 00314 reportToFileAtPostEndJob = cms.untracked.string("| gzip -c > %s"%(jobFormat))) 00315 self.addedObjects.append(("Setup IGProf Service for profiling","IgProfService"))
def ConfigBuilder::ConfigBuilder::addConditions | ( | self | ) |
Add conditions to the process
Definition at line 698 of file ConfigBuilder.py.
00699 : 00700 """Add conditions to the process""" 00701 if not self._options.conditions: return 00702 00703 if 'FrontierConditions_GlobalTag' in self._options.conditions: 00704 print 'using FrontierConditions_GlobalTag in --conditions is not necessary anymore and will be deprecated soon. please update your command line' 00705 self._options.conditions = self._options.conditions.replace("FrontierConditions_GlobalTag,",'') 00706 00707 self.loadAndRemember(self.ConditionsDefaultCFF) 00708 00709 from Configuration.AlCa.GlobalTag import GlobalTag 00710 self.process.GlobalTag = GlobalTag(self.process.GlobalTag, self._options.conditions, self._options.custom_conditions) 00711 self.additionalCommands.append('from Configuration.AlCa.GlobalTag import GlobalTag') 00712 self.additionalCommands.append('process.GlobalTag = GlobalTag(process.GlobalTag, %s, %s)' % (repr(self._options.conditions), repr(self._options.custom_conditions))) 00713 00714 if self._options.slhc: 00715 self.loadAndRemember("SLHCUpgradeSimulations/Geometry/fakeConditions_%s_cff"%(self._options.slhc,)) 00716
def ConfigBuilder::ConfigBuilder::addCustomise | ( | self | ) |
Include the customise code
Definition at line 717 of file ConfigBuilder.py.
00718 : 00719 """Include the customise code """ 00720 00721 custOpt=self._options.customisation_file.split(",") 00722 custMap={} 00723 for opt in custOpt: 00724 if opt=='': continue 00725 if opt.count('.')>1: 00726 raise Exception("more than . in the specification:"+opt) 00727 fileName=opt.split('.')[0] 00728 if opt.count('.')==0: rest='customise' 00729 else: 00730 rest=opt.split('.')[1] 00731 if rest=='py': rest='customise' #catch the case of --customise file.py 00732 00733 if fileName in custMap: 00734 custMap[fileName].extend(rest.split('+')) 00735 else: 00736 custMap[fileName]=rest.split('+') 00737 00738 if len(custMap)==0: 00739 final_snippet='\n' 00740 else: 00741 final_snippet='\n# customisation of the process.\n' 00742 00743 allFcn=[] 00744 for opt in custMap: 00745 allFcn.extend(custMap[opt]) 00746 for fcn in allFcn: 00747 if allFcn.count(fcn)!=1: 00748 raise Exception("cannot specify twice "+fcn+" as a customisation method") 00749 00750 for f in custMap: 00751 # let python search for that package and do syntax checking at the same time 00752 packageName = f.replace(".py","").replace("/",".") 00753 __import__(packageName) 00754 package = sys.modules[packageName] 00755 00756 # now ask the package for its definition and pick .py instead of .pyc 00757 customiseFile = re.sub(r'\.pyc$', '.py', package.__file__) 00758 00759 final_snippet+='\n# Automatic addition of the customisation function from '+packageName+'\n' 00760 if self._options.inline_custom: 00761 for line in file(customiseFile,'r'): 00762 if "import FWCore.ParameterSet.Config" in line: 00763 continue 00764 final_snippet += line 00765 else: 00766 final_snippet += 'from %s import %s \n'%(packageName,','.join(custMap[f])) 00767 for fcn in custMap[f]: 00768 print "customising the process with",fcn,"from",f 00769 if not hasattr(package,fcn): 00770 #bound to fail at run time 00771 raise Exception("config "+f+" has no function "+fcn) 00772 #execute the command 00773 self.process=getattr(package,fcn)(self.process) 00774 #and print it in the configuration 00775 final_snippet += "\n#call to customisation function "+fcn+" imported from "+packageName 00776 final_snippet += "\nprocess = %s(process)\n"%(fcn,) 00777 00778 if len(custMap)!=0: 00779 final_snippet += '\n# End of customisation functions\n' 00780 00781 ### now for a usuful command 00782 if self._options.customise_commands: 00783 import string 00784 final_snippet +='\n# Customisation from command line' 00785 for com in self._options.customise_commands.split('\\n'): 00786 com=string.lstrip(com) 00787 self.executeAndRemember(com) 00788 final_snippet +='\n'+com 00789 00790 return final_snippet
def ConfigBuilder::ConfigBuilder::addExtraStream | ( | self, | |
name, | |||
stream, | |||
workflow = 'full' |
|||
) |
Definition at line 1026 of file ConfigBuilder.py.
01027 : 01028 # define output module and go from there 01029 output = cms.OutputModule("PoolOutputModule") 01030 if stream.selectEvents.parameters_().__len__()!=0: 01031 output.SelectEvents = stream.selectEvents 01032 else: 01033 output.SelectEvents = cms.untracked.PSet() 01034 output.SelectEvents.SelectEvents=cms.vstring() 01035 if isinstance(stream.paths,tuple): 01036 for path in stream.paths: 01037 output.SelectEvents.SelectEvents.append(path.label()) 01038 else: 01039 output.SelectEvents.SelectEvents.append(stream.paths.label()) 01040 01041 01042 01043 if isinstance(stream.content,str): 01044 evtPset=getattr(self.process,stream.content) 01045 for p in evtPset.parameters_(): 01046 setattr(output,p,getattr(evtPset,p)) 01047 if not self._options.inlineEventContent: 01048 def doNotInlineEventContent(instance,label = "process."+stream.content+".outputCommands"): 01049 return label 01050 output.outputCommands.__dict__["dumpPython"] = doNotInlineEventContent 01051 else: 01052 output.outputCommands = stream.content 01053 01054 01055 output.fileName = cms.untracked.string(self._options.dirout+stream.name+'.root') 01056 01057 output.dataset = cms.untracked.PSet( dataTier = stream.dataTier, 01058 filterName = cms.untracked.string(stream.name)) 01059 01060 if self._options.filtername: 01061 output.dataset.filterName= cms.untracked.string(self._options.filtername+"_"+stream.name) 01062 01063 #add an automatic flushing to limit memory consumption 01064 output.eventAutoFlushCompressedSize=cms.untracked.int32(5*1024*1024) 01065 01066 if workflow in ("producers,full"): 01067 if isinstance(stream.paths,tuple): 01068 for path in stream.paths: 01069 self.schedule.append(path) 01070 else: 01071 self.schedule.append(stream.paths) 01072 01073 01074 # in case of relvals we don't want to have additional outputs 01075 if (not self._options.relval) and workflow in ("full","output"): 01076 self.additionalOutputs[name] = output 01077 setattr(self.process,name,output) 01078 01079 if workflow == 'output': 01080 # adjust the select events to the proper trigger results from previous process 01081 filterList = output.SelectEvents.SelectEvents 01082 for i, filter in enumerate(filterList): 01083 filterList[i] = filter+":"+self._options.triggerResultsProcess 01084 01085 return output
def ConfigBuilder::ConfigBuilder::addMaxEvents | ( | self | ) |
Here we decide how many evts will be processed
Definition at line 316 of file ConfigBuilder.py.
00317 : 00318 """Here we decide how many evts will be processed""" 00319 self.process.maxEvents=cms.untracked.PSet(input=cms.untracked.int32(int(self._options.number))) 00320 if self._options.number_out: 00321 self.process.maxEvents.output = cms.untracked.int32(int(self._options.number_out)) 00322 self.addedObjects.append(("","maxEvents"))
def ConfigBuilder::ConfigBuilder::addOutput | ( | self | ) |
Add output module to the process
Definition at line 439 of file ConfigBuilder.py.
00440 : 00441 """ Add output module to the process """ 00442 result="" 00443 if self._options.outputDefinition: 00444 if self._options.datatier: 00445 print "--datatier & --eventcontent options ignored" 00446 00447 def anyOf(listOfKeys,dict,opt=None): 00448 for k in listOfKeys: 00449 if k in dict: 00450 toReturn=dict[k] 00451 dict.pop(k) 00452 return toReturn 00453 if opt!=None: 00454 return opt 00455 else: 00456 raise Exception("any of "+','.join(listOfKeys)+" are mandatory entries of --output options") 00457 00458 #new output convention with a list of dict 00459 outList = eval(self._options.outputDefinition) 00460 for (id,outDefDict) in enumerate(outList): 00461 outDefDictStr=outDefDict.__str__() 00462 if not isinstance(outDefDict,dict): 00463 raise Exception("--output needs to be passed a list of dict"+self._options.outputDefinition+" is invalid") 00464 #requires option: tier 00465 theTier=anyOf(['t','tier','dataTier'],outDefDict) 00466 #optional option: eventcontent, filtername, selectEvents, moduleLabel, filename 00467 ## event content 00468 theStreamType=anyOf(['e','ec','eventContent','streamType'],outDefDict,theTier) 00469 theFilterName=anyOf(['f','ftN','filterName'],outDefDict,'') 00470 theSelectEvent=anyOf(['s','sE','selectEvents'],outDefDict,'') 00471 theModuleLabel=anyOf(['l','mL','moduleLabel'],outDefDict,'') 00472 theExtraOutputCommands=anyOf(['o','oC','outputCommands'],outDefDict,'') 00473 # module label has a particular role 00474 if not theModuleLabel: 00475 tryNames=[theStreamType.replace(theTier.replace('-',''),'')+theTier.replace('-','')+'output', 00476 theStreamType.replace(theTier.replace('-',''),'')+theTier.replace('-','')+theFilterName+'output', 00477 theStreamType.replace(theTier.replace('-',''),'')+theTier.replace('-','')+theFilterName+theSelectEvent.split(',')[0].replace(':','for').replace(' ','')+'output' 00478 ] 00479 for name in tryNames: 00480 if not hasattr(self.process,name): 00481 theModuleLabel=name 00482 break 00483 if not theModuleLabel: 00484 raise Exception("cannot find a module label for specification: "+outDefDictStr) 00485 if id==0: 00486 defaultFileName=self._options.outfile_name 00487 else: 00488 defaultFileName=self._options.outfile_name.replace('.root','_in'+theTier+'.root') 00489 00490 theFileName=self._options.dirout+anyOf(['fn','fileName'],outDefDict,defaultFileName) 00491 if not theFileName.endswith('.root'): 00492 theFileName+='.root' 00493 00494 if len(outDefDict.keys()): 00495 raise Exception("unused keys from --output options: "+','.join(outDefDict.keys())) 00496 if theStreamType=='DQMROOT': theStreamType='DQM' 00497 if theStreamType=='ALL': 00498 theEventContent = cms.PSet(outputCommands = cms.untracked.vstring('keep *')) 00499 else: 00500 theEventContent = getattr(self.process, theStreamType+"EventContent") 00501 00502 if theStreamType=='ALCARECO' and not theFilterName: 00503 theFilterName='StreamALCACombined' 00504 00505 CppType='PoolOutputModule' 00506 if theStreamType=='DQM' and theTier=='DQMROOT': CppType='DQMRootOutputModule' 00507 output = cms.OutputModule(CppType, 00508 theEventContent.clone(), 00509 fileName = cms.untracked.string(theFileName), 00510 dataset = cms.untracked.PSet( 00511 dataTier = cms.untracked.string(theTier), 00512 filterName = cms.untracked.string(theFilterName)) 00513 ) 00514 if not theSelectEvent and hasattr(self.process,'generation_step'): 00515 output.SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring('generation_step')) 00516 if not theSelectEvent and hasattr(self.process,'filtering_step'): 00517 output.SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring('filtering_step')) 00518 if theSelectEvent: 00519 output.SelectEvents =cms.untracked.PSet(SelectEvents = cms.vstring(theSelectEvent)) 00520 00521 if hasattr(self.process,theModuleLabel): 00522 raise Exception("the current process already has a module "+theModuleLabel+" defined") 00523 #print "creating output module ",theModuleLabel 00524 setattr(self.process,theModuleLabel,output) 00525 outputModule=getattr(self.process,theModuleLabel) 00526 setattr(self.process,theModuleLabel+'_step',cms.EndPath(outputModule)) 00527 path=getattr(self.process,theModuleLabel+'_step') 00528 self.schedule.append(path) 00529 00530 if not self._options.inlineEventContent and hasattr(self.process,theStreamType+"EventContent"): 00531 def doNotInlineEventContent(instance,label = "cms.untracked.vstring(process."+theStreamType+"EventContent.outputCommands)"): 00532 return label 00533 outputModule.outputCommands.__dict__["dumpPython"] = doNotInlineEventContent 00534 if theExtraOutputCommands: 00535 if not isinstance(theExtraOutputCommands,list): 00536 raise Exception("extra ouput command in --option must be a list of strings") 00537 if hasattr(self.process,theStreamType+"EventContent"): 00538 self.executeAndRemember('process.%s.outputCommands.extend(%s)'%(theModuleLabel,theExtraOutputCommands)) 00539 else: 00540 outputModule.outputCommands.extend(theExtraOutputCommands) 00541 00542 result+="\nprocess."+theModuleLabel+" = "+outputModule.dumpPython() 00543 00544 ##ends the --output options model 00545 return result 00546 00547 streamTypes=self._options.eventcontent.split(',') 00548 tiers=self._options.datatier.split(',') 00549 if not self._options.outputDefinition and len(streamTypes)!=len(tiers): 00550 raise Exception("number of event content arguments does not match number of datatier arguments") 00551 00552 # if the only step is alca we don't need to put in an output 00553 if self._options.step.split(',')[0].split(':')[0] == 'ALCA': 00554 return "\n" 00555 00556 for i,(streamType,tier) in enumerate(zip(streamTypes,tiers)): 00557 if streamType=='': continue 00558 if streamType=='DQMROOT': streamType='DQM' 00559 theEventContent = getattr(self.process, streamType+"EventContent") 00560 if i==0: 00561 theFileName=self._options.outfile_name 00562 theFilterName=self._options.filtername 00563 else: 00564 theFileName=self._options.outfile_name.replace('.root','_in'+streamType+'.root') 00565 theFilterName=self._options.filtername 00566 CppType='PoolOutputModule' 00567 if streamType=='DQM' and tier=='DQMROOT': CppType='DQMRootOutputModule' 00568 output = cms.OutputModule(CppType, 00569 theEventContent, 00570 fileName = cms.untracked.string(theFileName), 00571 dataset = cms.untracked.PSet(dataTier = cms.untracked.string(tier), 00572 filterName = cms.untracked.string(theFilterName) 00573 ) 00574 ) 00575 if hasattr(self.process,"generation_step"): 00576 output.SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring('generation_step')) 00577 if hasattr(self.process,"filtering_step"): 00578 output.SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring('filtering_step')) 00579 00580 if streamType=='ALCARECO': 00581 output.dataset.filterName = cms.untracked.string('StreamALCACombined') 00582 00583 outputModuleName=streamType+'output' 00584 setattr(self.process,outputModuleName,output) 00585 outputModule=getattr(self.process,outputModuleName) 00586 setattr(self.process,outputModuleName+'_step',cms.EndPath(outputModule)) 00587 path=getattr(self.process,outputModuleName+'_step') 00588 self.schedule.append(path) 00589 00590 if not self._options.inlineEventContent: 00591 def doNotInlineEventContent(instance,label = "process."+streamType+"EventContent.outputCommands"): 00592 return label 00593 outputModule.outputCommands.__dict__["dumpPython"] = doNotInlineEventContent 00594 00595 result+="\nprocess."+outputModuleName+" = "+outputModule.dumpPython() 00596 00597 return result
def ConfigBuilder::ConfigBuilder::addSource | ( | self | ) |
Here the source is built. Priority: file, generator
Definition at line 323 of file ConfigBuilder.py.
00324 : 00325 """Here the source is built. Priority: file, generator""" 00326 self.addedObjects.append(("Input source","source")) 00327 00328 def filesFromOption(self): 00329 for entry in self._options.filein.split(','): 00330 print "entry",entry 00331 if entry.startswith("filelist:"): 00332 filesFromList(entry[9:],self.process.source) 00333 elif entry.startswith("dbs:"): 00334 filesFromDBSQuery('find file where dataset = %s'%(entry[4:]),self.process.source) 00335 else: 00336 self.process.source.fileNames.append(self._options.dirin+entry) 00337 if self._options.secondfilein: 00338 if not hasattr(self.process.source,"secondaryFileNames"): 00339 raise Exception("--secondfilein not compatible with "+self._options.filetype+"input type") 00340 for entry in self._options.secondfilein.split(','): 00341 print "entry",entry 00342 if entry.startswith("filelist:"): 00343 self.process.source.secondaryFileNames.extend((filesFromList(entry[9:]))[0]) 00344 elif entry.startswith("dbs:"): 00345 self.process.source.secondaryFileNames.extend((filesFromDBSQuery('find file where dataset = %s'%(entry[4:])))[0]) 00346 else: 00347 self.process.source.secondaryFileNames.append(self._options.dirin+entry) 00348 00349 if self._options.filein or self._options.dbsquery: 00350 if self._options.filetype == "EDM": 00351 self.process.source=cms.Source("PoolSource", 00352 fileNames = cms.untracked.vstring(), 00353 secondaryFileNames= cms.untracked.vstring()) 00354 filesFromOption(self) 00355 elif self._options.filetype == "DAT": 00356 self.process.source=cms.Source("NewEventStreamFileReader",fileNames = cms.untracked.vstring()) 00357 filesFromOption(self) 00358 elif self._options.filetype == "LHE": 00359 self.process.source=cms.Source("LHESource", fileNames = cms.untracked.vstring()) 00360 if self._options.filein.startswith("lhe:"): 00361 #list the article directory automatically 00362 args=self._options.filein.split(':') 00363 article=args[1] 00364 print 'LHE input from article ',article 00365 location='/store/lhe/' 00366 import os 00367 textOfFiles=os.popen('cmsLHEtoEOSManager.py -l '+article) 00368 for line in textOfFiles: 00369 for fileName in [x for x in line.split() if '.lhe' in x]: 00370 self.process.source.fileNames.append(location+article+'/'+fileName) 00371 if len(args)>2: 00372 self.process.source.skipEvents = cms.untracked.uint32(int(args[2])) 00373 else: 00374 filesFromOption(self) 00375 00376 00377 elif self._options.filetype == "DQM": 00378 self.process.source=cms.Source("DQMRootSource", 00379 fileNames = cms.untracked.vstring()) 00380 filesFromOption(self) 00381 00382 if ('HARVESTING' in self.stepMap.keys() or 'ALCAHARVEST' in self.stepMap.keys()) and (not self._options.filetype == "DQM"): 00383 self.process.source.processingMode = cms.untracked.string("RunsAndLumis") 00384 00385 if self._options.dbsquery!='': 00386 self.process.source=cms.Source("PoolSource", fileNames = cms.untracked.vstring(),secondaryFileNames = cms.untracked.vstring()) 00387 filesFromDBSQuery(self._options.dbsquery,self.process.source) 00388 00389 if self._options.inputEventContent: 00390 import copy 00391 def dropSecondDropStar(iec): 00392 #drop occurence of 'drop *' in the list 00393 count=0 00394 for item in iec: 00395 if item=='drop *': 00396 if count!=0: 00397 iec.remove(item) 00398 count+=1 00399 00400 00401 ## allow comma separated input eventcontent 00402 if not hasattr(self.process.source,'inputCommands'): self.process.source.inputCommands=cms.untracked.vstring() 00403 for evct in self._options.inputEventContent.split(','): 00404 if evct=='': continue 00405 theEventContent = getattr(self.process, evct+"EventContent") 00406 if hasattr(theEventContent,'outputCommands'): 00407 self.process.source.inputCommands.extend(copy.copy(theEventContent.outputCommands)) 00408 if hasattr(theEventContent,'inputCommands'): 00409 self.process.source.inputCommands.extend(copy.copy(theEventContent.inputCommands)) 00410 00411 dropSecondDropStar(self.process.source.inputCommands) 00412 00413 if not self._options.dropDescendant: 00414 self.process.source.dropDescendantsOfDroppedBranches = cms.untracked.bool(False) 00415 00416 if self._options.inputCommands: 00417 if not hasattr(self.process.source,'inputCommands'): self.process.source.inputCommands=cms.untracked.vstring() 00418 for command in self._options.inputCommands.split(','): 00419 # remove whitespace around the keep/drop statements 00420 command = command.strip() 00421 if command=='': continue 00422 self.process.source.inputCommands.append(command) 00423 if not self._options.dropDescendant: 00424 self.process.source.dropDescendantsOfDroppedBranches = cms.untracked.bool(False) 00425 00426 if self._options.lumiToProcess: 00427 import FWCore.PythonUtilities.LumiList as LumiList 00428 self.process.source.lumisToProcess = cms.untracked.VLuminosityBlockRange( LumiList.LumiList(self._options.lumiToProcess).getCMSSWString().split(',') ) 00429 00430 if 'GEN' in self.stepMap.keys() or 'LHE' in self.stepMap or (not self._options.filein and hasattr(self._options, "evt_type")): 00431 if self.process.source is None: 00432 self.process.source=cms.Source("EmptySource") 00433 # if option himix is active, drop possibly duplicate DIGI-RAW info: 00434 if self._options.himix==True: 00435 self.process.source.inputCommands = cms.untracked.vstring('drop *','keep *_generator_*_*','keep *_g4SimHits_*_*') 00436 self.process.source.dropDescendantsOfDroppedBranches=cms.untracked.bool(False) 00437 00438 return
def ConfigBuilder::ConfigBuilder::addStandardSequences | ( | self | ) |
Add selected standard sequences to the process
Definition at line 598 of file ConfigBuilder.py.
00599 : 00600 """ 00601 Add selected standard sequences to the process 00602 """ 00603 # load the pile up file 00604 if self._options.pileup: 00605 pileupSpec=self._options.pileup.split(',')[0] 00606 from Configuration.StandardSequences.Mixing import Mixing,defineMixing 00607 if not pileupSpec in Mixing and '.' not in pileupSpec and 'file:' not in pileupSpec: 00608 raise Exception(pileupSpec+' is not a know mixing scenario:\n available are: '+'\n'.join(Mixing.keys())) 00609 if '.' in pileupSpec: 00610 mixingDict={'file':pileupSpec} 00611 elif pileupSpec.startswith('file:'): 00612 mixingDict={'file':pileupSpec[5:]} 00613 else: 00614 import copy 00615 mixingDict=copy.copy(Mixing[pileupSpec]) 00616 if len(self._options.pileup.split(','))>1: 00617 mixingDict.update(eval(self._options.pileup[self._options.pileup.find(',')+1:])) 00618 if 'file:' in pileupSpec: 00619 #the file is local 00620 self.process.load(mixingDict['file']) 00621 print "inlining mixing module configuration" 00622 self._options.inlineObjets+=',mix' 00623 else: 00624 self.loadAndRemember(mixingDict['file']) 00625 00626 mixingDict.pop('file') 00627 if self._options.pileup_input: 00628 if self._options.pileup_input.startswith('dbs'): 00629 mixingDict['F']=filesFromDBSQuery('find file where dataset = %s'%(self._options.pileup_input[4:],))[0] 00630 else: 00631 mixingDict['F']=self._options.pileup_input.split(',') 00632 specialization=defineMixing(mixingDict,self._options.fast) 00633 for command in specialization: 00634 self.executeAndRemember(command) 00635 if len(mixingDict)!=0: 00636 raise Exception('unused mixing specification: '+mixingDict.keys().__str__()) 00637 00638 if self._options.fast and not 'SIM' in self.stepMap and not 'FASTSIM' in self.stepMap: 00639 self.executeAndRemember('process.mix.playback= True') 00640 00641 # load the geometry file 00642 try: 00643 if len(self.stepMap): 00644 self.loadAndRemember(self.GeometryCFF) 00645 if ('SIM' in self.stepMap or 'reSIM' in self.stepMap) and not self._options.fast: 00646 self.loadAndRemember(self.SimGeometryCFF) 00647 if self.geometryDBLabel: 00648 self.executeAndRemember('process.XMLFromDBSource.label = cms.string("%s")'%(self.geometryDBLabel)) 00649 except ImportError: 00650 print "Geometry option",self._options.geometry,"unknown." 00651 raise 00652 00653 if len(self.stepMap): 00654 self.loadAndRemember(self.magFieldCFF) 00655 00656 # what steps are provided by this class? 00657 stepList = [re.sub(r'^prepare_', '', methodName) for methodName in ConfigBuilder.__dict__ if methodName.startswith('prepare_')] 00658 00659 ### Benedikt can we add here a check that assure that we are going to generate a correct config file? 00660 ### i.e. the harvesting do not have to include other step...... 00661 00662 # look which steps are requested and invoke the corresponding method 00663 for step in self._options.step.split(","): 00664 if step == "": 00665 continue 00666 print step 00667 if step.startswith('re'): 00668 ##add the corresponding input content 00669 if step[2:] not in self._options.donotDropOnInput: 00670 self._options.inputEventContent='%s,%s'%(step.split(":")[0].upper(),self._options.inputEventContent) 00671 step=step[2:] 00672 stepParts = step.split(":") # for format STEP:alternativeSequence 00673 stepName = stepParts[0] 00674 if stepName not in stepList: 00675 raise ValueError("Step "+stepName+" unknown") 00676 if len(stepParts)==1: 00677 getattr(self,"prepare_"+step)(sequence = getattr(self,step+"DefaultSeq")) 00678 elif len(stepParts)==2: 00679 getattr(self,"prepare_"+stepName)(sequence = stepParts[1]) 00680 elif len(stepParts)==3: 00681 getattr(self,"prepare_"+stepName)(sequence = stepParts[1]+','+stepParts[2]) 00682 00683 else: 00684 raise ValueError("Step definition "+step+" invalid") 00685 00686 if self._options.restoreRNDSeeds!=False: 00687 #it is either True, or a process name 00688 if self._options.restoreRNDSeeds==True: 00689 self.executeAndRemember('process.RandomNumberGeneratorService.restoreStateLabel=cms.untracked.string("randomEngineStateProducer")') 00690 else: 00691 self.executeAndRemember('process.RandomNumberGeneratorService.restoreStateTag=cms.untracked.InputTag("randomEngineStateProducer","","%s")'%(self._options.restoreRNDSeeds)) 00692 if self._options.inputEventContent or self._options.inputCommands: 00693 if self._options.inputCommands: 00694 self._options.inputCommands+='keep *_randomEngineStateProducer_*_*,' 00695 else: 00696 self._options.inputCommands='keep *_randomEngineStateProducer_*_*,' 00697
def ConfigBuilder::ConfigBuilder::build_production_info | ( | self, | |
evt_type, | |||
evtnumber | |||
) |
Add useful info for the production.
Definition at line 1883 of file ConfigBuilder.py.
01884 : 01885 """ Add useful info for the production. """ 01886 self.process.configurationMetadata=cms.untracked.PSet\ 01887 (version=cms.untracked.string("$Revision: 1.14 $"), 01888 name=cms.untracked.string("Applications"), 01889 annotation=cms.untracked.string(evt_type+ " nevts:"+str(evtnumber)) 01890 ) 01891 01892 self.addedObjects.append(("Production Info","configurationMetadata")) 01893
def ConfigBuilder::ConfigBuilder::define_Configs | ( | self | ) |
Definition at line 795 of file ConfigBuilder.py.
00796 : 00797 if len(self.stepMap): 00798 self.loadAndRemember('Configuration/StandardSequences/Services_cff') 00799 if self._options.particleTable not in defaultOptions.particleTableList: 00800 print 'Invalid particle table provided. Options are:' 00801 print defaultOptions.particleTable 00802 sys.exit(-1) 00803 else: 00804 if len(self.stepMap): 00805 self.loadAndRemember('SimGeneral.HepPDTESSource.'+self._options.particleTable+'_cfi') 00806 00807 self.loadAndRemember('FWCore/MessageService/MessageLogger_cfi') 00808 00809 self.ALCADefaultCFF="Configuration/StandardSequences/AlCaRecoStreams_cff" 00810 self.GENDefaultCFF="Configuration/StandardSequences/Generator_cff" 00811 self.SIMDefaultCFF="Configuration/StandardSequences/Sim_cff" 00812 self.DIGIDefaultCFF="Configuration/StandardSequences/Digi_cff" 00813 self.DIGI2RAWDefaultCFF="Configuration/StandardSequences/DigiToRaw_cff" 00814 self.L1EMDefaultCFF='Configuration/StandardSequences/SimL1Emulator_cff' 00815 self.L1MENUDefaultCFF="Configuration/StandardSequences/L1TriggerDefaultMenu_cff" 00816 self.HLTDefaultCFF="Configuration/StandardSequences/HLTtable_cff" 00817 self.RAW2DIGIDefaultCFF="Configuration/StandardSequences/RawToDigi_Data_cff" 00818 self.L1RecoDefaultCFF="Configuration/StandardSequences/L1Reco_cff" 00819 self.L1TrackTriggerDefaultCFF="Configuration/StandardSequences/L1TrackTrigger_cff" 00820 self.RECODefaultCFF="Configuration/StandardSequences/Reconstruction_Data_cff" 00821 self.SKIMDefaultCFF="Configuration/StandardSequences/Skims_cff" 00822 self.POSTRECODefaultCFF="Configuration/StandardSequences/PostRecoGenerator_cff" 00823 self.VALIDATIONDefaultCFF="Configuration/StandardSequences/Validation_cff" 00824 self.L1HwValDefaultCFF = "Configuration/StandardSequences/L1HwVal_cff" 00825 self.DQMOFFLINEDefaultCFF="DQMOffline/Configuration/DQMOffline_cff" 00826 self.HARVESTINGDefaultCFF="Configuration/StandardSequences/Harvesting_cff" 00827 self.ALCAHARVESTDefaultCFF="Configuration/StandardSequences/AlCaHarvesting_cff" 00828 self.ENDJOBDefaultCFF="Configuration/StandardSequences/EndOfProcess_cff" 00829 self.ConditionsDefaultCFF = "Configuration/StandardSequences/FrontierConditions_GlobalTag_cff" 00830 self.CFWRITERDefaultCFF = "Configuration/StandardSequences/CrossingFrameWriter_cff" 00831 self.REPACKDefaultCFF="Configuration/StandardSequences/DigiToRaw_Repack_cff" 00832 00833 if "DATAMIX" in self.stepMap.keys(): 00834 self.DATAMIXDefaultCFF="Configuration/StandardSequences/DataMixer"+self._options.datamix+"_cff" 00835 self.DIGIDefaultCFF="Configuration/StandardSequences/DigiDM_cff" 00836 self.DIGI2RAWDefaultCFF="Configuration/StandardSequences/DigiToRawDM_cff" 00837 self.L1EMDefaultCFF='Configuration/StandardSequences/SimL1EmulatorDM_cff' 00838 00839 self.ALCADefaultSeq=None 00840 self.LHEDefaultSeq='externalLHEProducer' 00841 self.GENDefaultSeq='pgen' 00842 self.SIMDefaultSeq='psim' 00843 self.DIGIDefaultSeq='pdigi' 00844 self.DATAMIXDefaultSeq=None 00845 self.DIGI2RAWDefaultSeq='DigiToRaw' 00846 self.HLTDefaultSeq='GRun' 00847 self.L1DefaultSeq=None 00848 self.L1REPACKDefaultSeq='GT' 00849 self.HARVESTINGDefaultSeq=None 00850 self.ALCAHARVESTDefaultSeq=None 00851 self.CFWRITERDefaultSeq=None 00852 self.RAW2DIGIDefaultSeq='RawToDigi' 00853 self.L1RecoDefaultSeq='L1Reco' 00854 self.L1TrackTriggerDefaultSeq='L1TrackTrigger' 00855 if 'RAW2DIGI' in self.stepMap and 'RECO' in self.stepMap: 00856 self.RECODefaultSeq='reconstruction' 00857 else: 00858 self.RECODefaultSeq='reconstruction_fromRECO' 00859 00860 self.POSTRECODefaultSeq=None 00861 self.L1HwValDefaultSeq='L1HwVal' 00862 self.DQMDefaultSeq='DQMOffline' 00863 self.FASTSIMDefaultSeq='all' 00864 self.VALIDATIONDefaultSeq='' 00865 self.PATLayer0DefaultSeq='all' 00866 self.ENDJOBDefaultSeq='endOfProcess' 00867 self.REPACKDefaultSeq='DigiToRawRepack' 00868 00869 self.EVTCONTDefaultCFF="Configuration/EventContent/EventContent_cff" 00870 00871 if not self._options.beamspot: 00872 self._options.beamspot=VtxSmearedDefaultKey 00873 00874 # if its MC then change the raw2digi 00875 if self._options.isMC==True: 00876 self.RAW2DIGIDefaultCFF="Configuration/StandardSequences/RawToDigi_cff" 00877 self.RECODefaultCFF="Configuration/StandardSequences/Reconstruction_cff" 00878 self.DQMOFFLINEDefaultCFF="DQMOffline/Configuration/DQMOfflineMC_cff" 00879 self.ALCADefaultCFF="Configuration/StandardSequences/AlCaRecoStreamsMC_cff" 00880 else: 00881 self._options.beamspot = None 00882 00883 #patch for gen, due to backward incompatibility 00884 if 'reGEN' in self.stepMap: 00885 self.GENDefaultSeq='fixGenInfo' 00886 00887 if self._options.scenario=='cosmics': 00888 self.DIGIDefaultCFF="Configuration/StandardSequences/DigiCosmics_cff" 00889 self.RECODefaultCFF="Configuration/StandardSequences/ReconstructionCosmics_cff" 00890 self.SKIMDefaultCFF="Configuration/StandardSequences/SkimsCosmics_cff" 00891 self.EVTCONTDefaultCFF="Configuration/EventContent/EventContentCosmics_cff" 00892 self.DQMOFFLINEDefaultCFF="DQMOffline/Configuration/DQMOfflineCosmics_cff" 00893 if self._options.isMC==True: 00894 self.DQMOFFLINEDefaultCFF="DQMOffline/Configuration/DQMOfflineCosmicsMC_cff" 00895 self.HARVESTINGDefaultCFF="Configuration/StandardSequences/HarvestingCosmics_cff" 00896 self.RECODefaultSeq='reconstructionCosmics' 00897 self.DQMDefaultSeq='DQMOfflineCosmics' 00898 00899 if self._options.himix: 00900 print "From the presence of the himix option, we have determined that this is heavy ions and will use '--scenario HeavyIons'." 00901 self._options.scenario='HeavyIons' 00902 00903 if self._options.scenario=='HeavyIons': 00904 if not self._options.beamspot: 00905 self._options.beamspot=VtxSmearedHIDefaultKey 00906 self.HLTDefaultSeq = 'HIon' 00907 if not self._options.himix: 00908 self.GENDefaultSeq='pgen_hi' 00909 else: 00910 self.GENDefaultSeq='pgen_himix' 00911 self.VALIDATIONDefaultCFF="Configuration/StandardSequences/ValidationHeavyIons_cff" 00912 self.VALIDATIONDefaultSeq='' 00913 self.EVTCONTDefaultCFF="Configuration/EventContent/EventContentHeavyIons_cff" 00914 self.RECODefaultCFF="Configuration/StandardSequences/ReconstructionHeavyIons_cff" 00915 self.RECODefaultSeq='reconstructionHeavyIons' 00916 self.ALCADefaultCFF = "Configuration/StandardSequences/AlCaRecoStreamsHeavyIons_cff" 00917 self.DQMOFFLINEDefaultCFF="DQMOffline/Configuration/DQMOfflineHeavyIons_cff" 00918 self.DQMDefaultSeq='DQMOfflineHeavyIons' 00919 self.SKIMDefaultCFF="Configuration/StandardSequences/SkimsHeavyIons_cff" 00920 self.HARVESTINGDefaultCFF="Configuration/StandardSequences/HarvestingHeavyIons_cff" 00921 if self._options.isMC==True: 00922 self.DQMOFFLINEDefaultCFF="DQMOffline/Configuration/DQMOfflineHeavyIonsMC_cff" 00923 00924 00925 self.RAW2RECODefaultSeq=','.join([self.RAW2DIGIDefaultSeq,self.RECODefaultSeq]) 00926 00927 self.USERDefaultSeq='user' 00928 self.USERDefaultCFF=None 00929 00930 # the magnetic field 00931 if self._options.isData: 00932 if self._options.magField==defaultOptions.magField: 00933 print "magnetic field option forced to: AutoFromDBCurrent" 00934 self._options.magField='AutoFromDBCurrent' 00935 self.magFieldCFF = 'Configuration/StandardSequences/MagneticField_'+self._options.magField.replace('.','')+'_cff' 00936 self.magFieldCFF = self.magFieldCFF.replace("__",'_') 00937 00938 # the geometry 00939 self.GeometryCFF='Configuration/StandardSequences/GeometryRecoDB_cff' 00940 self.geometryDBLabel=None 00941 simGeometry='' 00942 if self._options.fast: 00943 if 'start' in self._options.conditions.lower(): 00944 self.GeometryCFF='FastSimulation/Configuration/Geometries_START_cff' 00945 else: 00946 self.GeometryCFF='FastSimulation/Configuration/Geometries_MC_cff' 00947 else: 00948 def inGeometryKeys(opt): 00949 from Configuration.StandardSequences.GeometryConf import GeometryConf 00950 if opt in GeometryConf: 00951 return GeometryConf[opt] 00952 else: 00953 return opt 00954 00955 geoms=self._options.geometry.split(',') 00956 if len(geoms)==1: geoms=inGeometryKeys(geoms[0]).split(',') 00957 if len(geoms)==2: 00958 #may specify the reco geometry 00959 if '/' in geoms[1] or '_cff' in geoms[1]: 00960 self.GeometryCFF=geoms[1] 00961 else: 00962 self.GeometryCFF='Configuration/Geometry/Geometry'+geoms[1]+'_cff' 00963 00964 if (geoms[0].startswith('DB:')): 00965 self.SimGeometryCFF='Configuration/StandardSequences/GeometrySimDB_cff' 00966 self.geometryDBLabel=geoms[0][3:] 00967 print "with DB:" 00968 else: 00969 if '/' in geoms[0] or '_cff' in geoms[0]: 00970 self.SimGeometryCFF=geoms[0] 00971 else: 00972 simGeometry=geoms[0] 00973 if self._options.gflash==True: 00974 self.SimGeometryCFF='Configuration/Geometry/Geometry'+geoms[0]+'GFlash_cff' 00975 else: 00976 self.SimGeometryCFF='Configuration/Geometry/Geometry'+geoms[0]+'_cff' 00977 00978 # synchronize the geometry configuration and the FullSimulation sequence to be used 00979 if simGeometry not in defaultOptions.geometryExtendedOptions: 00980 self.SIMDefaultCFF="Configuration/StandardSequences/SimIdeal_cff" 00981 00982 if self._options.scenario=='nocoll' or self._options.scenario=='cosmics': 00983 self.SIMDefaultCFF="Configuration/StandardSequences/SimNOBEAM_cff" 00984 self._options.beamspot='NoSmear' 00985 00986 # if fastsim switch event content 00987 if self._options.fast: 00988 self.GENDefaultSeq='pgen_genonly' 00989 self.SIMDefaultCFF = 'FastSimulation.Configuration.FamosSequences_cff' 00990 self.SIMDefaultSeq='simulationWithFamos' 00991 self.RECODefaultCFF= 'FastSimulation.Configuration.FamosSequences_cff' 00992 self.RECODefaultSeq= 'reconstructionWithFamos' 00993 self.EVTCONTDefaultCFF = "FastSimulation.Configuration.EventContent_cff" 00994 self.VALIDATIONDefaultCFF = "FastSimulation.Configuration.Validation_cff" 00995 00996 00997 00998 # Mixing 00999 if self._options.pileup=='default': 01000 from Configuration.StandardSequences.Mixing import MixingDefaultKey,MixingFSDefaultKey 01001 if self._options.fast: 01002 self._options.pileup=MixingFSDefaultKey 01003 else: 01004 self._options.pileup=MixingDefaultKey 01005 01006 #not driven by a default cff anymore 01007 if self._options.isData: 01008 self._options.pileup=None 01009 if self._options.isMC==True and self._options.himix==False: 01010 if self._options.fast: 01011 self._options.pileup='FS_'+self._options.pileup 01012 elif self._options.isMC==True and self._options.himix==True: 01013 self._options.pileup='HiMix' 01014 01015 01016 if self._options.slhc: 01017 self.GeometryCFF='SLHCUpgradeSimulations.Geometry.%s_cmsSimIdealGeometryXML_cff'%(self._options.slhc,) 01018 if 'stdgeom' not in self._options.slhc: 01019 self.SimGeometryCFF='SLHCUpgradeSimulations.Geometry.%s_cmsSimIdealGeometryXML_cff'%(self._options.slhc,) 01020 self.DIGIDefaultCFF='SLHCUpgradeSimulations/Geometry/Digi_%s_cff'%(self._options.slhc,) 01021 if self._options.pileup!=defaultOptions.pileup: 01022 self._options.pileup='SLHC_%s_%s'%(self._options.pileup,self._options.slhc) 01023 01024 self.REDIGIDefaultSeq=self.DIGIDefaultSeq
def ConfigBuilder::ConfigBuilder::executeAndRemember | ( | self, | |
command | |||
) |
helper routine to remember replace statements
Definition at line 279 of file ConfigBuilder.py.
00280 : 00281 """helper routine to remember replace statements""" 00282 self.additionalCommands.append(command) 00283 if not command.strip().startswith("#"): 00284 # substitute: process.foo = process.bar -> self.process.foo = self.process.bar 00285 import re 00286 exec(re.sub(r"([^a-zA-Z_0-9]|^)(process)([^a-zA-Z_0-9])",r"\1self.process\3",command)) 00287 #exec(command.replace("process.","self.process."))
def ConfigBuilder::ConfigBuilder::expandMapping | ( | self, | |
seqList, | |||
mapping, | |||
index = None |
|||
) |
Definition at line 1695 of file ConfigBuilder.py.
01696 : 01697 maxLevel=20 01698 level=0 01699 while '@' in repr(seqList) and level<maxLevel: 01700 level+=1 01701 for specifiedCommand in seqList: 01702 if specifiedCommand.startswith('@'): 01703 location=specifiedCommand[1:] 01704 if not location in mapping: 01705 raise Exception("Impossible to map "+location+" from "+repr(mapping)) 01706 mappedTo=mapping[location] 01707 if index!=None: 01708 mappedTo=mappedTo[index] 01709 seqList.remove(specifiedCommand) 01710 seqList.extend(mappedTo.split('+')) 01711 break; 01712 if level==maxLevel: 01713 raise Exception("Could not fully expand "+repr(seqList)+" from "+repr(mapping))
def ConfigBuilder::ConfigBuilder::finalizeFastSimHLT | ( | self | ) |
Definition at line 1806 of file ConfigBuilder.py.
def ConfigBuilder::ConfigBuilder::load | ( | self, | |
includeFile | |||
) |
Definition at line 265 of file ConfigBuilder.py.
def ConfigBuilder::ConfigBuilder::loadAndRemember | ( | self, | |
includeFile | |||
) |
helper routine to load am memorize imports
Definition at line 270 of file ConfigBuilder.py.
00271 : 00272 """helper routine to load am memorize imports""" 00273 # we could make the imports a on-the-fly data method of the process instance itself 00274 # not sure if the latter is a good idea 00275 includeFile = includeFile.replace('/','.') 00276 self.imports.append(includeFile) 00277 self.process.load(includeFile) 00278 return sys.modules[includeFile]
def ConfigBuilder::ConfigBuilder::loadDefaultOrSpecifiedCFF | ( | self, | |
sequence, | |||
defaultCFF | |||
) |
Definition at line 1091 of file ConfigBuilder.py.
01092 : 01093 if ( len(sequence.split('.'))==1 ): 01094 l=self.loadAndRemember(defaultCFF) 01095 elif ( len(sequence.split('.'))==2 ): 01096 l=self.loadAndRemember(sequence.split('.')[0]) 01097 sequence=sequence.split('.')[1] 01098 else: 01099 print "sub sequence configuration must be of the form dir/subdir/cff.a+b+c or cff.a" 01100 print sequence,"not recognized" 01101 raise 01102 return l
def ConfigBuilder::ConfigBuilder::prepare | ( | self, | |
doChecking = False |
|||
) |
Prepare the configuration string and add missing pieces.
Definition at line 1894 of file ConfigBuilder.py.
01895 : 01896 """ Prepare the configuration string and add missing pieces.""" 01897 01898 self.loadAndRemember(self.EVTCONTDefaultCFF) #load the event contents regardless 01899 self.addMaxEvents() 01900 self.addStandardSequences() 01901 if self.with_input: 01902 self.addSource() 01903 self.addConditions() 01904 01905 01906 outputModuleCfgCode="" 01907 if not 'HARVESTING' in self.stepMap.keys() and not 'SKIM' in self.stepMap.keys() and not 'ALCAHARVEST' in self.stepMap.keys() and not 'ALCAOUTPUT' in self.stepMap.keys() and self.with_output: 01908 outputModuleCfgCode=self.addOutput() 01909 01910 self.addCommon() 01911 01912 self.pythonCfgCode = "# Auto generated configuration file\n" 01913 self.pythonCfgCode += "# using: \n# "+__version__[1:-1]+"\n# "+__source__[1:-1]+'\n' 01914 self.pythonCfgCode += "# with command line options: "+self._options.arguments+'\n' 01915 self.pythonCfgCode += "import FWCore.ParameterSet.Config as cms\n\n" 01916 self.pythonCfgCode += "process = cms.Process('"+self.process.name_()+"')\n\n" 01917 01918 self.pythonCfgCode += "# import of standard configurations\n" 01919 for module in self.imports: 01920 self.pythonCfgCode += ("process.load('"+module+"')\n") 01921 01922 # production info 01923 if not hasattr(self.process,"configurationMetadata"): 01924 self.build_production_info(self._options.evt_type, self._options.number) 01925 else: 01926 #the PSet was added via a load 01927 self.addedObjects.append(("Production Info","configurationMetadata")) 01928 01929 self.pythonCfgCode +="\n" 01930 for comment,object in self.addedObjects: 01931 if comment!="": 01932 self.pythonCfgCode += "\n# "+comment+"\n" 01933 self.pythonCfgCode += dumpPython(self.process,object) 01934 01935 # dump the output definition 01936 self.pythonCfgCode += "\n# Output definition\n" 01937 self.pythonCfgCode += outputModuleCfgCode 01938 01939 # dump all additional outputs (e.g. alca or skim streams) 01940 self.pythonCfgCode += "\n# Additional output definition\n" 01941 #I do not understand why the keys are not normally ordered. 01942 nl=self.additionalOutputs.keys() 01943 nl.sort() 01944 for name in nl: 01945 output = self.additionalOutputs[name] 01946 self.pythonCfgCode += "process.%s = %s" %(name, output.dumpPython()) 01947 tmpOut = cms.EndPath(output) 01948 setattr(self.process,name+'OutPath',tmpOut) 01949 self.schedule.append(tmpOut) 01950 01951 # dump all additional commands 01952 self.pythonCfgCode += "\n# Other statements\n" 01953 for command in self.additionalCommands: 01954 self.pythonCfgCode += command + "\n" 01955 01956 #comma separated list of objects that deserve to be inlined in the configuration (typically from a modified config deep down) 01957 for object in self._options.inlineObjets.split(','): 01958 if not object: 01959 continue 01960 if not hasattr(self.process,object): 01961 print 'cannot inline -'+object+'- : not known' 01962 else: 01963 self.pythonCfgCode +='\n' 01964 self.pythonCfgCode +=dumpPython(self.process,object) 01965 01966 # dump all paths 01967 self.pythonCfgCode += "\n# Path and EndPath definitions\n" 01968 for path in self.process.paths: 01969 if getattr(self.process,path) not in self.blacklist_paths: 01970 self.pythonCfgCode += dumpPython(self.process,path) 01971 01972 for endpath in self.process.endpaths: 01973 if getattr(self.process,endpath) not in self.blacklist_paths: 01974 self.pythonCfgCode += dumpPython(self.process,endpath) 01975 01976 # dump the schedule 01977 self.pythonCfgCode += "\n# Schedule definition\n" 01978 result = "process.schedule = cms.Schedule(" 01979 01980 # handling of the schedule 01981 self.process.schedule = cms.Schedule() 01982 for item in self.schedule: 01983 if not isinstance(item, cms.Schedule): 01984 self.process.schedule.append(item) 01985 else: 01986 self.process.schedule.extend(item) 01987 01988 if hasattr(self.process,"HLTSchedule"): 01989 beforeHLT = self.schedule[:self.schedule.index(self.process.HLTSchedule)] 01990 afterHLT = self.schedule[self.schedule.index(self.process.HLTSchedule)+1:] 01991 pathNames = ['process.'+p.label_() for p in beforeHLT] 01992 result += ','.join(pathNames)+')\n' 01993 result += 'process.schedule.extend(process.HLTSchedule)\n' 01994 pathNames = ['process.'+p.label_() for p in afterHLT] 01995 result += 'process.schedule.extend(['+','.join(pathNames)+'])\n' 01996 else: 01997 pathNames = ['process.'+p.label_() for p in self.schedule] 01998 result ='process.schedule = cms.Schedule('+','.join(pathNames)+')\n' 01999 02000 self.pythonCfgCode += result 02001 02002 #repacked version 02003 if self._options.isRepacked: 02004 self.pythonCfgCode +="\n" 02005 self.pythonCfgCode +="from Configuration.Applications.ConfigBuilder import MassReplaceInputTag\n" 02006 self.pythonCfgCode +="MassReplaceInputTag(process)\n" 02007 MassReplaceInputTag(self.process) 02008 02009 # special treatment in case of production filter sequence 2/2 02010 if self.productionFilterSequence: 02011 self.pythonCfgCode +='# filter all path with the production filter sequence\n' 02012 self.pythonCfgCode +='for path in process.paths:\n' 02013 if len(self.conditionalPaths): 02014 self.pythonCfgCode +='\tif not path in %s: continue\n'%str(self.conditionalPaths) 02015 self.pythonCfgCode +='\tgetattr(process,path)._seq = process.%s * getattr(process,path)._seq \n'%(self.productionFilterSequence,) 02016 pfs = getattr(self.process,self.productionFilterSequence) 02017 for path in self.process.paths: 02018 if not path in self.conditionalPaths: continue 02019 getattr(self.process,path)._seq = pfs * getattr(self.process,path)._seq 02020 02021 02022 # dump customise fragment 02023 self.pythonCfgCode += self.addCustomise() 02024 02025 # make the .io file 02026 02027 if self._options.io: 02028 #io=open(self._options.python_filename.replace('.py','.io'),'w') 02029 if not self._options.io.endswith('.io'): self._option.io+='.io' 02030 io=open(self._options.io,'w') 02031 ioJson={} 02032 if hasattr(self.process.source,"fileNames"): 02033 if len(self.process.source.fileNames.value()): 02034 ioJson['primary']=self.process.source.fileNames.value() 02035 if hasattr(self.process.source,"secondaryFileNames"): 02036 if len(self.process.source.secondaryFileNames.value()): 02037 ioJson['secondary']=self.process.source.secondaryFileNames.value() 02038 if self._options.pileup_input and self._options.pileup_input.startswith('dbs'): 02039 ioJson['pileup']=self._options.pileup_input[4:] 02040 for (o,om) in self.process.outputModules_().items(): 02041 ioJson[o]=om.fileName.value() 02042 ioJson['GT']=self.process.GlobalTag.globaltag.value() 02043 if self.productionFilterSequence: 02044 ioJson['filter']=self.productionFilterSequence 02045 import json 02046 io.write(json.dumps(ioJson)) 02047 return 02048
def ConfigBuilder::ConfigBuilder::prepare_ALCA | ( | self, | |
sequence = None , |
|||
workflow = 'full' |
|||
) |
Enrich the process with alca streams
Definition at line 1138 of file ConfigBuilder.py.
01139 : 01140 """ Enrich the process with alca streams """ 01141 alcaConfig=self.loadDefaultOrSpecifiedCFF(sequence,self.ALCADefaultCFF) 01142 sequence = sequence.split('.')[-1] 01143 01144 # decide which ALCA paths to use 01145 alcaList = sequence.split("+") 01146 maxLevel=0 01147 from Configuration.AlCa.autoAlca import autoAlca 01148 # support @X from autoAlca.py, and recursion support: i.e T0:@Mu+@EG+... 01149 self.expandMapping(alcaList,autoAlca) 01150 01151 for name in alcaConfig.__dict__: 01152 alcastream = getattr(alcaConfig,name) 01153 shortName = name.replace('ALCARECOStream','') 01154 if shortName in alcaList and isinstance(alcastream,cms.FilteredStream): 01155 output = self.addExtraStream(name,alcastream, workflow = workflow) 01156 if 'DQM' in alcaList: 01157 if not self._options.inlineEventContent and hasattr(self.process,name): 01158 self.executeAndRemember('process.' + name + '.outputCommands.append("keep *_MEtoEDMConverter_*_*")') 01159 else: 01160 output.outputCommands.append("keep *_MEtoEDMConverter_*_*") 01161 01162 #rename the HLT process name in the alca modules 01163 if self._options.hltProcess or 'HLT' in self.stepMap: 01164 if isinstance(alcastream.paths,tuple): 01165 for path in alcastream.paths: 01166 self.renameHLTprocessInSequence(path.label()) 01167 else: 01168 self.renameHLTprocessInSequence(alcastream.paths.label()) 01169 01170 for i in range(alcaList.count(shortName)): 01171 alcaList.remove(shortName) 01172 01173 # DQM needs a special handling 01174 elif name == 'pathALCARECODQM' and 'DQM' in alcaList: 01175 path = getattr(alcaConfig,name) 01176 self.schedule.append(path) 01177 alcaList.remove('DQM') 01178 01179 if isinstance(alcastream,cms.Path): 01180 #black list the alca path so that they do not appear in the cfg 01181 self.blacklist_paths.append(alcastream) 01182 01183 01184 if len(alcaList) != 0: 01185 available=[] 01186 for name in alcaConfig.__dict__: 01187 alcastream = getattr(alcaConfig,name) 01188 if isinstance(alcastream,cms.FilteredStream): 01189 available.append(name.replace('ALCARECOStream','')) 01190 print "The following alcas could not be found "+str(alcaList) 01191 print "available ",available 01192 #print "verify your configuration, ignoring for now" 01193 raise Exception("The following alcas could not be found "+str(alcaList))
def ConfigBuilder::ConfigBuilder::prepare_ALCAHARVEST | ( | self, | |
sequence = None |
|||
) |
Enrich the process with AlCaHarvesting step
Definition at line 1777 of file ConfigBuilder.py.
01778 : 01779 """ Enrich the process with AlCaHarvesting step """ 01780 harvestingConfig = self.loadAndRemember(self.ALCAHARVESTDefaultCFF) 01781 sequence=sequence.split(".")[-1] 01782 01783 # decide which AlcaHARVESTING paths to use 01784 harvestingList = sequence.split("+") 01785 for name in harvestingConfig.__dict__: 01786 harvestingstream = getattr(harvestingConfig,name) 01787 if name in harvestingList and isinstance(harvestingstream,cms.Path): 01788 self.schedule.append(harvestingstream) 01789 self.executeAndRemember("process.PoolDBOutputService.toPut.append(process.ALCAHARVEST" + name + "_dbOutput)") 01790 self.executeAndRemember("process.pclMetadataWriter.recordsToMap.append(process.ALCAHARVEST" + name + "_metadata)") 01791 harvestingList.remove(name) 01792 # append the common part at the end of the sequence 01793 lastStep = getattr(harvestingConfig,"ALCAHARVESTDQMSaveAndMetadataWriter") 01794 self.schedule.append(lastStep) 01795 01796 if len(harvestingList) != 0 and 'dummyHarvesting' not in harvestingList : 01797 print "The following harvesting could not be found : ", harvestingList 01798 raise Exception("The following harvesting could not be found : "+str(harvestingList)) 01799 01800
def ConfigBuilder::ConfigBuilder::prepare_ALCAOUTPUT | ( | self, | |
sequence = None |
|||
) |
Definition at line 1135 of file ConfigBuilder.py.
def ConfigBuilder::ConfigBuilder::prepare_ALCAPRODUCER | ( | self, | |
sequence = None |
|||
) |
Definition at line 1132 of file ConfigBuilder.py.
def ConfigBuilder::ConfigBuilder::prepare_CFWRITER | ( | self, | |
sequence = None |
|||
) |
Enrich the schedule with the crossing frame writer step
Definition at line 1333 of file ConfigBuilder.py.
def ConfigBuilder::ConfigBuilder::prepare_DATAMIX | ( | self, | |
sequence = None |
|||
) |
Enrich the schedule with the digitisation step
Definition at line 1339 of file ConfigBuilder.py.
def ConfigBuilder::ConfigBuilder::prepare_DIGI | ( | self, | |
sequence = None |
|||
) |
Enrich the schedule with the digitisation step
Definition at line 1320 of file ConfigBuilder.py.
01321 : 01322 """ Enrich the schedule with the digitisation step""" 01323 self.loadDefaultOrSpecifiedCFF(sequence,self.DIGIDefaultCFF) 01324 01325 if self._options.gflash==True: 01326 self.loadAndRemember("Configuration/StandardSequences/GFlashDIGI_cff") 01327 01328 if self._options.himix==True: 01329 self.loadAndRemember("SimGeneral/MixingModule/himixDIGI_cff") 01330 01331 self.scheduleSequence(sequence.split('.')[-1],'digitisation_step') 01332 return
def ConfigBuilder::ConfigBuilder::prepare_DIGI2RAW | ( | self, | |
sequence = None |
|||
) |
Definition at line 1345 of file ConfigBuilder.py.
def ConfigBuilder::ConfigBuilder::prepare_DQM | ( | self, | |
sequence = 'DQMOffline' |
|||
) |
Definition at line 1714 of file ConfigBuilder.py.
01715 : 01716 # this one needs replacement 01717 01718 self.loadDefaultOrSpecifiedCFF(sequence,self.DQMOFFLINEDefaultCFF) 01719 sequenceList=sequence.split('.')[-1].split('+') 01720 from DQMOffline.Configuration.autoDQM import autoDQM 01721 self.expandMapping(sequenceList,autoDQM,index=0) 01722 01723 if len(set(sequenceList))!=len(sequenceList): 01724 sequenceList=list(set(sequenceList)) 01725 print "Duplicate entries for DQM:, using",sequenceList 01726 pathName='dqmoffline_step' 01727 01728 for (i,sequence) in enumerate(sequenceList): 01729 if (i!=0): 01730 pathName='dqmoffline_%d_step'%(i) 01731 01732 if 'HLT' in self.stepMap.keys() or self._options.hltProcess: 01733 self.renameHLTprocessInSequence(sequence) 01734 01735 # if both HLT and DQM are run in the same process, schedule [HLT]DQM in an EndPath 01736 if 'HLT' in self.stepMap.keys(): 01737 # need to put [HLT]DQM in an EndPath, to access the HLT trigger results 01738 setattr(self.process,pathName, cms.EndPath( getattr(self.process, sequence ) ) ) 01739 else: 01740 # schedule DQM as a standard Path 01741 setattr(self.process,pathName, cms.Path( getattr(self.process, sequence) ) ) 01742 self.schedule.append(getattr(self.process,pathName)) 01743
def ConfigBuilder::ConfigBuilder::prepare_ENDJOB | ( | self, | |
sequence = 'endOfProcess' |
|||
) |
Definition at line 1801 of file ConfigBuilder.py.
def ConfigBuilder::ConfigBuilder::prepare_FASTSIM | ( | self, | |
sequence = "all" |
|||
) |
Enrich the schedule with fastsim
Definition at line 1810 of file ConfigBuilder.py.
01811 : 01812 """Enrich the schedule with fastsim""" 01813 self.loadAndRemember("FastSimulation/Configuration/FamosSequences_cff") 01814 01815 if sequence in ('all','allWithHLTFiltering',''): 01816 if not 'HLT' in self.stepMap.keys(): 01817 self.prepare_HLT(sequence=None) 01818 01819 self.executeAndRemember("process.famosSimHits.SimulateCalorimetry = True") 01820 self.executeAndRemember("process.famosSimHits.SimulateTracking = True") 01821 01822 self.executeAndRemember("process.simulation = cms.Sequence(process.simulationWithFamos)") 01823 self.executeAndRemember("process.HLTEndSequence = cms.Sequence(process.reconstructionWithFamos)") 01824 01825 # since we have HLT here, the process should be called HLT 01826 self._options.name = "HLT" 01827 01828 # if we don't want to filter after HLT but simulate everything regardless of what HLT tells, we have to add reconstruction explicitly 01829 if sequence == 'all' and not 'HLT' in self.stepMap.keys(): #(a) 01830 self.finalizeFastSimHLT() 01831 elif sequence == 'sim': 01832 self.executeAndRemember("process.famosSimHits.SimulateCalorimetry = True") 01833 self.executeAndRemember("process.famosSimHits.SimulateTracking = True") 01834 01835 self.executeAndRemember("process.simulation = cms.Sequence(process.simulationWithFamos)") 01836 01837 self.process.fastsim_step = cms.Path( getattr(self.process, "simulationWithFamos") ) 01838 self.schedule.append(self.process.fastsim_step) 01839 elif sequence == 'reco': 01840 self.executeAndRemember("process.mix.playback = True") 01841 self.executeAndRemember("process.reconstruction = cms.Sequence(process.reconstructionWithFamos)") 01842 01843 self.process.fastsim_step = cms.Path( getattr(self.process, "reconstructionWithFamos") ) 01844 self.schedule.append(self.process.fastsim_step) 01845 elif sequence == 'simExtended': 01846 self.executeAndRemember("process.famosSimHits.SimulateCalorimetry = True") 01847 self.executeAndRemember("process.famosSimHits.SimulateTracking = True") 01848 01849 self.executeAndRemember("process.simulation = cms.Sequence(process.simulationWithSomeReconstruction)") 01850 01851 self.process.fastsim_step = cms.Path( getattr(self.process, "simulationWithSomeReconstruction") ) 01852 self.schedule.append(self.process.fastsim_step) 01853 elif sequence == 'recoHighLevel': 01854 self.executeAndRemember("process.mix.playback = True") 01855 self.executeAndRemember("process.reconstruction = cms.Sequence(process.reconstructionHighLevel)") 01856 01857 self.process.fastsim_step = cms.Path( getattr(self.process, "reconstructionHighLevel") ) 01858 self.schedule.append(self.process.fastsim_step) 01859 elif sequence == 'famosWithEverything': 01860 self.process.fastsim_step = cms.Path( getattr(self.process, "famosWithEverything") ) 01861 self.schedule.append(self.process.fastsim_step) 01862 01863 # now the additional commands we need to make the config work 01864 self.executeAndRemember("process.VolumeBasedMagneticFieldESProducer.useParametrizedTrackerField = True") 01865 else: 01866 print "FastSim setting", sequence, "unknown." 01867 raise ValueError 01868 01869 if 'Flat' in self._options.beamspot: 01870 beamspotType = 'Flat' 01871 elif 'Gauss' in self._options.beamspot: 01872 beamspotType = 'Gaussian' 01873 else: 01874 beamspotType = 'BetaFunc' 01875 self.loadAndRemember('IOMC.EventVertexGenerators.VtxSmearedParameters_cfi') 01876 beamspotName = 'process.%sVtxSmearingParameters' %(self._options.beamspot) 01877 self.executeAndRemember(beamspotName+'.type = cms.string("%s")'%(beamspotType)) 01878 self.executeAndRemember('process.famosSimHits.VertexGenerator = '+beamspotName) 01879 if hasattr(self.process,'famosPileUp'): 01880 self.executeAndRemember('process.famosPileUp.VertexGenerator = '+beamspotName) 01881 01882
def ConfigBuilder::ConfigBuilder::prepare_FILTER | ( | self, | |
sequence = None |
|||
) |
Enrich the schedule with a user defined filter sequence
Definition at line 1471 of file ConfigBuilder.py.
01472 : 01473 ''' Enrich the schedule with a user defined filter sequence ''' 01474 ## load the relevant part 01475 filterConfig=self.load(sequence.split('.')[0]) 01476 filterSeq=sequence.split('.')[-1] 01477 ## print it in the configuration 01478 class PrintAllModules(object): 01479 def __init__(self): 01480 self.inliner='' 01481 pass 01482 def enter(self,visitee): 01483 try: 01484 label=visitee.label() 01485 ##needs to be in reverse order 01486 self.inliner=label+','+self.inliner 01487 except: 01488 pass 01489 def leave(self,v): pass 01490 01491 expander=PrintAllModules() 01492 getattr(self.process,filterSeq).visit( expander ) 01493 self._options.inlineObjets+=','+expander.inliner 01494 self._options.inlineObjets+=','+filterSeq 01495 01496 ## put the filtering path in the schedule 01497 self.scheduleSequence(filterSeq,'filtering_step') 01498 self.nextScheduleIsConditional=True 01499 ## put it before all the other paths 01500 self.productionFilterSequence = filterSeq 01501 01502 return
def ConfigBuilder::ConfigBuilder::prepare_GEN | ( | self, | |
sequence = None |
|||
) |
load the fragment of generator configuration
Definition at line 1210 of file ConfigBuilder.py.
01211 : 01212 """ load the fragment of generator configuration """ 01213 loadFailure=False 01214 #remove trailing .py 01215 #support old style .cfi by changing into something.cfi into something_cfi 01216 #remove python/ from the name 01217 loadFragment = self._options.evt_type.replace('.py','',).replace('.','_').replace('python/','') 01218 #standard location of fragments 01219 if not '/' in loadFragment: 01220 loadFragment='Configuration.Generator.'+loadFragment 01221 else: 01222 loadFragment=loadFragment.replace('/','.') 01223 try: 01224 print "Loading generator fragment from",loadFragment 01225 __import__(loadFragment) 01226 except: 01227 loadFailure=True 01228 #if self.process.source and self.process.source.type_()=='EmptySource': 01229 if not (self._options.filein or self._options.dbsquery): 01230 raise Exception("Neither gen fragment of input files provided: this is an inconsistent GEN step configuration") 01231 01232 if not loadFailure: 01233 generatorModule=sys.modules[loadFragment] 01234 genModules=generatorModule.__dict__ 01235 if self._options.hideGen: 01236 self.loadAndRemember(loadFragment) 01237 else: 01238 self.process.load(loadFragment) 01239 # expose the objects from that fragment to the configuration 01240 import FWCore.ParameterSet.Modules as cmstypes 01241 for name in genModules: 01242 theObject = getattr(generatorModule,name) 01243 if isinstance(theObject, cmstypes._Module): 01244 self._options.inlineObjets=name+','+self._options.inlineObjets 01245 elif isinstance(theObject, cms.Sequence) or isinstance(theObject, cmstypes.ESProducer): 01246 self._options.inlineObjets+=','+name 01247 01248 if sequence == self.GENDefaultSeq or sequence == 'pgen_genonly' or ( sequence == 'pgen_hi' and 'generator' in genModules): 01249 if 'ProductionFilterSequence' in genModules and ('generator' in genModules or 'hiSignal' in genModules): 01250 self.productionFilterSequence = 'ProductionFilterSequence' 01251 elif 'generator' in genModules: 01252 self.productionFilterSequence = 'generator' 01253 01254 """ Enrich the schedule with the rest of the generation step """ 01255 self.loadDefaultOrSpecifiedCFF(sequence,self.GENDefaultCFF) 01256 genSeqName=sequence.split('.')[-1] 01257 01258 if True: 01259 try: 01260 from Configuration.StandardSequences.VtxSmeared import VtxSmeared 01261 cffToBeLoaded=VtxSmeared[self._options.beamspot] 01262 if self._options.fast: 01263 cffToBeLoaded='IOMC.EventVertexGenerators.VtxSmearedParameters_cfi' 01264 self.loadAndRemember(cffToBeLoaded) 01265 except ImportError: 01266 raise Exception("VertexSmearing type or beamspot "+self._options.beamspot+" unknown.") 01267 01268 if self._options.scenario == 'HeavyIons' and self._options.himix: 01269 self.loadAndRemember("SimGeneral/MixingModule/himixGEN_cff") 01270 01271 self.process.generation_step = cms.Path( getattr(self.process,genSeqName) ) 01272 self.schedule.append(self.process.generation_step) 01273 01274 #register to the genstepfilter the name of the path (static right now, but might evolve) 01275 self.executeAndRemember('process.genstepfilter.triggerConditions=cms.vstring("generation_step")') 01276 01277 if 'reGEN' in self.stepMap: 01278 #stop here 01279 return 01280 01281 """ Enrich the schedule with the summary of the filter step """ 01282 #the gen filter in the endpath 01283 self.loadAndRemember("GeneratorInterface/Core/genFilterSummary_cff") 01284 self.scheduleSequenceAtEnd('genFilterSummary','genfiltersummary_step') 01285 return
def ConfigBuilder::ConfigBuilder::prepare_HARVESTING | ( | self, | |
sequence = None |
|||
) |
Enrich the process with harvesting step
Definition at line 1744 of file ConfigBuilder.py.
01745 : 01746 """ Enrich the process with harvesting step """ 01747 self.EDMtoMECFF='Configuration/StandardSequences/EDMtoME'+self._options.harvesting+'_cff' 01748 self.loadAndRemember(self.EDMtoMECFF) 01749 self.scheduleSequence('EDMtoME','edmtome_step') 01750 01751 harvestingConfig = self.loadDefaultOrSpecifiedCFF(sequence,self.HARVESTINGDefaultCFF) 01752 sequence = sequence.split('.')[-1] 01753 01754 # decide which HARVESTING paths to use 01755 harvestingList = sequence.split("+") 01756 from DQMOffline.Configuration.autoDQM import autoDQM 01757 self.expandMapping(harvestingList,autoDQM,index=1) 01758 01759 if len(set(harvestingList))!=len(harvestingList): 01760 harvestingList=list(set(harvestingList)) 01761 print "Duplicate entries for HARVESTING, using",harvestingList 01762 01763 for name in harvestingList: 01764 if not name in harvestingConfig.__dict__: 01765 print name,"is not a possible harvesting type. Available are",harvestingConfig.__dict__.keys() 01766 continue 01767 harvestingstream = getattr(harvestingConfig,name) 01768 if isinstance(harvestingstream,cms.Path): 01769 self.schedule.append(harvestingstream) 01770 self.blacklist_paths.append(harvestingstream) 01771 if isinstance(harvestingstream,cms.Sequence): 01772 setattr(self.process,name+"_step",cms.Path(harvestingstream)) 01773 self.schedule.append(getattr(self.process,name+"_step")) 01774 01775 self.scheduleSequence('DQMSaver','dqmsave_step') 01776 return
def ConfigBuilder::ConfigBuilder::prepare_HLT | ( | self, | |
sequence = None |
|||
) |
Enrich the schedule with the HLT simulation step
Definition at line 1380 of file ConfigBuilder.py.
01381 : 01382 """ Enrich the schedule with the HLT simulation step""" 01383 if not sequence: 01384 print "no specification of the hlt menu has been given, should never happen" 01385 raise Exception('no HLT sequence provided') 01386 01387 if '@' in sequence: 01388 # case where HLT:@something was provided 01389 from Configuration.HLT.autoHLT import autoHLT 01390 key = sequence[1:] 01391 if key in autoHLT: 01392 sequence = autoHLT[key] 01393 else: 01394 raise ValueError('no HLT mapping key "%s" found in autoHLT' % key) 01395 01396 if ',' in sequence: 01397 #case where HLT:something:something was provided 01398 self.executeAndRemember('import HLTrigger.Configuration.Utilities') 01399 optionsForHLT = {} 01400 if self._options.scenario == 'HeavyIons': 01401 optionsForHLT['type'] = 'HIon' 01402 else: 01403 optionsForHLT['type'] = 'GRun' 01404 optionsForHLTConfig = ', '.join('%s=%s' % (key, repr(val)) for (key, val) in optionsForHLT.iteritems()) 01405 self.executeAndRemember('process.loadHltConfiguration("%s",%s)'%(sequence.replace(',',':'),optionsForHLTConfig)) 01406 else: 01407 if self._options.fast: 01408 self.loadAndRemember('HLTrigger/Configuration/HLT_%s_Famos_cff' % sequence) 01409 else: 01410 self.loadAndRemember('HLTrigger/Configuration/HLT_%s_cff' % sequence) 01411 01412 if self._options.isMC: 01413 self._options.customisation_file+=",HLTrigger/Configuration/customizeHLTforMC.customizeHLTforMC" 01414 01415 if self._options.name != 'HLT': 01416 self.additionalCommands.append('from HLTrigger.Configuration.CustomConfigs import ProcessName') 01417 self.additionalCommands.append('process = ProcessName(process)') 01418 self.additionalCommands.append('') 01419 from HLTrigger.Configuration.CustomConfigs import ProcessName 01420 self.process = ProcessName(self.process) 01421 01422 self.schedule.append(self.process.HLTSchedule) 01423 [self.blacklist_paths.append(path) for path in self.process.HLTSchedule if isinstance(path,(cms.Path,cms.EndPath))] 01424 if (self._options.fast and 'HLT' in self.stepMap and 'FASTSIM' in self.stepMap): 01425 self.finalizeFastSimHLT() 01426 01427 #this is a fake, to be removed with fastim migration and HLT menu dump 01428 if self._options.fast and not 'FASTSIM' in self.stepMap: 01429 if not hasattr(self.process,'HLTEndSequence'): 01430 self.executeAndRemember("process.HLTEndSequence = cms.Sequence( process.dummyModule )") 01431 if not hasattr(self.process,'simulation'): 01432 self.executeAndRemember("process.simulation = cms.Sequence( process.dummyModule )") 01433
def ConfigBuilder::ConfigBuilder::prepare_L1 | ( | self, | |
sequence = None |
|||
) |
Enrich the schedule with the L1 simulation step
Definition at line 1355 of file ConfigBuilder.py.
01356 : 01357 """ Enrich the schedule with the L1 simulation step""" 01358 if not sequence: 01359 self.loadAndRemember(self.L1EMDefaultCFF) 01360 else: 01361 # let the L1 package decide for the scenarios available 01362 from L1Trigger.Configuration.ConfigBuilder import getConfigsForScenario 01363 listOfImports = getConfigsForScenario(sequence) 01364 for file in listOfImports: 01365 self.loadAndRemember(file) 01366 self.scheduleSequence('SimL1Emulator','L1simulation_step') 01367 return
def ConfigBuilder::ConfigBuilder::prepare_L1HwVal | ( | self, | |
sequence = 'L1HwVal' |
|||
) |
Enrich the schedule with L1 HW validation
Definition at line 1452 of file ConfigBuilder.py.
def ConfigBuilder::ConfigBuilder::prepare_L1Reco | ( | self, | |
sequence = "L1Reco" |
|||
) |
Enrich the schedule with L1 reconstruction
Definition at line 1459 of file ConfigBuilder.py.
def ConfigBuilder::ConfigBuilder::prepare_L1REPACK | ( | self, | |
sequence = None |
|||
) |
Enrich the schedule with the L1 simulation step, running the L1 emulator on data unpacked from the RAW collection, and repacking the result in a new RAW collection
Definition at line 1368 of file ConfigBuilder.py.
01369 : 01370 """ Enrich the schedule with the L1 simulation step, running the L1 emulator on data unpacked from the RAW collection, and repacking the result in a new RAW collection""" 01371 if sequence is not 'GT': 01372 print 'Running the full L1 emulator is not supported yet' 01373 raise Exception('unsupported feature') 01374 if sequence is 'GT': 01375 self.loadAndRemember('Configuration/StandardSequences/SimL1EmulatorRepack_GT_cff') 01376 if self._options.scenario == 'HeavyIons': 01377 self.renameInputTagsInSequence("SimL1Emulator","rawDataCollector","rawDataRepacker") 01378 self.scheduleSequence('SimL1Emulator','L1simulation_step') 01379
def ConfigBuilder::ConfigBuilder::prepare_L1TrackTrigger | ( | self, | |
sequence = "L1TrackTrigger" |
|||
) |
Enrich the schedule with L1 reconstruction
Definition at line 1465 of file ConfigBuilder.py.
def ConfigBuilder::ConfigBuilder::prepare_LHE | ( | self, | |
sequence = None |
|||
) |
Definition at line 1194 of file ConfigBuilder.py.
01195 : 01196 #load the fragment 01197 ##make it loadable 01198 loadFragment = self._options.evt_type.replace('.py','',).replace('.','_').replace('python/','').replace('/','.') 01199 print "Loading lhe fragment from",loadFragment 01200 __import__(loadFragment) 01201 self.process.load(loadFragment) 01202 ##inline the modules 01203 self._options.inlineObjets+=','+sequence 01204 01205 getattr(self.process,sequence).nEvents = int(self._options.number) 01206 01207 #schedule it 01208 self.process.lhe_step = cms.Path( getattr( self.process,sequence) ) 01209 self.schedule.append( self.process.lhe_step )
def ConfigBuilder::ConfigBuilder::prepare_POSTRECO | ( | self, | |
sequence = None |
|||
) |
Enrich the schedule with the postreco step
Definition at line 1559 of file ConfigBuilder.py.
def ConfigBuilder::ConfigBuilder::prepare_RAW2DIGI | ( | self, | |
sequence = "RawToDigi" |
|||
) |
Definition at line 1445 of file ConfigBuilder.py.
def ConfigBuilder::ConfigBuilder::prepare_RAW2RECO | ( | self, | |
sequence = None |
|||
) |
Definition at line 1434 of file ConfigBuilder.py.
def ConfigBuilder::ConfigBuilder::prepare_RECO | ( | self, | |
sequence = "reconstruction" |
|||
) |
Enrich the schedule with reconstruction
Definition at line 1503 of file ConfigBuilder.py.
def ConfigBuilder::ConfigBuilder::prepare_REPACK | ( | self, | |
sequence = None |
|||
) |
Definition at line 1350 of file ConfigBuilder.py.
def ConfigBuilder::ConfigBuilder::prepare_SIM | ( | self, | |
sequence = None |
|||
) |
Enrich the schedule with the simulation step
Definition at line 1286 of file ConfigBuilder.py.
01287 : 01288 """ Enrich the schedule with the simulation step""" 01289 self.loadDefaultOrSpecifiedCFF(sequence,self.SIMDefaultCFF) 01290 if not self._options.fast: 01291 if self._options.gflash==True: 01292 self.loadAndRemember("Configuration/StandardSequences/GFlashSIM_cff") 01293 01294 if self._options.magField=='0T': 01295 self.executeAndRemember("process.g4SimHits.UseMagneticField = cms.bool(False)") 01296 01297 if self._options.himix==True: 01298 if self._options.geometry in defaultOptions.geometryExtendedOptions: 01299 self.loadAndRemember("SimGeneral/MixingModule/himixSIMExtended_cff") 01300 else: 01301 self.loadAndRemember("SimGeneral/MixingModule/himixSIMIdeal_cff") 01302 else: 01303 self.executeAndRemember("process.famosSimHits.SimulateCalorimetry = True") 01304 self.executeAndRemember("process.famosSimHits.SimulateTracking = True") 01305 ## manipulate the beamspot 01306 if 'Flat' in self._options.beamspot: 01307 beamspotType = 'Flat' 01308 elif 'Gauss' in self._options.beamspot: 01309 beamspotType = 'Gaussian' 01310 else: 01311 beamspotType = 'BetaFunc' 01312 beamspotName = 'process.%sVtxSmearingParameters' %(self._options.beamspot) 01313 self.executeAndRemember(beamspotName+'.type = cms.string("%s")'%(beamspotType)) 01314 self.executeAndRemember('process.famosSimHits.VertexGenerator = '+beamspotName) 01315 if hasattr(self.process,'famosPileUp'): 01316 self.executeAndRemember('process.famosPileUp.VertexGenerator = '+beamspotName) 01317 01318 self.scheduleSequence(sequence.split('.')[-1],'simulation_step') 01319 return
def ConfigBuilder::ConfigBuilder::prepare_SKIM | ( | self, | |
sequence = "all" |
|||
) |
Enrich the schedule with skimming fragments
Definition at line 1509 of file ConfigBuilder.py.
01510 : 01511 ''' Enrich the schedule with skimming fragments''' 01512 skimConfig = self.loadDefaultOrSpecifiedCFF(sequence,self.SKIMDefaultCFF) 01513 sequence = sequence.split('.')[-1] 01514 01515 skimlist=sequence.split('+') 01516 ## support @Mu+DiJet+@Electron configuration via autoSkim.py 01517 from Configuration.Skimming.autoSkim import autoSkim 01518 self.expandMapping(skimlist,autoSkim) 01519 01520 #print "dictionnary for skims:",skimConfig.__dict__ 01521 for skim in skimConfig.__dict__: 01522 skimstream = getattr(skimConfig,skim) 01523 if isinstance(skimstream,cms.Path): 01524 #black list the alca path so that they do not appear in the cfg 01525 self.blacklist_paths.append(skimstream) 01526 if (not isinstance(skimstream,cms.FilteredStream)): 01527 continue 01528 shortname = skim.replace('SKIMStream','') 01529 if (sequence=="all"): 01530 self.addExtraStream(skim,skimstream) 01531 elif (shortname in skimlist): 01532 self.addExtraStream(skim,skimstream) 01533 #add a DQM eventcontent for this guy 01534 if self._options.datatier=='DQM': 01535 self.process.load(self.EVTCONTDefaultCFF) 01536 skimstreamDQM = cms.FilteredStream( 01537 responsible = skimstream.responsible, 01538 name = skimstream.name+'DQM', 01539 paths = skimstream.paths, 01540 selectEvents = skimstream.selectEvents, 01541 content = self._options.datatier+'EventContent', 01542 dataTier = cms.untracked.string(self._options.datatier) 01543 ) 01544 self.addExtraStream(skim+'DQM',skimstreamDQM) 01545 for i in range(skimlist.count(shortname)): 01546 skimlist.remove(shortname) 01547 01548 01549 01550 if (skimlist.__len__()!=0 and sequence!="all"): 01551 print 'WARNING, possible typo with SKIM:'+'+'.join(skimlist) 01552 raise Exception('WARNING, possible typo with SKIM:'+'+'.join(skimlist))
def ConfigBuilder::ConfigBuilder::prepare_USER | ( | self, | |
sequence = None |
|||
) |
Enrich the schedule with a user defined sequence
Definition at line 1553 of file ConfigBuilder.py.
def ConfigBuilder::ConfigBuilder::prepare_VALIDATION | ( | self, | |
sequence = 'validation' |
|||
) |
Definition at line 1566 of file ConfigBuilder.py.
01567 : 01568 self.loadDefaultOrSpecifiedCFF(sequence,self.VALIDATIONDefaultCFF) 01569 #in case VALIDATION:something:somethingelse -> something,somethingelse 01570 sequence=sequence.split('.')[-1] 01571 if sequence.find(',')!=-1: 01572 prevalSeqName=sequence.split(',')[0] 01573 valSeqName=sequence.split(',')[1] 01574 else: 01575 postfix='' 01576 if sequence: 01577 postfix='_'+sequence 01578 prevalSeqName='prevalidation'+postfix 01579 valSeqName='validation'+postfix 01580 if not hasattr(self.process,valSeqName): 01581 prevalSeqName='' 01582 valSeqName=sequence 01583 01584 if not 'DIGI' in self.stepMap and not self._options.fast and not valSeqName.startswith('genvalid'): 01585 if self._options.restoreRNDSeeds==False and not self._options.restoreRNDSeeds==True: 01586 self._options.restoreRNDSeeds=True 01587 01588 #rename the HLT process in validation steps 01589 if ('HLT' in self.stepMap and not self._options.fast) or self._options.hltProcess: 01590 self.renameHLTprocessInSequence(valSeqName) 01591 if prevalSeqName: 01592 self.renameHLTprocessInSequence(prevalSeqName) 01593 01594 if prevalSeqName: 01595 self.process.prevalidation_step = cms.Path( getattr(self.process, prevalSeqName ) ) 01596 self.schedule.append(self.process.prevalidation_step) 01597 01598 self.process.validation_step = cms.EndPath( getattr(self.process,valSeqName ) ) 01599 self.schedule.append(self.process.validation_step) 01600 01601 if not 'DIGI' in self.stepMap and not self._options.fast: 01602 self.executeAndRemember("process.mix.playback = True") 01603 self.executeAndRemember("process.mix.digitizers = cms.PSet()") 01604 self.executeAndRemember("for a in process.aliases: delattr(process, a)") 01605 01606 if hasattr(self.process,"genstepfilter") and len(self.process.genstepfilter.triggerConditions): 01607 #will get in the schedule, smoothly 01608 self.process.validation_step._seq = self.process.genstepfilter * self.process.validation_step._seq 01609 01610 return 01611
def ConfigBuilder::ConfigBuilder::profileOptions | ( | self | ) |
addIgProfService Function to add the igprof profile service so that you can dump in the middle of the run.
Definition at line 222 of file ConfigBuilder.py.
00223 : 00224 """ 00225 addIgProfService 00226 Function to add the igprof profile service so that you can dump in the middle 00227 of the run. 00228 """ 00229 profileOpts = self._options.profile.split(':') 00230 profilerStart = 1 00231 profilerInterval = 100 00232 profilerFormat = None 00233 profilerJobFormat = None 00234 00235 if len(profileOpts): 00236 #type, given as first argument is unused here 00237 profileOpts.pop(0) 00238 if len(profileOpts): 00239 startEvent = profileOpts.pop(0) 00240 if not startEvent.isdigit(): 00241 raise Exception("%s is not a number" % startEvent) 00242 profilerStart = int(startEvent) 00243 if len(profileOpts): 00244 eventInterval = profileOpts.pop(0) 00245 if not eventInterval.isdigit(): 00246 raise Exception("%s is not a number" % eventInterval) 00247 profilerInterval = int(eventInterval) 00248 if len(profileOpts): 00249 profilerFormat = profileOpts.pop(0) 00250 00251 00252 if not profilerFormat: 00253 profilerFormat = "%s___%s___%s___%s___%s___%s___%%I.gz" % (self._options.evt_type.replace("_cfi", ""), 00254 self._options.step, 00255 self._options.pileup, 00256 self._options.conditions, 00257 self._options.datatier, 00258 self._options.profileTypeLabel) 00259 if not profilerJobFormat and profilerFormat.endswith(".gz"): 00260 profilerJobFormat = profilerFormat.replace(".gz", "_EndOfJob.gz") 00261 elif not profilerJobFormat: 00262 profilerJobFormat = profilerFormat + "_EndOfJob.gz" 00263 00264 return (profilerStart,profilerInterval,profilerFormat,profilerJobFormat)
def ConfigBuilder::ConfigBuilder::renameHLTprocessInSequence | ( | self, | |
sequence, | |||
proc = None , |
|||
HLTprocess = 'HLT' |
|||
) |
Definition at line 1681 of file ConfigBuilder.py.
01682 : 01683 if self._options.hltProcess: 01684 proc=self._options.hltProcess 01685 else: 01686 proc=self.process.name_() 01687 if proc==HLTprocess: return 01688 # look up all module in dqm sequence 01689 print "replacing %s process name - sequence %s will use '%s'" % (HLTprocess,sequence, proc) 01690 getattr(self.process,sequence).visit(ConfigBuilder.MassSearchReplaceProcessNameVisitor(HLTprocess,proc,whitelist = ("subSystemFolder",))) 01691 if 'from Configuration.Applications.ConfigBuilder import ConfigBuilder' not in self.additionalCommands: 01692 self.additionalCommands.append('from Configuration.Applications.ConfigBuilder import ConfigBuilder') 01693 self.additionalCommands.append('process.%s.visit(ConfigBuilder.MassSearchReplaceProcessNameVisitor("%s", "%s", whitelist = ("subSystemFolder",)))'% (sequence,HLTprocess, proc)) 01694
def ConfigBuilder::ConfigBuilder::renameInputTagsInSequence | ( | self, | |
sequence, | |||
oldT = "rawDataCollector" , |
|||
newT = "rawDataRepacker" |
|||
) |
Definition at line 1671 of file ConfigBuilder.py.
01672 : 01673 print "Replacing all InputTag %s => %s"%(oldT,newT) 01674 from PhysicsTools.PatAlgos.tools.helpers import massSearchReplaceAnyInputTag 01675 massSearchReplaceAnyInputTag(getattr(self.process,sequence),oldT,newT) 01676 loadMe='from PhysicsTools.PatAlgos.tools.helpers import massSearchReplaceAnyInputTag' 01677 if not loadMe in self.additionalCommands: 01678 self.additionalCommands.append(loadMe) 01679 self.additionalCommands.append('massSearchReplaceAnyInputTag(process.%s,"%s","%s",False)'%(sequence,oldT,newT))
def ConfigBuilder::ConfigBuilder::scheduleSequence | ( | self, | |
seq, | |||
prefix, | |||
what = 'Path' |
|||
) |
Definition at line 1103 of file ConfigBuilder.py.
01104 : 01105 if '*' in seq: 01106 #create only one path with all sequences in it 01107 for i,s in enumerate(seq.split('*')): 01108 if i==0: 01109 setattr(self.process,prefix,getattr(cms,what)( getattr(self.process, s) )) 01110 else: 01111 p=getattr(self.process,prefix) 01112 p+=getattr(self.process, s) 01113 self.schedule.append(getattr(self.process,prefix)) 01114 return 01115 else: 01116 #create as many path as many sequences 01117 if not '+' in seq: 01118 if self.nextScheduleIsConditional: 01119 self.conditionalPaths.append(prefix) 01120 setattr(self.process,prefix,getattr(cms,what)( getattr(self.process, seq) )) 01121 self.schedule.append(getattr(self.process,prefix)) 01122 else: 01123 for i,s in enumerate(seq.split('+')): 01124 sn=prefix+'%d'%(i) 01125 setattr(self.process,sn,getattr(cms,what)( getattr(self.process, s) )) 01126 self.schedule.append(getattr(self.process,sn)) 01127 return
def ConfigBuilder::ConfigBuilder::scheduleSequenceAtEnd | ( | self, | |
seq, | |||
prefix | |||
) |
Definition at line 1128 of file ConfigBuilder.py.
ConfigBuilder::ConfigBuilder::_options [private] |
Definition at line 158 of file ConfigBuilder.py.
Definition at line 158 of file ConfigBuilder.py.
Definition at line 158 of file ConfigBuilder.py.
Definition at line 158 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 158 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 158 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 1744 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 158 of file ConfigBuilder.py.
load the relevant part
needs to be in reverse order
print it in the configuration
Definition at line 1473 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
put the filtering path in the schedule
Definition at line 158 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 158 of file ConfigBuilder.py.
put it before all the other paths
Definition at line 158 of file ConfigBuilder.py.
Definition at line 1894 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 158 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 158 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 795 of file ConfigBuilder.py.
Definition at line 158 of file ConfigBuilder.py.
Definition at line 158 of file ConfigBuilder.py.