CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
StreamDQMSerializer.h
Go to the documentation of this file.
1 #ifndef IOPool_Streamer_StreamDQMSerializer_h
2 #define IOPool_Streamer_StreamDQMSerializer_h
3 
11 #include "TBufferFile.h"
12 
14 #include <cstdint>
15 #include <vector>
16 
17 namespace edm
18 {
19 
21  {
22 
23  public:
24 
26 
29 
30  // This object always caches the results of the last event
31  // serialization operation. You get access to the data using the
32  // following member functions.
33 
34  unsigned char* bufferPointer() const { return ptr_; }
35  unsigned int currentSpaceUsed() const { return curr_space_used_; }
36  unsigned int currentEventSize() const { return curr_event_size_; }
37  uint32_t adler32_chksum() const { return adler32_chksum_; }
38 
39  private:
40 
41  std::vector<unsigned char> comp_buf_; // space for compressed data
42  unsigned int curr_event_size_;
43  unsigned int curr_space_used_; // less than curr_event_size_ if compressed
44  TBufferFile rootbuf_;
45  unsigned char* ptr_; // set to the place where the last event stored
46  uint32_t adler32_chksum_; // adler32 check sum for the (compressed) data
47 
48  };
49 
50 }
51 
52 #endif
uint32_t adler32_chksum() const
int serializeDQMEvent(DQMEvent::TObjectTable &toTable, bool use_compression, int compression_level)
unsigned int currentEventSize() const
std::vector< unsigned char > comp_buf_
unsigned int currentSpaceUsed() const
unsigned char * bufferPointer() const
std::map< std::string, std::vector< TObject * > > TObjectTable