CMS 3D CMS Logo

MsgTools.h File Reference

#include <vector>
#include <string>
#include <sstream>
#include <iterator>
#include "FWCore/Utilities/interface/Algorithms.h"

Go to the source code of this file.

Namespaces

namespace  MsgTools

Typedefs

typedef unsigned char char_uint16 [sizeof(uint16)]
typedef unsigned char char_uint32 [sizeof(uint32)]
typedef unsigned char char_uint64 [sizeof(uint64)]
typedef std::vector< std::string > Strings
typedef unsigned short uint16
typedef unsigned int uint32
typedef unsigned long long uint64
typedef unsigned char uint8

Functions

void convert (uint64 li, char_uint64 v)
void convert (uint16 i, char_uint16 v)
void convert (uint32 i, char_uint32 v)
uint16 convert16 (char_uint16 v)
uint32 convert32 (char_uint32 v)
uint64 convert64 (char_uint64 v)
uint8MsgTools::fillNames (const Strings &names, uint8 *pos)
void MsgTools::getNames (uint8 *from, uint32 from_len, Strings &to)


Typedef Documentation

typedef unsigned char char_uint16[sizeof(uint16)]

Definition at line 17 of file MsgTools.h.

typedef unsigned char char_uint32[sizeof(uint32)]

Definition at line 16 of file MsgTools.h.

typedef unsigned char char_uint64[sizeof(uint64)]

Definition at line 15 of file MsgTools.h.

typedef std::vector<std::string> Strings

Definition at line 18 of file MsgTools.h.

typedef unsigned short uint16

Definition at line 12 of file MsgTools.h.

typedef unsigned int uint32

Definition at line 13 of file MsgTools.h.

typedef unsigned long long uint64

Definition at line 14 of file MsgTools.h.

typedef unsigned char uint8

Definition at line 11 of file MsgTools.h.


Function Documentation

void convert ( uint64  li,
char_uint64  v 
) [inline]

Definition at line 60 of file MsgTools.h.

00061 {
00062   v[0]=li&0xff;
00063   v[1]=(li>>8)&0xff;
00064   v[2]=(li>>16)&0xff;
00065   v[3]=(li>>24)&0xff;
00066   v[4]=(li>>32)&0xff;
00067   v[5]=(li>>40)&0xff;
00068   v[6]=(li>>48)&0xff;
00069   v[7]=(li>>56)&0xff;
00070 }

void convert ( uint16  i,
char_uint16  v 
) [inline]

Definition at line 54 of file MsgTools.h.

00055 {
00056   v[0]=i&0xff;
00057   v[1]=(i>>8)&0xff;
00058 }

void convert ( uint32  i,
char_uint32  v 
) [inline]

Definition at line 46 of file MsgTools.h.

Referenced by helper::CollectionStoreManager< OutputCollection, ClonePolicy >::cloneAndStore(), PhysicsTools::MVATrainer::connectProcessors(), ConsRegRequestBuilder::ConsRegRequestBuilder(), ConsRegResponseBuilder::ConsRegResponseBuilder(), DQMEventMsgBuilder::DQMEventMsgBuilder(), EOFRecordBuilder::EOFRecordBuilder(), EventMsgBuilder::EventMsgBuilder(), MsgTools::fillNames(), edm::EdmEventItemGetter< RefType >::get(), stor::DataProcessManager::getHeaderFromSM(), edm::DQMHttpSource::getOneDQMEvent(), stor::DataProcessManager::getOneDQMEventFromSM(), edm::OnlineHttpReader::getOneEvent(), edm::EventStreamHttpReader::getOneEvent(), stor::DataProcessManager::getOneEventFromSM(), Header::Header(), InitHeader::InitHeader(), InitMsgBuilder::InitMsgBuilder(), pseudoVertexFit(), edm::EventStreamHttpReader::readHeader(), edm::OnlineHttpReader::readHeader(), DQMEventMsgBuilder::setCompressionFlag(), InitMsgBuilder::setDataLength(), DQMEventMsgBuilder::setEventLength(), EventMsgBuilder::setEventLength(), DQMEventMsgBuilder::setFUGuid(), DQMEventMsgBuilder::setFUProcessId(), EventMsgBuilder::setOrigDataSize(), DQMEventMsgBuilder::setReserved(), ConsRegResponseBuilder::setStreamSelectionTable(), StreamerOutputIndexFile::write(), and StreamerOutputIndexFile::writeIndexFileHeader().

