Jpp
18.3.1
the software that should make you happy
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
software
DataQueue
DataFormats
daq_common_header.hh
Go to the documentation of this file.
1
#ifndef __DAQ_COMMON_HEADER_HH
2
#define __DAQ_COMMON_HEADER_HH
3
4
#include <stdint.h>
5
#include "
utctime.hh
"
6
#include <ostream>
7
8
/**
9
* \author cpellegrino
10
*/
11
12
struct
DAQCommonHeader
13
{
14
uint32_t
FrameLength
;
15
uint32_t
DataType
;
16
uint32_t
DetectorIdentifier
;
17
uint32_t
RunNumber
;
18
uint32_t
SequenceNumber
;
19
UTCTime
Timestamp
;
20
uint32_t
DOMIdentifier
;
21
uint16_t
NumberOfPackets
;
22
uint16_t
HighestPacketNumber
;
23
uint32_t
DOMStatus1
;
24
uint32_t
DOMStatus2
;
25
uint32_t
DOMStatus3
;
26
uint32_t
DOMStatus4
;
27
uint32_t
NumberOfItems
;
28
};
29
30
class
DAQHeaderPrinter
31
{
32
const
DAQCommonHeader
*
m_pointer
;
33
34
public
:
35
36
DAQHeaderPrinter
(
const
DAQCommonHeader
* pointer)
37
:
38
m_pointer
(pointer)
39
{}
40
41
DAQHeaderPrinter
(
const
char
* pointer)
42
:
43
m_pointer
(
44
static_cast<const
DAQCommonHeader
*>(
45
static_cast<const void*>(pointer)
46
)
47
)
48
{}
49
50
friend
51
std::ostream&
operator <<
(std::ostream& stream,
const
DAQHeaderPrinter
& header);
52
53
};
54
55
inline
56
std::ostream&
operator <<
(std::ostream& stream,
const
DAQHeaderPrinter
& header)
57
{
58
return
stream <<
"FrameLenght: "
<< header.
m_pointer
->
FrameLength
<<
'\n'
59
<<
"DataType: "
<< header.
m_pointer
->
DataType
<<
'\n'
60
<<
"DetectorId: "
<< header.
m_pointer
->
DetectorIdentifier
<<
'\n'
61
<<
"RunNumber: "
<< header.
m_pointer
->
RunNumber
<<
'\n'
62
<<
"SequenceNumber: "
<< header.
m_pointer
->
SequenceNumber
<<
'\n'
63
<<
"UTC time:\n"
64
<<
"Seconds: "
<< header.
m_pointer
->
Timestamp
.
Sec
<<
'\n'
65
<<
"Tics: "
<< header.
m_pointer
->
Timestamp
.
Tics
<<
'\n'
66
<<
"DOMIdentifier: "
<< header.
m_pointer
->
DOMIdentifier
<<
'\n'
67
<<
"DQStatus:\n"
68
<<
"NumberOfPackets: "
<< header.
m_pointer
->
NumberOfPackets
<<
'\n'
69
<<
"HighestPktNumber: "
<< header.
m_pointer
->
HighestPacketNumber
<<
'\n'
70
<<
"DOMStatus 1: "
<< header.
m_pointer
->
DOMStatus1
<<
'\n'
71
<<
"DOMStatus 2: "
<< header.
m_pointer
->
DOMStatus2
<<
'\n'
72
<<
"DOMStatus 3: "
<< header.
m_pointer
->
DOMStatus3
<<
'\n'
73
<<
"DOMStatus 4: "
<< header.
m_pointer
->
DOMStatus4
<<
'\n'
74
<<
"NumberOfItems: "
<< header.
m_pointer
->
NumberOfItems
;
75
}
76
77
#endif
DAQCommonHeader::SequenceNumber
uint32_t SequenceNumber
Definition:
daq_common_header.hh:18
DAQCommonHeader::NumberOfPackets
uint16_t NumberOfPackets
Definition:
daq_common_header.hh:21
UTCTime
Definition:
utctime.hh:12
DAQCommonHeader::DOMIdentifier
uint32_t DOMIdentifier
Definition:
daq_common_header.hh:20
DAQHeaderPrinter::DAQHeaderPrinter
DAQHeaderPrinter(const DAQCommonHeader *pointer)
Definition:
daq_common_header.hh:36
DAQHeaderPrinter::DAQHeaderPrinter
DAQHeaderPrinter(const char *pointer)
Definition:
daq_common_header.hh:41
DAQHeaderPrinter::operator<<
friend std::ostream & operator<<(std::ostream &stream, const DAQHeaderPrinter &header)
Definition:
daq_common_header.hh:56
DAQCommonHeader::HighestPacketNumber
uint16_t HighestPacketNumber
Definition:
daq_common_header.hh:22
DAQCommonHeader::DetectorIdentifier
uint32_t DetectorIdentifier
Definition:
daq_common_header.hh:16
DAQCommonHeader::DataType
uint32_t DataType
Definition:
daq_common_header.hh:15
DAQCommonHeader::DOMStatus4
uint32_t DOMStatus4
Definition:
daq_common_header.hh:26
DAQCommonHeader::FrameLength
uint32_t FrameLength
Definition:
daq_common_header.hh:14
DAQCommonHeader
Definition:
daq_common_header.hh:12
DAQCommonHeader::DOMStatus1
uint32_t DOMStatus1
Definition:
daq_common_header.hh:23
DAQCommonHeader::Timestamp
UTCTime Timestamp
Definition:
daq_common_header.hh:19
utctime.hh
DAQHeaderPrinter::m_pointer
const DAQCommonHeader * m_pointer
Definition:
daq_common_header.hh:32
DAQHeaderPrinter
Definition:
daq_common_header.hh:30
DAQCommonHeader::DOMStatus3
uint32_t DOMStatus3
Definition:
daq_common_header.hh:25
DAQCommonHeader::RunNumber
uint32_t RunNumber
Definition:
daq_common_header.hh:17
DAQCommonHeader::NumberOfItems
uint32_t NumberOfItems
Definition:
daq_common_header.hh:27
UTCTime::Tics
uint32_t Tics
Definition:
utctime.hh:15
operator<<
std::ostream & operator<<(std::ostream &stream, const CLBCommonHeader &header)
Definition:
clb_common_header.hh:72
DAQCommonHeader::DOMStatus2
uint32_t DOMStatus2
Definition:
daq_common_header.hh:24
UTCTime::Sec
uint32_t Sec
Definition:
utctime.hh:14
Generated by
1.8.5