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 <memory>
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  uint32 adler32() const { return streamerfile_->adler32(); }
56 
57  private:
58  void writeEventHeader(const EventMsgView& ineview);
59  void writeStart(const InitMsgView& inview);
60 
61  private:
62  std::shared_ptr<OutputFile> streamerfile_;
63 };
64 
65 #endif
uint64 writeEventFragment(uint32 fragIndex, uint32 fragCount, const char *dataPtr, uint32 dataSize)
void write(const InitMsgBuilder &)
void writeEventHeader(const EventMsgView &ineview)
unsigned int uint32
Definition: MsgTools.h:13
std::shared_ptr< OutputFile > streamerfile_
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)