00047 {
00048   v[0]=i&0xff;
00049   v[1]=(i>>8)&0xff;
00050   v[2]=(i>>16)&0xff;
00051   v[3]=(i>>24)&0xff;
00052 }

uint16 convert16 ( char_uint16  v  )  [inline]

Definition at line 38 of file MsgTools.h.

References a, and b.

00039 { 
00040   // first four bytes are code,  LSB first
00041   unsigned int a=v[0], b=v[1];
00042   a|=(b<<8);
00043   return a;
00044 }

uint32 convert32 ( char_uint32  v  )  [inline]

Definition at line 30 of file MsgTools.h.

References a, b, c, and d.

Referenced by OtherMessageView::bodySize(), DQMEventMsgView::compressionFlag(), ConsRegRequestView::ConsRegRequestView(), ConsRegResponseView::ConsRegResponseView(), stor::StorageManager::DQMeventdataWebPage(), stor::SMProxyServer::DQMeventdataWebPage(), DQMEventMsgView::DQMEventMsgView(), EventMsgView::event(), stor::SMProxyServer::eventdataWebPage(), stor::StorageManager::eventdataWebPage(), InitMsgView::eventHeaderSize(), EventMsgView::EventMsgView(), DQMEventMsgView::eventNumberAtUpdate(), EOFRecordView::events(), DQMEventMsgView::fuGuid(), DQMEventMsgView::fuProcessId(), ConsRegResponseView::getStreamSelectionTable(), stor::StorageManager::headerdataWebPage(), stor::SMProxyServer::headerdataWebPage(), DQMEventMsgView::headerSize(), HeaderView::HeaderView(), EOFRecordView::hltStats(), InitMsgView::InitMsgView(), EventMsgView::lumi(), DQMEventMsgView::lumiSection(), EventMsgView::origDataSize(), EventMsgView::outModId(), DQMEventMsgView::protocolVersion(), DQMEventMsgView::reserved(), InitMsgBuilder::run(), EOFRecordView::run(), EventMsgView::run(), InitMsgView::run(), DQMEventMsgView::runNumber(), OtherMessageBuilder::size(), OtherMessageView::size(), StartIndexRecordHeader::StartIndexRecordHeader(), EOFRecordView::statusCode(), and DQMEventMsgView::updateNumber().

00031 { 
00032   // first four bytes are code,  LSB first
00033   unsigned int a=v[0], b=v[1], c=v[2], d=v[3];
00034   a|=(b<<8)|(c<<16)|(d<<24);
00035   return a;
00036 }

uint64 convert64 ( char_uint64  v  )  [inline]

Definition at line 21 of file MsgTools.h.

References a, b, c, d, e, f, g, and h.

Referenced by EOFRecordView::EOFRecordView(), EventIndexRecord::makeOffset(), StartIndexRecordHeader::StartIndexRecordHeader(), and DQMEventMsgView::timeStamp().

00022 {
00023   // first four bytes are code,  LSB first
00024   unsigned long long a=v[0], b=v[1], c=v[2], d=v[3];
00025   unsigned long long e=v[4], f=v[5], g=v[6], h=v[7];
00026   a|=(b<<8)|(c<<16)|(d<<24)|(e<<32)|(f<<40)|(g<<48)|(h<<56);
00027   return a;
00028 }


Generated on Tue Jun 9 17:54:18 2009 for CMSSW by  doxygen 1.5.4