CMS 3D CMS Logo

Functions | Variables
autoNANO Namespace Reference

Functions

def expandNanoMapping (seqList, mapping, key)
 

Variables

 autoNANO
 

Function Documentation

◆ expandNanoMapping()

def autoNANO.expandNanoMapping (   seqList,
  mapping,
  key 
)

Definition at line 1 of file autoNANO.py.

References submitPVValidationJobs.split().

Referenced by ConfigBuilder.ConfigBuilder.prepare_NANO().

1 def expandNanoMapping(seqList, mapping, key):
2  maxLevel=30
3  level=0
4  while '@' in repr(seqList) and level<maxLevel:
5  level+=1
6  for specifiedCommand in seqList:
7  if specifiedCommand.startswith('@'):
8  location=specifiedCommand[1:]
9  if not location in mapping:
10  raise Exception("Impossible to map "+location+" from "+repr(mapping))
11  mappedTo=mapping[location]
12  # no mapping for specified key
13  # NOTE: mising key of key=None is interpreted differently than empty string:
14  # - An empty string recalls the default for the given key
15  # - None is interpreted as "ignore this"
16  insertAt=seqList.index(specifiedCommand)
17  seqList.remove(specifiedCommand)
18  if key in mappedTo and mappedTo[key] is not None:
19  allToInsert=mappedTo[key].split('+')
20  for offset,toInsert in enumerate(allToInsert):
21  seqList.insert(insertAt+offset,toInsert)
22  break;
23  if level==maxLevel:
24  raise Exception("Could not fully expand "+repr(seqList)+" from "+repr(mapping))
25 
26 
def expandNanoMapping(seqList, mapping, key)
Definition: autoNANO.py:1

Variable Documentation

◆ autoNANO

autoNANO.autoNANO

Definition at line 27 of file autoNANO.py.