gdata
Loading...
Searching...
No Matches
gIntegralPayload.h
Go to the documentation of this file.
1
#pragma once
2
20
#include "
glogger.h
"
21
#include <vector>
22
36
struct
GIntegralPayload
37
{
38
public
:
53
GIntegralPayload
(
int
c,
int
s,
int
ch,
int
q,
int
t, std::shared_ptr<GLogger> logger)
54
: log(logger), crate(c), slot(s), channel(ch), charge(q), time(t) {
55
log->
debug
(
CONSTRUCTOR
,
"GIntegralPayload crate "
, crate,
" slot "
, slot,
" channel "
, channel,
" charge "
,
56
charge,
" time "
, time);
57
}
58
66
~GIntegralPayload
() {
67
log->
debug
(
DESTRUCTOR
,
"GIntegralPayload crate "
, crate,
" slot "
, slot,
" channel "
, channel,
" charge "
,
68
charge,
" time "
, time);
69
}
70
87
[[nodiscard]] std::vector<int>
getPayload
()
const
{
88
std::vector<int> payload;
89
payload.push_back(crate);
90
payload.push_back(slot);
91
payload.push_back(channel);
92
payload.push_back(charge);
93
payload.push_back(time);
94
return
payload;
95
}
96
97
private
:
98
std::shared_ptr<GLogger> log;
99
int
crate;
100
int
slot;
101
int
channel;
102
int
charge;
103
int
time;
104
};
GLogger::debug
void debug(debug_type type, Args &&... args) const
glogger.h
CONSTRUCTOR
CONSTRUCTOR
DESTRUCTOR
DESTRUCTOR
GIntegralPayload
Stores one integrated readout payload sample.
Definition
gIntegralPayload.h:37
GIntegralPayload::GIntegralPayload
GIntegralPayload(int c, int s, int ch, int q, int t, std::shared_ptr< GLogger > logger)
Construct an integral payload.
Definition
gIntegralPayload.h:53
GIntegralPayload::~GIntegralPayload
~GIntegralPayload()
Destructor.
Definition
gIntegralPayload.h:66
GIntegralPayload::getPayload
std::vector< int > getPayload() const
Exports the payload as a fixed-order vector of integers.
Definition
gIntegralPayload.h:87
frame
gIntegralPayload.h
Generated by
1.10.0