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

References split.

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

Definition at line 50 of file autoAlca.py.