CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
selectionParser.selectionParser Class Reference
Inheritance diagram for selectionParser.selectionParser:

Public Member Functions

def __init__
 
def numls
 
def numruns
 
def runs
 
def runsandls
 
def runsandlsStr
 

Private Attributes

 __result
 
 __strresult
 

Detailed Description

Definition at line 2 of file selectionParser.py.

Constructor & Destructor Documentation

def selectionParser.selectionParser.__init__ (   self,
  selectStr 
)

Definition at line 3 of file selectionParser.py.

3 
4  def __init__(self,selectStr):
5  self.__result={}
6  self.__strresult={}
7  strresult=json.loads(selectStr)
8  for k,v in strresult.items():
9  expandedvalues=[]
10  for w in v:
11  if len(w)==0:
12  self.__result[int(k)]=expandedvalues
13  self.__strresult[k]=[]
14  continue
15  ###weed out [10]-like stuff just in case they exist
16  elif len(w)==1:
17  expandedvalues.append(w[0])
18  ##weed out [10,10]-like stuff
19  elif len(w)==2 and w[0]==w[1]:
20  expandedvalues.append(w[0])
21  else:
22  for i in range(w[0],w[1]+1):
23  expandedvalues.append(i)
24  self.__result[int(k)]=expandedvalues
self.__strresult[k]=[str(x) for x in expandedvalues]

Member Function Documentation

def selectionParser.selectionParser.numls (   self,
  run 
)

Definition at line 37 of file selectionParser.py.

References selectionParser.selectionParser.__result, pileupParser.pileupParser.__result, csvSelectionParser.csvSelectionParser.__result, csvLumibyLSParser.csvLumibyLSParser.__result, EgammaHLTValidationUtils.EgammaDQMModuleMaker.__result, SequenceTypes._CopyAndExcludeSequenceVisitorOld.__result, and SequenceTypes._MutatingSequenceVisitor.__result.

37 
38  def numls(self,run):
return len(self.__result[run])
def selectionParser.selectionParser.numruns (   self)

Definition at line 35 of file selectionParser.py.

35 
36  def numruns(self):
return len(self.__result.keys())
def selectionParser.selectionParser.runs (   self)

Definition at line 25 of file selectionParser.py.

25 
26  def runs(self):
return self.__result.keys()
def selectionParser.selectionParser.runsandls (   self)
return expanded {run:lslist}

Definition at line 27 of file selectionParser.py.

References selectionParser.selectionParser.__result, pileupParser.pileupParser.__result, csvSelectionParser.csvSelectionParser.__result, csvLumibyLSParser.csvLumibyLSParser.__result, EgammaHLTValidationUtils.EgammaDQMModuleMaker.__result, SequenceTypes._CopyAndExcludeSequenceVisitorOld.__result, and SequenceTypes._MutatingSequenceVisitor.__result.

27 
28  def runsandls(self):
29  '''return expanded {run:lslist}
30  '''
return self.__result
def selectionParser.selectionParser.runsandlsStr (   self)
return expanded {'run':lslist}

Definition at line 31 of file selectionParser.py.

References selectionParser.selectionParser.__strresult, pileupParser.pileupParser.__strresult, csvSelectionParser.csvSelectionParser.__strresult, and csvLumibyLSParser.csvLumibyLSParser.__strresult.

31 
32  def runsandlsStr(self):
33  '''return expanded {'run':lslist}
34  '''
return self.__strresult

Member Data Documentation

selectionParser.selectionParser.__result
private

Definition at line 4 of file selectionParser.py.

Referenced by selectionParser.selectionParser.numls(), and selectionParser.selectionParser.runsandls().

selectionParser.selectionParser.__strresult
private

Definition at line 5 of file selectionParser.py.

Referenced by selectionParser.selectionParser.runsandlsStr().