Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-05-18 03:27:20

0001 #ifndef IOPool_Streamer_EventMsgBuilder_h
0002 #define IOPool_Streamer_EventMsgBuilder_h
0003 
0004 #include "IOPool/Streamer/interface/MsgTools.h"
0005 
0006 // ------------------ event message builder ----------------
0007 
0008 class EventMsgBuilder {
0009 public:
0010   EventMsgBuilder(void* buf,
0011                   uint32 size,
0012                   uint32 run,
0013                   uint64 event,
0014                   uint32 lumi,
0015                   uint32 outModId,
0016                   uint32 droppedEventsCount,
0017                   std::vector<bool>& l1_bits,
0018                   uint8* hlt_bits,
0019                   uint32 hlt_bit_count,
0020                   uint32 adler32_chksum,
0021                   const char* host_name);
0022 
0023   void setOrigDataSize(uint32);
0024   uint8* startAddress() const { return buf_; }
0025   void setEventLength(uint32 len);
0026   void setBufAddr(uint8* buf_addr) { buf_ = buf_addr; }
0027   void setEventAddr(uint8* event_addr) { event_addr_ = event_addr; }
0028   uint8* eventAddr() const { return event_addr_; }
0029   uint32 headerSize() const { return event_addr_ - buf_; }
0030   uint32 size() const;
0031   uint32 bufferSize() const { return size_; }
0032 
0033   static uint32 computeHeaderSize(uint32 l1t_bit_count, uint32 hlt_bit_count);
0034 
0035 private:
0036   uint8* buf_;
0037   uint32 size_;
0038   uint8* event_addr_;
0039 };
0040 
0041 #endif