SctData::ScanResultWriter Class Reference

A Streamer for writing ScanResults from ROD memory chunks. More...

#include <ScanResultWriter.h>

Inheritance diagram for SctData::ScanResultWriter:

Inheritance graph
[legend]
Collaboration diagram for SctData::ScanResultWriter:

Collaboration graph
[legend]

Public Member Functions

virtual void write (OStream &out, const Streamable &ob, const IOManager &manager) const throw (LogicError, IoError)
 Publishes ob to out.
virtual shared_ptr< Streamableread (IStream &in, const IOManager &manager) const throw (LogicError, IoError)
 Create a new Streamable object of the appropriate type from IS.
virtual void read (IStream &in, Streamable &ob, const IOManager &manager) const throw (LogicError, IoError)
 Refreshes ob from in.
virtual unsigned getVersion () const throw ()

Static Public Member Functions

static bool publish (scan_result_ptrs &scanResult)
 For truely public access
Exceptions:
IoException if something bad happens whilst writing
LogicError if you give it something it doesn't know how to deal with.

static ScanResultWritergetRawWriter ()
 Not for truely public access - some other mechanism maybe??
static void writeClass (const string &name, OStream &out)

Protected Member Functions

void setData (scan_result_ptrs &scanResult)
void writeGuts (OStream &out) const
void writeHeader (OStream &out) const
void writeScanPoints (OStream &out) const
void writeConfiguration (OStream &out) const
void writeChipConfig (OStream &out, const ABCDChip &data) const
void writeData (OStream &out) const

Protected Attributes

scan_result_ptrsscanResult

Private Member Functions

 ScanResultWriter (const string &className, unsigned version)

Private Attributes

string className
unsigned m_version

Static Private Attributes

static bool rawInMap

Detailed Description

A Streamer for writing ScanResults from ROD memory chunks.

If you link to libScanResultWriter.so, you should not link to libSctData.so, since both provide streamers for SctData objects.

Definition at line 21 of file ScanResultWriter.h.


Member Function Documentation

ScanResultWriter & SctData::ScanResultWriter::getRawWriter  )  [static]
 

Not for truely public access - some other mechanism maybe??

Definition at line 56 of file ScanResultWriter.cpp.

References ScanResultWriter().

Here is the call graph for this function:

bool SctData::ScanResultWriter::publish scan_result_ptrs scanResult  )  [static]
 

For truely public access

Exceptions:
IoException if something bad happens whilst writing
LogicError if you give it something it doesn't know how to deal with.

Definition at line 69 of file ScanResultWriter.cpp.

References className, ScanHeader::dataType, Sct::SctNames::getEventDataName(), SctData::ScanWriterFactory::getResultWriter(), scan_result_ptrs::header, scanResult, and setData().

Referenced by SctApi::readHistogramToIS().

Here is the call graph for this function:

void SctData::ScanResultWriter::read IStream in,
Streamable ob,
const IOManager manager
const throw (LogicError, IoError) [virtual]
 

Refreshes ob from in.

Parameters:
in The IStream
ob The Streamable object to be refreshed.
manager the IOManager to use
Exceptions:
IoException if something bad happens

Implements Sct::Streamer.

Definition at line 92 of file ScanResultWriter.cpp.

shared_ptr< Streamable > SctData::ScanResultWriter::read IStream in,
const IOManager manager
const throw (LogicError, IoError) [virtual]
 

Create a new Streamable object of the appropriate type from IS.

Parameters:
in The IStream.
manager the IOManager to use
Returns:
a new Streamable object
Exceptions:
IoException if something bad happens

Implements Sct::Streamer.

Definition at line 88 of file ScanResultWriter.cpp.

void SctData::ScanResultWriter::write OStream out,
const Streamable ob,
const IOManager manager
const throw (LogicError, IoError) [virtual]
 

Publishes ob to out.

Parameters:
out The OStream.
ob The Streamable object to stream.
manager the IOManager to use
Exceptions:
IoException if something bad happens

Implements Sct::Streamer.

Definition at line 81 of file ScanResultWriter.cpp.

void SctData::ScanResultWriter::writeHeader OStream out  )  const [protected]
 

Todo:
Version has been removed - is this wise

Definition at line 101 of file ScanResultWriter.cpp.

References ScanHeader::endTime, scan_result_ptrs::header, ScanHeader::moduleName, ScanHeader::runNumber, ScanHeader::scanNumber, scanResult, ScanHeader::scanType, ScanHeader::startTime, and writeClass().

Here is the call graph for this function:


The documentation for this class was generated from the following files:
Generated on Mon Feb 6 14:07:03 2006 for SCT DAQ/DCS Software - C++ by  doxygen 1.4.6