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

105 def buildList(pdList, matrix):
106  """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."""
107  alCaRecoList = []
108  for pd in pdList:
109  alCaRecoList.extend(matrix[pd].split("+"))
110  # remove duplicates converting to a set
111  alCaRecoList = set(alCaRecoList)
112  stringList = ''
113  for alCaReco in alCaRecoList:
114  if stringList == '':
115  stringList += alCaReco
116  else:
117  stringList += '+'+alCaReco
118  return stringList
119 
120 # Update the lists anytime a new PD is added to the matrix

References submitPVValidationJobs.split().

submitPVValidationJobs.split
def split(sequence, size)
Definition: submitPVValidationJobs.py:352
autoAlca.buildList
def buildList(pdList, matrix)
Definition: autoAlca.py:105