CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
StreamerFileWriter.h
Go to the documentation of this file.
1 #ifndef IOPool_Streamer_StreamerFileWriter_h
2 #define IOPool_Streamer_StreamerFileWriter_h
3 
5 
12 
13 #include <iostream>
14 #include <vector>
15 #include <memory>
16 #include <string>
17 
18 namespace edm
19 {
21  {
24  const char* headerPtr;
26 
29  const char* dataPtr;
31  };
32 
34  {
35  std::vector<unsigned char> hltBits;
36  const char* headerPtr;
38 
41  const char* dataPtr;
43  };
44 
47  {
48  public:
49 
50  explicit StreamerFileWriter(edm::ParameterSet const& ps);
51  explicit StreamerFileWriter(std::string const& fileName);
53 
54  static void fillDescription(ParameterSetDescription& desc);
55 
56  void doOutputHeader(InitMsgBuilder const& init_message);
57  void doOutputHeader(InitMsgView const& init_message);
59 
60  void doOutputEvent(EventMsgBuilder const& msg);
61  void doOutputEvent(EventMsgView const& msg);
63 
64  void start(){}
65  void stop();
66  // Returns the sizes of EOF records, call them after
67  // u called stop, just before destruction
69 
70  uint32 get_adler32() const { return stream_writer_->adler32();}
71 
72  private:
73  void updateHLTStats(std::vector<uint8> const& packedHlt);
74 
75  std::auto_ptr<StreamerOutputFile> stream_writer_;
77  std::vector<uint32> hltStats_;
79 
80  };
81 }
82 #endif
std::vector< unsigned char > hltBits
void doOutputHeaderFragment(StreamerFileWriterHeaderParams const &)
std::vector< uint32 > hltStats_
StreamerFileWriter(edm::ParameterSet const &ps)
void doOutputHeader(InitMsgBuilder const &init_message)
uint32 getStreamEOFSize() const
unsigned int uint32
Definition: MsgTools.h:13
static void fillDescription(ParameterSetDescription &desc)
void doOutputEvent(EventMsgBuilder const &msg)
void doOutputEventFragment(StreamerFileWriterEventParams const &)
void updateHLTStats(std::vector< uint8 > const &packedHlt)
std::auto_ptr< StreamerOutputFile > stream_writer_