gdata
Loading...
Searching...
No Matches
gIntegralPayload.h
Go to the documentation of this file.
1#pragma once
2
19
20#include <gemc/glogging/glogger.h>
21#include <vector>
22
31
37{
38public:
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(
56 CONSTRUCTOR, "GIntegralPayload crate %1 slot %2 channel %3 charge %4 time %5", crate, slot, channel,
57 charge, time);
58 }
59
68 log->debug(
69 DESTRUCTOR, "GIntegralPayload crate %1 slot %2 channel %3 charge %4 time %5", crate, slot, channel,
70 charge, time);
71 }
72
89 [[nodiscard]] std::vector<int> getPayload() const {
90 std::vector<int> payload;
91 payload.push_back(crate);
92 payload.push_back(slot);
93 payload.push_back(channel);
94 payload.push_back(charge);
95 payload.push_back(time);
96 return payload;
97 }
98
99private:
100 std::shared_ptr<GLogger> log;
101 int crate;
102 int slot;
103 int channel;
104 int charge;
105 int time;
106};
CONSTRUCTOR
DESTRUCTOR
GIntegralPayload(int c, int s, int ch, int q, int t, std::shared_ptr< GLogger > logger)
Construct an integral payload.
~GIntegralPayload()
Destructor.
std::vector< int > getPayload() const
Exports the payload as a fixed-order vector of integers.