CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions | Variables
autoAlca Namespace Reference

Functions

def buildList
 

Variables

dictionary AlCaRecoMatrix
 
dictionary autoAlca
 

Function Documentation

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

References split.

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

Variable Documentation

dictionary autoAlca.AlCaRecoMatrix

Definition at line 1 of file autoAlca.py.

dictionary autoAlca.autoAlca
Initial value:
1 = { 'allForPrompt' : buildList(['Charmonium', 'Commissioning', 'DoubleEG', 'DoubleElectron', 'DoubleMu', 'DoubleMuParked', 'DoubleMuon', 'HLTPhysics', 'HcalNZS', 'JetHT', 'MET', 'MinimumBias', 'MuOnia', 'MuOniaParked', 'SingleElectron', 'SingleMu', 'SingleMuon', 'SinglePhoton', 'ZeroBias'], AlCaRecoMatrix),
2  'allForExpress' : buildList(['StreamExpress'], AlCaRecoMatrix),
3  'allForExpressHI' : buildList(['StreamExpressHI'], AlCaRecoMatrix),
4  'allForPromptCosmics' : buildList(['Cosmics'], AlCaRecoMatrix),
5  'allForExpressCosmics' : buildList(['ExpressCosmics'], AlCaRecoMatrix) }
def buildList
Definition: autoAlca.py:33

Definition at line 49 of file autoAlca.py.