CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch13/src/IOPool/Streamer/interface/DQMEventMessage.h

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