src
IOPool
Streamer
interface
MsgHeader.h
Go to the documentation of this file.
1
#ifndef IOPool_Streamer_MsgHeader_h
2
#define IOPool_Streamer_MsgHeader_h
3
4
#include "
IOPool/Streamer/interface/MsgTools.h
"
5
// as it is in memory of file
6
namespace
edm::streamer
{
7
struct
Header
{
8
Header
(
uint32
code,
uint32
size) :
code_
(code) {
convert
(size,
size_
); }
9
10
uint8
code_
;
// type of the message
11
char_uint32
size_
;
// of entire message including all headers
12
13
// 20-Jul-2006, KAB: added enumeration for message types
14
enum
Codes
{
15
INVALID
= 0,
16
INIT
= 1,
17
EVENT
= 2,
18
DONE
= 3,
// EOFRECORD = 4 is no longer used
19
HEADER_REQUEST
= 5,
20
EVENT_REQUEST
= 6,
21
CONS_REG_REQUEST
= 7,
22
CONS_REG_RESPONSE
= 8,
23
DQM_INIT
= 9,
24
DQM_EVENT
= 10,
25
DQMEVENT_REQUEST
= 11,
26
INIT_SET
= 12,
27
NEW_INIT_AVAILABLE
= 13,
28
ERROR_EVENT
= 14,
29
FILE_CLOSE_REQUEST
= 15,
30
SPARE1
= 16,
31
SPARE2
= 17,
32
PADDING
= 255
//reserved for padding
33
};
34
};
35
36
// as we need to see it
37
class
HeaderView
{
38
public
:
39
HeaderView
(
void
*
buf
) {
40
Header
*
h
= (
Header
*)
buf
;
41
code_
=
h
->code_;
42
size_
=
convert32
(
h
->size_);
43
}
44
45
uint32
code
()
const
{
return
code_
; }
46
uint32
size
()
const
{
return
size_
; }
47
48
private
:
49
uint32
code_
;
50
uint32
size_
;
51
};
52
}
// namespace edm::streamer
53
#endif
edm::streamer::convert
void convert(uint32 i, char_uint32 v)
Definition:
MsgTools.h:43
edm::streamer::Header::Codes
Codes
Definition:
MsgHeader.h:14
edm::streamer::Header::DONE
Definition:
MsgHeader.h:18
edm::streamer::Header::SPARE1
Definition:
MsgHeader.h:30
edm::streamer::Header::CONS_REG_REQUEST
Definition:
MsgHeader.h:21
edm::streamer::Header::CONS_REG_RESPONSE
Definition:
MsgHeader.h:22
edm::streamer::Header::SPARE2
Definition:
MsgHeader.h:31
edm::streamer::convert32
uint32 convert32(char_uint32 v)
Definition:
MsgTools.h:29
edm::streamer::Header::INIT
Definition:
MsgHeader.h:16
visDQMUpload.buf
buf
Definition:
visDQMUpload.py:153
edm::streamer::uint8
unsigned char uint8
Definition:
MsgTools.h:12
edm::streamer::HeaderView
Definition:
MsgHeader.h:37
edm::streamer
Definition:
WatcherStreamFileReader.h:22
edm::streamer::HeaderView::size
uint32 size() const
Definition:
MsgHeader.h:46
edm::streamer::Header::FILE_CLOSE_REQUEST
Definition:
MsgHeader.h:29
edm::streamer::Header::code_
uint8 code_
Definition:
MsgHeader.h:10
edm::streamer::Header
Definition:
MsgHeader.h:7
edm::streamer::HeaderView::code
uint32 code() const
Definition:
MsgHeader.h:45
edm::streamer::HeaderView::HeaderView
HeaderView(void *buf)
Definition:
MsgHeader.h:39
edm::streamer::Header::HEADER_REQUEST
Definition:
MsgHeader.h:19
edm::streamer::Header::EVENT_REQUEST
Definition:
MsgHeader.h:20
edm::streamer::HeaderView::size_
uint32 size_
Definition:
MsgHeader.h:50
edm::streamer::Header::INIT_SET
Definition:
MsgHeader.h:26
edm::streamer::Header::DQMEVENT_REQUEST
Definition:
MsgHeader.h:25
edm::streamer::Header::EVENT
Definition:
MsgHeader.h:17
edm::streamer::char_uint32
unsigned char char_uint32[sizeof(uint32)]
Definition:
MsgTools.h:17
edm::streamer::Header::ERROR_EVENT
Definition:
MsgHeader.h:28
edm::streamer::Header::INVALID
Definition:
MsgHeader.h:15
edm::streamer::Header::Header
Header(uint32 code, uint32 size)
Definition:
MsgHeader.h:8
edm::streamer::HeaderView::code_
uint32 code_
Definition:
MsgHeader.h:49
edm::streamer::Header::DQM_INIT
Definition:
MsgHeader.h:23
MsgTools.h
edm::streamer::Header::DQM_EVENT
Definition:
MsgHeader.h:24
edm::streamer::Header::NEW_INIT_AVAILABLE
Definition:
MsgHeader.h:27
edm::streamer::uint32
unsigned int uint32
Definition:
MsgTools.h:14
h
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition:
Activities.doc:4
edm::streamer::Header::size_
char_uint32 size_
Definition:
MsgHeader.h:11
edm::streamer::Header::PADDING
Definition:
MsgHeader.h:32
Generated for CMSSW Reference Manual by
1.8.14