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

Public Member Functions

def __init__
 
def close
 
def writeRow
 
def writeRows
 

Private Attributes

 __file
 
 __filename
 
 __writer
 

Detailed Description

Definition at line 2 of file csvReporter.py.

Constructor & Destructor Documentation

def csvReporter.csvReporter.__init__ (   self,
  filename,
  dialect = 'excel',
  delimiter = ',
  quoting = csv.QUOTE_NONNUMERIC 
)
input params:
filename : output csv path/name

Definition at line 3 of file csvReporter.py.

3 
4  def __init__(self,filename,dialect='excel',delimiter=',',quoting=csv.QUOTE_NONNUMERIC):
5  """input params:
6  filename : output csv path/name
7  """
8  self.__filename=filename
9  self.__file=open(self.__filename,'wb')
self.__writer=csv.writer(self.__file)

Member Function Documentation

def csvReporter.csvReporter.close (   self)

Definition at line 20 of file csvReporter.py.

Referenced by lumiQTWidget.ApplicationWindow.fileQuit(), esMonitoring.AsyncLineReaderMixin.handle_close(), esMonitoring.FDJsonServer.handle_close(), Vispa.Gui.BoxContentDialog.BoxContentDialog.keyPressEvent(), and Vispa.Gui.FindDialog.FindDialog.keyPressEvent().

20 
21  def close(self):
22  self.__file.close()
def csvReporter.csvReporter.writeRow (   self,
  row 
)

Definition at line 10 of file csvReporter.py.

References csvReporter.csvReporter.__filename, csvLumibyLSParser.csvLumibyLSParser.__filename, and dataset.Dataset.__filename.

10 
11  def writeRow(self,row):
12  try:
13  self.__writer.writerow(row)
14  except csv.Error as e:
sys.exit('file %s: %s'%(self.__filename,e))
def csvReporter.csvReporter.writeRows (   self,
  rows 
)

Definition at line 15 of file csvReporter.py.

References csvReporter.csvReporter.__filename, csvLumibyLSParser.csvLumibyLSParser.__filename, and dataset.Dataset.__filename.

15 
16  def writeRows(self,rows):
17  try:
18  self.__writer.writerows(rows)
19  except csv.Error as e:
sys.exit('file %s: %s'%(self.__filename,e))

Member Data Documentation

csvReporter.csvReporter.__file
private

Definition at line 8 of file csvReporter.py.

csvReporter.csvReporter.__filename
private

Definition at line 7 of file csvReporter.py.

Referenced by csvReporter.csvReporter.writeRow(), and csvReporter.csvReporter.writeRows().

csvReporter.csvReporter.__writer
private

Definition at line 9 of file csvReporter.py.