#include <IOPool/Streamer/interface/InitMessage.h>
Definition at line 56 of file InitMessage.h.
InitMsgView::InitMsgView | ( | void * | buf | ) |
Definition at line 6 of file InitMessage.cc.
References buf_, convert32(), GenMuonPlsPt100GeV_cfg::cout, desc_len_, desc_start_, lat::endl(), hlt_select_count_, hlt_select_len_, hlt_select_start_, hlt_trig_count_, hlt_trig_len_, hlt_trig_start_, l1_trig_count_, l1_trig_len_, l1_trig_start_, outputModuleId_, outputModuleLabel_len_, outputModuleLabel_start_, processName_len_, processName_start_, protocolVersion(), release_len_, and release_start_.
00006 : 00007 buf_((uint8*)buf),head_(buf) 00008 { 00009 if (protocolVersion() == 2) { 00010 std::cout << "Protocol Version 2 encountered" << std::endl; 00011 release_start_ = buf_ + sizeof(InitHeader) - (sizeof(uint32)*2); 00012 // Minus the size for Init and Event Header size fileds 00013 // in the InitHeader 00014 } else { //For version 3 00015 release_start_ = buf_ + sizeof(InitHeader); 00016 } 00017 release_len_ = *release_start_; 00018 release_start_ += sizeof(uint8); 00019 uint8* pos = release_start_ + release_len_; 00020 00021 //Lets get Process Name from right after Release Name 00022 if (protocolVersion() > 3) { 00023 //std::cout << "Protocol Version > 3 encountered" << std::endl; 00024 processName_len_ = *pos; 00025 processName_start_ = (uint8*)(pos + sizeof(uint8)); 00026 pos = processName_start_ + processName_len_; 00027 00028 // Output Module Label 00029 if (protocolVersion() > 4) { 00030 outputModuleLabel_len_ = *pos; 00031 outputModuleLabel_start_ = (uint8*)(pos + sizeof(uint8)); 00032 pos = outputModuleLabel_start_ + outputModuleLabel_len_; 00033 00034 // Output Module Id 00035 if (protocolVersion() > 5) { 00036 outputModuleId_ = convert32(pos); 00037 pos += sizeof(char_uint32); 00038 } 00039 } 00040 } 00041 00042 00043 hlt_trig_start_ = pos; 00044 hlt_trig_count_ = convert32(hlt_trig_start_); 00045 hlt_trig_start_ += sizeof(char_uint32); 00046 hlt_trig_len_ = convert32(hlt_trig_start_); 00047 hlt_trig_start_ += sizeof(char_uint32); 00048 pos = hlt_trig_start_ + hlt_trig_len_; 00049 00050 if (protocolVersion() > 4) { 00051 hlt_select_start_ = pos; 00052 hlt_select_count_ = convert32(hlt_select_start_); 00053 hlt_select_start_ += sizeof(char_uint32); 00054 hlt_select_len_ = convert32(hlt_select_start_); 00055 hlt_select_start_ += sizeof(char_uint32); 00056 pos = hlt_select_start_ + hlt_select_len_; 00057 } 00058 00059 l1_trig_start_ = pos; 00060 l1_trig_count_ = convert32(l1_trig_start_); 00061 l1_trig_start_ += sizeof(char_uint32); 00062 l1_trig_len_ = convert32(l1_trig_start_); 00063 l1_trig_start_ += sizeof(char_uint32); 00064 pos = l1_trig_start_ + l1_trig_len_; 00065 00066 desc_start_ = pos; 00067 desc_len_ = convert32(desc_start_); 00068 desc_start_ += sizeof(char_uint32); 00069 }
Definition at line 62 of file InitMessage.h.
References HeaderView::code(), and head_.
Referenced by edm::StreamerInputSource::deserializeRegistry(), dumpInitHeader(), edm::StreamerFileReader::getHeader(), and edmtestp::TestFileReader::TestFileReader().
const uint8* InitMsgView::descData | ( | ) | const [inline] |
Definition at line 83 of file InitMessage.h.
References desc_start_.
Referenced by edm::StreamerInputSource::deserializeRegistry(), dumpInitVerbose(), and StreamerOutputFile::write().
00083 { return desc_start_; }
uint32 InitMsgView::descLength | ( | ) | const [inline] |
Definition at line 82 of file InitMessage.h.
References desc_len_.
Referenced by edm::StreamerInputSource::deserializeRegistry(), dumpInit(), dumpInitVerbose(), and dumpInitView().
00082 { return desc_len_; }
uint32 InitMsgView::eventHeaderSize | ( | ) | const |
This is estimated size of event header for Protocol Version 2.
Definition at line 132 of file InitMessage.cc.
References buf_, convert32(), InitHeader::event_header_size_, get_hlt_bit_cnt(), get_l1_bit_cnt(), h, and protocolVersion().
00133 { 00134 if (protocolVersion() == 2) { 00137 uint32 hlt_sz = get_hlt_bit_cnt(); 00138 if (hlt_sz != 0 ) hlt_sz = 1+ ((hlt_sz-1)/4); 00139 00140 uint32 l1_sz = get_l1_bit_cnt(); 00141 if (l1_sz != 0) l1_sz = 1 + ((l1_sz-1)/8); 00142 00143 return 1 + (4*8) + hlt_sz+l1_sz; 00144 } 00145 00146 InitHeader* h = reinterpret_cast<InitHeader*>(buf_); 00147 return convert32(h->event_header_size_); 00148 }
uint32 InitMsgView::get_hlt_bit_cnt | ( | ) | const [inline] |
Definition at line 78 of file InitMessage.h.
References hlt_trig_count_.
Referenced by edm::StreamerFileWriter::doOutputHeader(), and eventHeaderSize().
00078 { return hlt_trig_count_; }
uint32 InitMsgView::get_l1_bit_cnt | ( | ) | const [inline] |
Definition at line 79 of file InitMessage.h.
References l1_trig_count_.
Referenced by eventHeaderSize().
00079 { return l1_trig_count_; }
uint32 InitMsgView::headerSize | ( | ) | const [inline] |
Definition at line 84 of file InitMessage.h.
References buf_, and desc_start_.
Referenced by StreamerOutputFile::write(), StreamerOutputIndexFile::write(), and StreamerOutputFile::writeStart().
00084 {return desc_start_-buf_;}
Definition at line 113 of file InitMessage.cc.
References MsgTools::getNames(), hlt_trig_len_, and hlt_trig_start_.
Referenced by dumpInitHeader(), stor::SMProxyServer::eventServerWebPage(), stor::StorageManager::eventServerWebPage(), stor::StorageManager::headerdataWebPage(), stor::SMProxyServer::headerdataWebPage(), edm::EventStreamService::initializeSelection(), and edm::StreamerInputSource::saveTriggerNames().
00114 { 00115 MsgTools::getNames(hlt_trig_start_,hlt_trig_len_,save_here); 00116 }
Definition at line 118 of file InitMessage.cc.
References Exception, MsgTools::getNames(), hlt_select_len_, hlt_select_start_, and protocolVersion().
Referenced by dumpInitHeader(), stor::SMProxyServer::eventServerWebPage(), and stor::StorageManager::eventServerWebPage().
00119 { 00120 if (protocolVersion() < 5) 00121 throw cms::Exception("Invalid Message Version", "InitMsgView") 00122 << "HLT trigger selections are only supported in Protocol Version 5 and above" << ".\n"; 00123 00124 MsgTools::getNames(hlt_select_start_,hlt_select_len_,save_here); 00125 }
Definition at line 127 of file InitMessage.cc.
References MsgTools::getNames(), l1_trig_len_, and l1_trig_start_.
Referenced by dumpInitHeader().
00128 { 00129 MsgTools::getNames(l1_trig_start_,l1_trig_len_,save_here); 00130 }
uint32 InitMsgView::outputModuleId | ( | ) | const [inline] |
Definition at line 72 of file InitMessage.h.
References outputModuleId_.
Referenced by edm::FUShmOutputModule::doOutputHeader(), dumpInitHeader(), stor::SMProxyServer::eventServerWebPage(), stor::StorageManager::eventServerWebPage(), stor::StorageManager::headerdataWebPage(), stor::SMProxyServer::headerdataWebPage(), edm::ServiceManager::manageInitMsg(), stor::FragmentCollector::processHeader(), and edmtestp::TestFileReader::TestFileReader().
00072 { return outputModuleId_; }
std::string InitMsgView::outputModuleLabel | ( | ) | const |
Definition at line 103 of file InitMessage.cc.
References Exception, outputModuleLabel_len_, outputModuleLabel_start_, and protocolVersion().
Referenced by dumpInitHeader(), stor::SMProxyServer::eventServerWebPage(), stor::StorageManager::eventServerWebPage(), stor::StorageManager::headerdataWebPage(), stor::SMProxyServer::headerdataWebPage(), edm::ServiceManager::manageInitMsg(), and stor::FragmentCollector::processHeader().
00104 { 00105 if (protocolVersion() < 5) 00106 throw cms::Exception("Invalid Message Version", "InitMsgView") 00107 << "Output Module Label is only supported in Protocol Version 5 and above" << ".\n"; 00108 00109 return std::string(reinterpret_cast<char *>(outputModuleLabel_start_),outputModuleLabel_len_); 00110 }
std::string InitMsgView::processName | ( | ) | const |
Definition at line 94 of file InitMessage.cc.
References Exception, processName_len_, processName_start_, and protocolVersion().
Referenced by edm::StreamerInputSource::deserializeRegistry(), and dumpInitHeader().
00095 { 00096 if (protocolVersion() < 4) 00097 throw cms::Exception("Invalid Message Version", "InitMsgView") 00098 << "Process Name is only supported in Protocol Version 4 and above" << ".\n"; 00099 00100 return std::string(reinterpret_cast<char *>(processName_start_),processName_len_); 00101 }
uint32 InitMsgView::protocolVersion | ( | ) | const |
Definition at line 77 of file InitMessage.cc.
References buf_, h, Version::protocol_, and InitHeader::version_.
Referenced by StreamerInputFile::compareHeader(), edm::StreamerInputSource::deserializeRegistry(), dumpInitHeader(), eventHeaderSize(), stor::StorageManager::headerdataWebPage(), stor::SMProxyServer::headerdataWebPage(), hltTriggerSelections(), InitMsgView(), outputModuleLabel(), processName(), and StreamerInputFile::StreamerInputFile().
00078 { 00079 InitHeader* h = reinterpret_cast<InitHeader*>(buf_); 00080 return h->version_.protocol_; 00081 }
Definition at line 83 of file InitMessage.cc.
References buf_, h, Version::pset_id_, and InitHeader::version_.
Referenced by dumpInitHeader().
00084 { 00085 InitHeader* h = reinterpret_cast<InitHeader*>(buf_); 00086 memcpy(put_here,h->version_.pset_id_,sizeof(h->version_.pset_id_)); 00087 }
std::string InitMsgView::releaseTag | ( | ) | const |
Definition at line 89 of file InitMessage.cc.
References release_len_, and release_start_.
Referenced by dumpInitHeader().
00090 { 00091 return std::string(reinterpret_cast<char *>(release_start_),release_len_); 00092 }
Definition at line 71 of file InitMessage.cc.
References buf_, convert32(), h, and InitHeader::run_.
Referenced by StreamerInputFile::compareHeader(), dumpInitHeader(), StreamerInputFile::StreamerInputFile(), edmtestp::TestFileReader::TestFileReader(), StreamerOutputIndexFile::write(), and StreamerOutputFile::writeStart().
00072 { 00073 InitHeader* h = reinterpret_cast<InitHeader*>(buf_); 00074 return convert32(h->run_); 00075 }
Definition at line 63 of file InitMessage.h.
References head_, and HeaderView::size().
Referenced by dumpInitHeader(), stor::DataProcessManager::getHeaderFromSM(), stor::FragmentCollector::processHeader(), edm::EventStreamService::saveInitMessage(), edmtestp::TestFileReader::TestFileReader(), StreamerOutputFile::write(), and edm::EventOutputService::writeHeader().
uint8* InitMsgView::startAddress | ( | ) | const [inline] |
Definition at line 64 of file InitMessage.h.
References buf_.
Referenced by edm::EventStreamService::saveInitMessage(), edmtestp::TestFileReader::TestFileReader(), StreamerOutputIndexFile::write(), and StreamerOutputFile::writeStart().
00064 { return buf_; }
uint8* InitMsgView::buf_ [private] |
Definition at line 88 of file InitMessage.h.
Referenced by eventHeaderSize(), headerSize(), InitMsgView(), protocolVersion(), pset(), run(), and startAddress().
uint32 InitMsgView::desc_len_ [private] |
uint8* InitMsgView::desc_start_ [private] |
Definition at line 113 of file InitMessage.h.
Referenced by descData(), headerSize(), and InitMsgView().
HeaderView InitMsgView::head_ [private] |
uint32 InitMsgView::hlt_select_count_ [private] |
uint32 InitMsgView::hlt_select_len_ [private] |
Definition at line 106 of file InitMessage.h.
Referenced by hltTriggerSelections(), and InitMsgView().
uint8* InitMsgView::hlt_select_start_ [private] |
Definition at line 104 of file InitMessage.h.
Referenced by hltTriggerSelections(), and InitMsgView().
uint32 InitMsgView::hlt_trig_count_ [private] |
uint32 InitMsgView::hlt_trig_len_ [private] |
uint8* InitMsgView::hlt_trig_start_ [private] |
uint32 InitMsgView::l1_trig_count_ [private] |
uint32 InitMsgView::l1_trig_len_ [private] |
uint8* InitMsgView::l1_trig_start_ [private] |
uint32 InitMsgView::outputModuleId_ [private] |
uint32 InitMsgView::outputModuleLabel_len_ [private] |
uint8* InitMsgView::outputModuleLabel_start_ [private] |
uint32 InitMsgView::processName_len_ [private] |
uint8* InitMsgView::processName_start_ [private] |
uint32 InitMsgView::release_len_ [private] |
uint8* InitMsgView::release_start_ [private] |