CMS 3D CMS Logo

Public Member Functions | Private Attributes

selectionParser::selectionParser Class Reference

List of all members.

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.

00004                                 :
00005         self.__result={}
00006         self.__strresult={}
00007         strresult=json.loads(selectStr)
00008         for k,v in strresult.items():
00009             expandedvalues=[]
00010             for w in v:
00011                 if len(w)==0:
00012                     self.__result[int(k)]=expandedvalues
00013                     self.__strresult[k]=[]
00014                     continue
00015             ###weed out [10]-like stuff just in case they exist
00016                 elif len(w)==1:
00017                     expandedvalues.append(w[0])
00018             ##weed out [10,10]-like stuff
00019                 elif len(w)==2 and w[0]==w[1]:
00020                     expandedvalues.append(w[0])
00021                 else:
00022                     for i in range(w[0],w[1]+1):
00023                         expandedvalues.append(i)
00024             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.

00038                        :
        return len(self.__result[run])
def selectionParser::selectionParser::numruns (   self)

Definition at line 35 of file selectionParser.py.

00036                      :
        return len(self.__result.keys())
def selectionParser::selectionParser::runs (   self)

Definition at line 25 of file selectionParser.py.

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

Definition at line 27 of file selectionParser.py.

00028                        :
00029         '''return expanded {run:lslist}
00030         '''
        return self.__result
def selectionParser::selectionParser::runsandlsStr (   self)
return expanded {'run':lslist}

Definition at line 31 of file selectionParser.py.

00032                           :
00033         '''return expanded {'run':lslist}
00034         '''
        return self.__strresult

Member Data Documentation

Definition at line 3 of file selectionParser.py.

Definition at line 3 of file selectionParser.py.