00001 #ifndef IOPool_Streamer_DQMEventMessage_h 00002 #define IOPool_Streamer_DQMEventMessage_h 00003 00041 #include "IOPool/Streamer/interface/MsgTools.h" 00042 #include "IOPool/Streamer/interface/MsgHeader.h" 00043 #include "boost/shared_ptr.hpp" 00044 #include <TObject.h> 00045 #include <map> 00046 00047 #include "DataFormats/Provenance/interface/Timestamp.h" 00048 00049 00050 // ------------------ dqm event message ---------------- 00051 00052 namespace DQMEvent 00053 { 00054 typedef std::map< std::string, std::vector<TObject *> > 00055 TObjectTable; 00056 } 00057 00058 struct DQMEventHeader 00059 { 00060 Header header_; 00061 char_uint32 protocolVersion_; 00062 char_uint32 headerSize_; 00063 char_uint32 runNumber_; 00064 char_uint32 eventNumber_; 00065 char_uint64 timeStamp_; 00066 char_uint32 lumiSection_; 00067 char_uint32 updateNumber_; 00068 char_uint32 compressionFlag_; 00069 char_uint32 fuProcessId_; 00070 char_uint32 fuGuid_; 00071 char_uint32 mergeCount_; 00072 }; 00073 00074 class DQMEventMsgView 00075 { 00076 public: 00077 DQMEventMsgView(void* buf); 00078 00079 uint32 code() const { return head_.code(); } 00080 uint32 size() const { return head_.size(); } 00081 00082 uint8* startAddress() const { return buf_; } 00083 uint8* eventAddress() const { return eventAddr_; } 00084 uint32 eventLength() const { return eventLen_; } 00085 uint32 adler32_chksum() const {return adler32_chksum_;} 00086 std::string hostName() const; 00087 uint32 hostName_len() const {return host_name_len_;} 00088 00089 uint32 protocolVersion() const; 00090 uint32 headerSize() const; 00091 uint32 runNumber() const; 00092 uint32 eventNumberAtUpdate() const; 00093 uint32 lumiSection() const; 00094 uint32 updateNumber() const; 00095 uint32 compressionFlag() const; 00096 uint32 fuProcessId() const; 00097 uint32 fuGuid() const; 00098 uint32 mergeCount() const; 00099 00100 edm::Timestamp timeStamp() const; 00101 00102 std::string releaseTag() const { return releaseTag_; } 00103 std::string topFolderName() const { return folderName_; } 00104 00105 uint32 subFolderCount() const { return subFolderCount_; } 00106 boost::shared_ptr< std::vector<std::string> > subFolderNames() const; 00107 00108 std::string subFolderName(uint32 const subFolderIndex) const; 00109 uint32 meCount(std::string const& subFolderName) const; 00110 uint32 meCount(uint32 const subFolderIndex) const; 00111 00112 private: 00113 uint8* buf_; 00114 HeaderView head_; 00115 std::string releaseTag_; 00116 std::string folderName_; 00117 uint8* eventAddr_; 00118 uint32 eventLen_; 00119 uint32 adler32_chksum_; 00120 uint8* host_name_start_; 00121 uint32 host_name_len_; 00122 uint32 subFolderCount_; 00123 std::map<std::string, uint32> subFolderIndexTable_; 00124 boost::shared_ptr< std::vector<std::string> > nameListPtr_; 00125 std::vector<uint32> meCountList_; 00126 }; 00127 00128 #endif