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
csvSelectionParser.csvSelectionParser Class Reference
Inheritance diagram for csvSelectionParser.csvSelectionParser:

Public Member Functions

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

Private Attributes

 __filename
 
 __result
 
 __strresult
 

Detailed Description

Definition at line 8 of file csvSelectionParser.py.

Constructor & Destructor Documentation

def csvSelectionParser.csvSelectionParser.__init__ (   self,
  filename 
)

Definition at line 9 of file csvSelectionParser.py.

9 
10  def __init__(self,filename):
11  self.__result={}
12  self.__strresult={}
13  self.__filename=filename
14  csvReader=csv.reader(open(filename),delimiter=',')
15  for row in csvReader:
16  field0=str(row[0]).strip()
17  try:
18  field1=str(row[1]).strip()
19  except Exception as e:
20  field1='1' # for list with run number only, fake lsnum
21  if not is_intstr(field0) or not is_intstr(field1):
22  continue
23  runnumber=int(field0)
24  lsnumber=int(field1)
25  if runnumber in self.__result:
26  self.__result[runnumber].append(lsnumber)
27  else:
28  self.__result[runnumber]=[lsnumber]
29  for k,lsvalues in self.__result.items():
30  lsvalues.sort()
self.__strresult[k]=[str(x) for x in lsvalues]
boost::dynamic_bitset append(const boost::dynamic_bitset<> &bs1, const boost::dynamic_bitset<> &bs2)
this method takes two bitsets bs1 and bs2 and returns result of bs2 appended to the end of bs1 ...

Member Function Documentation

def csvSelectionParser.csvSelectionParser.numls (   self,
  run 
)

Definition at line 43 of file csvSelectionParser.py.

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

43 
44  def numls(self,run):
45  return len(self.__result[run])
def csvSelectionParser.csvSelectionParser.numruns (   self)

Definition at line 41 of file csvSelectionParser.py.

41 
42  def numruns(self):
return len(self.__result.keys())
def csvSelectionParser.csvSelectionParser.runs (   self)

Definition at line 31 of file csvSelectionParser.py.

Referenced by inputFilesetParser.inputFilesetParser.selectedRunsWithoutresult(), and inputFilesetParser.inputFilesetParser.selectedRunsWithresult().

31 
32  def runs(self):
return self.__result.keys()
def csvSelectionParser.csvSelectionParser.runsandls (   self)
return {run:lslist}

Definition at line 33 of file csvSelectionParser.py.

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

33 
34  def runsandls(self):
35  '''return {run:lslist}
36  '''
return self.__result
def csvSelectionParser.csvSelectionParser.runsandlsStr (   self)
return {'run':lslist}

Definition at line 37 of file csvSelectionParser.py.

References csvSelectionParser.csvSelectionParser.__strresult, and csvLumibyLSParser.csvLumibyLSParser.__strresult.

37 
38  def runsandlsStr(self):
39  '''return {'run':lslist}
40  '''
return self.__strresult

Member Data Documentation

csvSelectionParser.csvSelectionParser.__filename
private

Definition at line 12 of file csvSelectionParser.py.

csvSelectionParser.csvSelectionParser.__result
private

Definition at line 10 of file csvSelectionParser.py.

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

csvSelectionParser.csvSelectionParser.__strresult
private

Definition at line 11 of file csvSelectionParser.py.

Referenced by selectionParser.selectionParser.runsandlsStr(), csvSelectionParser.csvSelectionParser.runsandlsStr(), and pileupParser.pileupParser.runsandlsStr().