CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Namespaces | Typedefs | Functions
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

 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 (uint32 i, char_uint32 v)
 
void convert (uint16 i, char_uint16 v)
 
void convert (uint64 li, char_uint64 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 ( uint32  i,
char_uint32  v 
)
inline

Definition at line 46 of file MsgTools.h.

47 {
48  v[0]=i&0xff;
49  v[1]=(i>>8)&0xff;
50  v[2]=(i>>16)&0xff;
51  v[3]=(i>>24)&0xff;
52 }
int i
Definition: DBlmapReader.cc:9
void convert ( uint16  i,
char_uint16  v 
)
inline

Definition at line 54 of file MsgTools.h.

55 {
56  v[0]=i&0xff;
57  v[1]=(i>>8)&0xff;
58 }
int i
Definition: DBlmapReader.cc:9
void convert ( uint64  li,
char_uint64  v 
)
inline

Definition at line 60 of file MsgTools.h.

61 {
62  v[0]=li&0xff;
63  v[1]=(li>>8)&0xff;
64  v[2]=(li>>16)&0xff;
65  v[3]=(li>>24)&0xff;
66  v[4]=(li>>32)&0xff;
67  v[5]=(li>>40)&0xff;
68  v[6]=(li>>48)&0xff;
69  v[7]=(li>>56)&0xff;
70 }
uint16 convert16 ( char_uint16  v)
inline

Definition at line 38 of file MsgTools.h.

References a, and b.

39 {
40  // first four bytes are code, LSB first
41  unsigned int a=v[0], b=v[1];
42  a|=(b<<8);
43  return a;
44 }
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
uint32 convert32 ( char_uint32  v)
inline

Definition at line 30 of file MsgTools.h.

References a, b, EnergyCorrector::c, and ztail::d.

Referenced by EventMsgView::droppedEventsCount(), InitMsgView::eventHeaderSize(), EventMsgView::EventMsgView(), HeaderView::HeaderView(), InitMsgView::InitMsgView(), EventMsgView::lumi(), EventMsgView::origDataSize(), EventMsgView::outModId(), edm::StreamerInputFile::readEventMessage(), InitMsgBuilder::run(), InitMsgView::run(), and EventMsgView::run().

31 {
32  // first four bytes are code, LSB first
33  unsigned int a=v[0], b=v[1], c=v[2], d=v[3];
34  a|=(b<<8)|(c<<16)|(d<<24);
35  return a;
36 }
tuple d
Definition: ztail.py:151
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
uint64 convert64 ( char_uint64  v)
inline

Definition at line 21 of file MsgTools.h.

References a, b, EnergyCorrector::c, ztail::d, alignCSCRings::e, f, g, and h.

Referenced by EventMsgView::event(), and edm::StreamerInputFile::readEventMessage().

22 {
23  // first four bytes are code, LSB first
24  unsigned long long a=v[0], b=v[1], c=v[2], d=v[3];
25  unsigned long long e=v[4], f=v[5], g=v[6], h=v[7];
26  a|=(b<<8)|(c<<16)|(d<<24)|(e<<32)|(f<<40)|(g<<48)|(h<<56);
27  return a;
28 }
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
tuple d
Definition: ztail.py:151
double f[11][100]
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121