File indexing completed on 2023-03-17 11:10:26
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053 #ifndef IOPool_Streamer_EventMessage_h
0054 #define IOPool_Streamer_EventMessage_h
0055
0056 #include "IOPool/Streamer/interface/MsgTools.h"
0057 #include "IOPool/Streamer/interface/MsgHeader.h"
0058
0059
0060
0061 struct EventHeader {
0062 Header header_;
0063 uint8 protocolVersion_;
0064 char_uint32 run_;
0065 char_uint64 event_;
0066 char_uint32 lumi_;
0067 char_uint32 origDataSize_;
0068 char_uint32 outModId_;
0069 char_uint32 droppedEventsCount_;
0070 };
0071
0072 class EventMsgView {
0073 public:
0074 EventMsgView(void* buf);
0075
0076 uint32 code() const { return head_.code(); }
0077 uint32 size() const { return head_.size(); }
0078
0079 const uint8* eventData() const { return event_start_; }
0080 uint8* startAddress() const { return buf_; }
0081 uint32 eventLength() const { return event_len_; }
0082 uint32 headerSize() const { return event_start_ - buf_; }
0083 uint32 protocolVersion() const;
0084 uint32 run() const;
0085 uint64 event() const;
0086 uint32 lumi() const;
0087 uint32 origDataSize() const;
0088 uint32 outModId() const;
0089 uint32 droppedEventsCount() const;
0090
0091 void l1TriggerBits(std::vector<bool>& put_here) const;
0092 void hltTriggerBits(uint8* put_here) const;
0093
0094 uint32 hltCount() const { return hlt_bits_count_; }
0095 uint32 l1Count() const { return l1_bits_count_; }
0096 uint32 adler32_chksum() const { return adler32_chksum_; }
0097 std::string hostName() const;
0098 uint32 hostName_len() const { return host_name_len_; }
0099
0100 private:
0101 uint8* buf_;
0102 HeaderView head_;
0103
0104 uint8* hlt_bits_start_;
0105 uint32 hlt_bits_count_;
0106 uint8* l1_bits_start_;
0107 uint32 l1_bits_count_;
0108 uint8* event_start_;
0109 uint32 event_len_;
0110 uint32 adler32_chksum_;
0111 uint8* host_name_start_;
0112 uint32 host_name_len_;
0113 bool v2Detected_;
0114 };
0115
0116 #endif