CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
selectionParser.selectionParser Class Reference
Inheritance diagram for selectionParser.selectionParser:

Public Member Functions

def __init__ (self, selectStr)
 
def numls (self, run)
 
def numruns (self)
 
def runs (self)
 
def runsandls (self)
 
def runsandlsStr (self)
 

Private Attributes

 __result
 
 __strresult
 

Detailed Description

Definition at line 3 of file selectionParser.py.

Constructor & Destructor Documentation

def selectionParser.selectionParser.__init__ (   self,
  selectStr 
)

Definition at line 4 of file selectionParser.py.

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
25  self.__strresult[k]=[str(x) for x in expandedvalues]
#define str(s)
def __init__(self, selectStr)

Member Function Documentation

def selectionParser.selectionParser.numls (   self,
  run 
)
def selectionParser.selectionParser.numruns (   self)
def selectionParser.selectionParser.runs (   self)

Definition at line 26 of file selectionParser.py.

26  def runs(self):
27  return self.__result.keys()
def selectionParser.selectionParser.runsandls (   self)
def selectionParser.selectionParser.runsandlsStr (   self)

Member Data Documentation

selectionParser.selectionParser.__result
private
selectionParser.selectionParser.__strresult
private

Definition at line 6 of file selectionParser.py.

Referenced by selectionParser.selectionParser.runsandlsStr().