Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Related Pages

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

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.


ScanResultWritergetRawWriter ()
 Not for truely public access - some other mechanism maybe??

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

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 22 of file ScanResultWriter.h.


Member Function Documentation

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

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

Definition at line 59 of file ScanResultWriter.cpp.

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 72 of file ScanResultWriter.cpp.

References className, ScanHeader::dataType, scan_result_ptrs::header, and setData().

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 95 of file ScanResultWriter.cpp.

References Sct::IoError.

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 91 of file ScanResultWriter.cpp.

References Sct::IoError.

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 84 of file ScanResultWriter.cpp.

References Sct::IoError.

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

Definition at line 104 of file ScanResultWriter.cpp.

References ScanHeader::endTime, scan_result_ptrs::header, ScanHeader::moduleName, ScanHeader::runNumber, ScanHeader::scanNumber, ScanHeader::scanType, and ScanHeader::startTime.


The documentation for this class was generated from the following files:
Generated on Thu Jul 15 09:52:56 2004 for SCT DAQ/DCS Software - C++ by doxygen 1.3.5