gdata
Loading...
Searching...
No Matches
gIntegralPayload.h
Go to the documentation of this file.
1#pragma once
2
11#include "glogger.h"
12#include <vector>
13
15public:
25 GIntegralPayload(int c, int s, int ch, int q, int t, std::shared_ptr<GLogger> logger)
26 : log(logger), crate(c), slot(s), channel(ch), charge(q), time(t) {
27 log->debug(CONSTRUCTOR, "GIntegralPayload crate ", crate, " slot ", slot, " channel ", channel, " charge ",
28 charge, " time ", time);
29 }
30
35 log->debug(DESTRUCTOR, "GIntegralPayload crate ", crate, " slot ", slot, " channel ", channel, " charge ",
36 charge, " time ", time);
37 }
38
43 [[nodiscard]] std::vector<int> getPayload() const {
44 std::vector<int> payload;
45 payload.push_back(crate);
46 payload.push_back(slot);
47 payload.push_back(channel);
48 payload.push_back(charge);
49 payload.push_back(time);
50 return payload;
51 }
52
53private:
54 std::shared_ptr<GLogger> log;
55 int crate;
56 int slot;
57 int channel;
58 int charge;
59 int time;
60};
61
62
GIntegralPayload(int c, int s, int ch, int q, int t, std::shared_ptr< GLogger > logger)
Constructs a GIntegralPayload.
~GIntegralPayload()
Destructor for GIntegralPayload.
std::vector< int > getPayload() const
Returns the payload as a vector of integers.