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 30 of file autoAlca.py.

References submitPVValidationJobs.split().

30 def buildList(pdList, matrix):
31  """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."""
32  alCaRecoList = []
33  for pd in pdList:
34  alCaRecoList.extend(matrix[pd].split("+"))
35  # remove duplicates converting to a set
36  alCaRecoList = set(alCaRecoList)
37  stringList = ''
38  for alCaReco in alCaRecoList:
39  if stringList == '':
40  stringList += alCaReco
41  else:
42  stringList += '+'+alCaReco
43  return stringList
44 
45 # Update the lists anytime a new PD is added to the matrix
def buildList(pdList, matrix)
Definition: autoAlca.py:30