CMS 3D CMS Logo

StreamerOutputFile.h

Go to the documentation of this file.
00001 #ifndef IOPool_Streamer_StreamerOutputFile_h
00002 #define IOPool_Streamer_StreamerOutputFile_h
00003 
00006 #include "IOPool/Streamer/interface/MsgTools.h"
00007 
00008 #include "IOPool/Streamer/interface/InitMsgBuilder.h"
00009 #include "IOPool/Streamer/interface/InitMessage.h"
00010 
00011 #include "IOPool/Streamer/interface/EventMsgBuilder.h"
00012 #include "IOPool/Streamer/interface/EventMessage.h"
00013 
00014 #include "IOPool/Streamer/interface/StreamerFileIO.h"
00015 
00016 #include <exception>
00017 #include <fstream>
00018 #include <iostream>
00019 
00020 class StreamerOutputFile
00024   {
00025   public:
00026      explicit StreamerOutputFile(const std::string& name);
00030      ~StreamerOutputFile();
00031 
00032      void write(const InitMsgBuilder&);
00037      void write(const InitMsgView&);
00038 
00039      uint64 write(const EventMsgBuilder&);
00046      uint64 write(const EventMsgView&);
00047 
00048      //Returns how many bytes were written out
00049      uint32 writeEOF(uint32 statusCode,
00050                      const std::vector<uint32>& hltStats);
00051 
00052      uint32 adler32() const { return streamerfile_->adler32(); }
00053 
00054   private:
00055      void writeEventHeader(const EventMsgView& ineview);
00056      void writeStart(const InitMsgView& inview);
00057 
00058   private:
00059      OutputFile* streamerfile_;
00060 };
00061 
00062 #endif

Generated on Tue Jun 9 17:39:18 2009 for CMSSW by  doxygen 1.5.4