CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
StreamerOutputFile.h
Go to the documentation of this file.
1 #ifndef IOPool_Streamer_StreamerOutputFile_h
2 #define IOPool_Streamer_StreamerOutputFile_h
3 
7 
10 
13 
15 #include "boost/shared_ptr.hpp"
16 
17 #include <exception>
18 #include <fstream>
19 #include <iostream>
20 
25  {
26  public:
27  explicit StreamerOutputFile(const std::string& name);
32 
33  void write(const InitMsgBuilder&);
38  void write(const InitMsgView&);
39 
40  void writeInitFragment(uint32 fragIndex, uint32 fragCount,
41  const char *dataPtr, uint32 dataSize);
42 
50  uint64 write(const EventMsgView&);
51 
52  uint64 writeEventFragment(uint32 fragIndex, uint32 fragCount,
53  const char *dataPtr, uint32 dataSize);
54 
55  //Returns how many bytes were written out
56  uint32 writeEOF(uint32 statusCode,
57  const std::vector<uint32>& hltStats);
58 
59  uint32 adler32() const { return streamerfile_->adler32(); }
60 
61  private:
62  void writeEventHeader(const EventMsgView& ineview);
63  void writeStart(const InitMsgView& inview);
64 
65  private:
66  boost::shared_ptr<OutputFile> streamerfile_;
67 };
68 
69 #endif
uint64 writeEventFragment(uint32 fragIndex, uint32 fragCount, const char *dataPtr, uint32 dataSize)
void write(const InitMsgBuilder &)
boost::shared_ptr< OutputFile > streamerfile_
void writeEventHeader(const EventMsgView &ineview)
unsigned int uint32
Definition: MsgTools.h:13
uint32 writeEOF(uint32 statusCode, const std::vector< uint32 > &hltStats)
uint32 adler32() const
StreamerOutputFile(const std::string &name)
unsigned long long uint64
Definition: MsgTools.h:14
void writeInitFragment(uint32 fragIndex, uint32 fragCount, const char *dataPtr, uint32 dataSize)
void writeStart(const InitMsgView &inview)