CMS 3D CMS Logo

Functions
autoAlca Namespace Reference

Functions

def buildList (pdList, matrix)
 

Function Documentation

◆ buildList()

def autoAlca.buildList (   pdList,
  matrix 
)
Takes a list of primary datasets (PDs) and the AlCaRecoMatrix (a dictinary) and returns a string with all the AlCaRecos for the selected PDs separated by the '+' character without duplicates.

Definition at line 37 of file autoAlca.py.

References submitPVValidationJobs.split().

37 def buildList(pdList, matrix):
38  """Takes a list of primary datasets (PDs) and the AlCaRecoMatrix (a dictinary) and returns a string with all the AlCaRecos for the selected PDs separated by the '+' character without duplicates."""
39  alCaRecoList = []
40  for pd in pdList:
41  alCaRecoList.extend(matrix[pd].split("+"))
42  # remove duplicates converting to a set
43  alCaRecoList = set(alCaRecoList)
44  stringList = ''
45  for alCaReco in alCaRecoList:
46  if stringList == '':
47  stringList += alCaReco
48  else:
49  stringList += '+'+alCaReco
50  return stringList
51 
52 # Update the lists anytime a new PD is added to the matrix
def buildList(pdList, matrix)
Definition: autoAlca.py:37