Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-05-31 04:19:41

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 namespace edm::streamer {
0009   class EventMsgBuilder {
0010   public:
0011     EventMsgBuilder(void* buf,
0012                     uint32 size,
0013                     uint32 run,
0014                     uint64 event,
0015                     uint32 lumi,
0016                     uint32 outModId,
0017                     uint32 droppedEventsCount,
0018                     std::vector<bool>& l1_bits,
0019                     uint8* hlt_bits,
0020                     uint32 hlt_bit_count,
0021                     uint32 adler32_chksum,
0022                     const char* host_name);
0023 
0024     void setOrigDataSize(uint32);
0025     uint8* startAddress() const { return buf_; }
0026     void setEventLength(uint32 len);
0027     void setBufAddr(uint8* buf_addr) { buf_ = buf_addr; }
0028     void setEventAddr(uint8* event_addr) { event_addr_ = event_addr; }
0029     uint8* eventAddr() const { return event_addr_; }
0030     uint32 headerSize() const { return event_addr_ - buf_; }
0031     uint32 size() const;
0032     uint32 bufferSize() const { return size_; }
0033 
0034     static uint32 computeHeaderSize(uint32 l1t_bit_count, uint32 hlt_bit_count);
0035 
0036   private:
0037     uint8* buf_;
0038     uint32 size_;
0039     uint8* event_addr_;
0040   };
0041 }  // namespace edm::streamer
0042 #endif