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

ScanResultWriter.h

Go to the documentation of this file.
00001 #ifndef SCANRESULTWRITER_H
00002 #define SCANRESULTWRITER_H
00003 
00004 #include <is/isinfo.h>
00005 #include "SctApi/scan.h"
00006 #include <string>
00007 #include "Sct/Streamer.h"
00008 #include "Sct/IOManager.h"
00009 #include "Sct/LogicErrors.h"
00010 #include "Sct/IoExceptions.h"
00011 
00012 using namespace std;
00013 using namespace Sct;
00014 
00015 namespace SctData {
00016 
00020 class ScanResultWriter : public virtual Streamer {
00021 public:
00027     static bool publish(scan_result_ptrs& scanResult);
00028 
00032     static ScanResultWriter& getRawWriter();
00033     //static ScanResultWriter& getFitWriter();
00034     static void writeClass(const string& name, OStream& out);
00035     
00036     //Streamer overrides
00037     virtual void write(OStream& out, const Streamable& ob, const IOManager& manager) const throw(LogicError, IoError);
00038     
00039     //Do nothing:
00040     virtual shared_ptr<Streamable> read(IStream& in, const IOManager& manager) const throw(LogicError, IoError);
00041     virtual void read(IStream& in, Streamable& ob, const IOManager& manager) const throw(LogicError, IoError);
00042 
00043 
00044 protected:
00045     scan_result_ptrs* scanResult;       //Points to a scan_result object
00046 
00047     void setData(scan_result_ptrs& scanResult);
00048     void writeGuts(OStream& out) const ;
00049     void writeHeader(OStream& out) const;
00050     void writeScanPoints(OStream& out) const;
00051     void writeConfiguration(OStream& out) const;
00052     void writeChipConfig(OStream& out, const ABCDChip& data) const;
00053     void writeData(OStream& out) const;
00054 
00055 private:
00056     //Constructor - all public access via static methods
00057     ScanResultWriter(const string& className);
00058 
00059     string className;
00060     static bool rawInMap;
00061 };
00062 
00063 }
00064 
00065 #endif //#ifndef SCANRESULTWRITER_H

Generated on Mon Dec 15 19:36:15 2003 for SCT DAQ/DCS Software by doxygen1.3-rc3