Jpp 19.3.0-rc.1
the software that should make you happy
Loading...
Searching...
No Matches
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
13{
14 uint32_t FrameLength;
15 uint32_t DataType;
17 uint32_t RunNumber;
20 uint32_t DOMIdentifier;
23 uint32_t DOMStatus1;
24 uint32_t DOMStatus2;
25 uint32_t DOMStatus3;
26 uint32_t DOMStatus4;
27 uint32_t NumberOfItems;
28};
29
31{
33
34 public:
35
37 :
38 m_pointer(pointer)
39 {}
40
41 DAQHeaderPrinter(const char* pointer)
42 :
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
55inline
56std::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
const DAQCommonHeader * m_pointer
DAQHeaderPrinter(const char *pointer)
DAQHeaderPrinter(const DAQCommonHeader *pointer)
friend std::ostream & operator<<(std::ostream &stream, const DAQHeaderPrinter &header)
std::ostream & operator<<(std::ostream &stream, const DAQHeaderPrinter &header)
uint32_t Sec
Definition utctime.hh:14
uint32_t Tics
Definition utctime.hh:15