Public Member Functions | |
def | __init__ |
def | numls |
def | numruns |
def | runs |
def | runsandls |
def | runsandlsStr |
Private Attributes | |
__filename | |
__result | |
__strresult |
Definition at line 8 of file csvSelectionParser.py.
def csvSelectionParser::csvSelectionParser::__init__ | ( | self, | |
filename | |||
) |
Definition at line 9 of file csvSelectionParser.py.
00010 : 00011 self.__result={} 00012 self.__strresult={} 00013 self.__filename=filename 00014 csvReader=csv.reader(open(filename),delimiter=',') 00015 for row in csvReader: 00016 field0=str(row[0]).strip() 00017 try: 00018 field1=str(row[1]).strip() 00019 except Exception,e: 00020 field1='1' # for list with run number only, fake lsnum 00021 if not is_intstr(field0) or not is_intstr(field1): 00022 continue 00023 runnumber=int(field0) 00024 lsnumber=int(field1) 00025 if self.__result.has_key(runnumber): 00026 self.__result[runnumber].append(lsnumber) 00027 else: 00028 self.__result[runnumber]=[lsnumber] 00029 for k,lsvalues in self.__result.items(): 00030 lsvalues.sort() self.__strresult[k]=[str(x) for x in lsvalues]
def csvSelectionParser::csvSelectionParser::numls | ( | self, | |
run | |||
) |
Definition at line 43 of file csvSelectionParser.py.
def csvSelectionParser::csvSelectionParser::numruns | ( | self | ) |
Definition at line 41 of file csvSelectionParser.py.
def csvSelectionParser::csvSelectionParser::runs | ( | self | ) |
Definition at line 31 of file csvSelectionParser.py.
def csvSelectionParser::csvSelectionParser::runsandls | ( | self | ) |
return {run:lslist}
Definition at line 33 of file csvSelectionParser.py.
def csvSelectionParser::csvSelectionParser::runsandlsStr | ( | self | ) |
return {'run':lslist}
Definition at line 37 of file csvSelectionParser.py.
Definition at line 9 of file csvSelectionParser.py.
Definition at line 9 of file csvSelectionParser.py.
Definition at line 9 of file csvSelectionParser.py.