uk.ac.liv.auction.stats
Class DataWriterReport

java.lang.Object
  extended byuk.ac.liv.auction.stats.AbstractAuctionReport
      extended byuk.ac.liv.auction.stats.DataWriterReport
All Implemented Interfaces:
AuctionEventListener, AuctionReport, Parameterizable
Direct Known Subclasses:
CSVReport, MeanValueDataWriterReport

public class DataWriterReport
extends AbstractAuctionReport

This class writes auction data to the specified DataWriter objects, and thus can be used to log data to eg, CSV files, a database backend, etc.

Version:
$Revision: 1.2 $
Author:
Steve Phelps

Field Summary
protected  DataWriter askLog
          output for ask data as time series.
protected  DataWriter askQuoteLog
          output for the ask component of market quotes as time series.
protected  RoundRobinAuction auction
          The auction we are keeping statistics on.
protected  DataWriter bidLog
          output for bid data as time series.
protected  DataWriter bidQuoteLog
          output for the bid component of market quotes as time series.
protected  DataWriter transPriceLog
           
 
Constructor Summary
DataWriterReport()
           
DataWriterReport(DataWriter askQuoteLog, DataWriter bidQuoteLog, DataWriter bidLog, DataWriter askLog, DataWriter transPriceLog)
           
 
Method Summary
 void dataUpdated()
           
 void eventOccurred(AuctionEvent event)
           
 java.util.Map getVariables()
          Returns a Map of all of the variables that are produced in the report.
 void produceUserOutput()
          Produce the final report for the user.
 void setAuction(RoundRobinAuction auction)
          Specify the auction to be used when generating the report.
 void setup(ec.util.ParameterDatabase parameters, ec.util.Parameter base)
          Initialise this object from a parameter database.
 void updateQuoteLog(RoundClosedEvent event)
           
 void updateShoutLog(ShoutPlacedEvent event)
           
 void updateTransPriceLog(TransactionExecutedEvent event)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

askQuoteLog

protected DataWriter askQuoteLog
output for the ask component of market quotes as time series.


bidQuoteLog

protected DataWriter bidQuoteLog
output for the bid component of market quotes as time series.


bidLog

protected DataWriter bidLog
output for bid data as time series.


askLog

protected DataWriter askLog
output for ask data as time series.


transPriceLog

protected DataWriter transPriceLog

auction

protected RoundRobinAuction auction
The auction we are keeping statistics on.

Constructor Detail

DataWriterReport

public DataWriterReport()

DataWriterReport

public DataWriterReport(DataWriter askQuoteLog,
                        DataWriter bidQuoteLog,
                        DataWriter bidLog,
                        DataWriter askLog,
                        DataWriter transPriceLog)
Method Detail

setup

public void setup(ec.util.ParameterDatabase parameters,
                  ec.util.Parameter base)
Description copied from interface: Parameterizable
Initialise this object from a parameter database.


eventOccurred

public void eventOccurred(AuctionEvent event)

updateQuoteLog

public void updateQuoteLog(RoundClosedEvent event)

updateTransPriceLog

public void updateTransPriceLog(TransactionExecutedEvent event)

updateShoutLog

public void updateShoutLog(ShoutPlacedEvent event)

dataUpdated

public void dataUpdated()

produceUserOutput

public void produceUserOutput()
Description copied from interface: AuctionReport
Produce the final report for the user. Implementors can do whatever they see fit, for example by writing a report on stdout, or they may choose to do nothing.


getVariables

public java.util.Map getVariables()
Description copied from interface: AuctionReport
Returns a Map of all of the variables that are produced in the report. The Map maps variables, represented by objects of type ReportVariable, onto values, which may be of any class. If no variables are produced by this report then an empty Map is returned.

See Also:
ReportVariable

setAuction

public void setAuction(RoundRobinAuction auction)
Description copied from interface: AuctionReport
Specify the auction to be used when generating the report.

Specified by:
setAuction in interface AuctionReport
Overrides:
setAuction in class AbstractAuctionReport