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 2 of file selectionParser.py.

Constructor & Destructor Documentation

def selectionParser.selectionParser.__init__ (   self,
  selectStr 
)

Definition at line 3 of file selectionParser.py.

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

Member Function Documentation

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

Definition at line 35 of file selectionParser.py.

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

Definition at line 25 of file selectionParser.py.

25  def runs(self):
26  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 5 of file selectionParser.py.

Referenced by selectionParser.selectionParser.runsandlsStr().