mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-21 19:30:03 +02:00
fixes fro review
This commit is contained in:
parent
cdfd3934ee
commit
f497177022
@ -1389,8 +1389,8 @@ void Module::setInjectChannel(const int offsetChannel,
|
|||||||
sendToDetector(F_SET_INJECT_CHANNEL, args, nullptr);
|
sendToDetector(F_SET_INJECT_CHANNEL, args, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::sendVetoPhoton(const int chipIndex, std::vector<int> gainIndices,
|
void Module::sendVetoPhoton(const int chipIndex, const std::vector<int>& gainIndices,
|
||||||
std::vector<int> values) {
|
const std::vector<int>& values) {
|
||||||
const int nch = gainIndices.size();
|
const int nch = gainIndices.size();
|
||||||
if (gainIndices.size() != values.size()) {
|
if (gainIndices.size() != values.size()) {
|
||||||
throw RuntimeError("Number of Gain Indices and values do not match! "
|
throw RuntimeError("Number of Gain Indices and values do not match! "
|
||||||
@ -1406,6 +1406,8 @@ void Module::sendVetoPhoton(const int chipIndex, std::vector<int> gainIndices,
|
|||||||
auto client = DetectorSocket(shm()->hostname, shm()->controlPort);
|
auto client = DetectorSocket(shm()->hostname, shm()->controlPort);
|
||||||
client.Send(&fnum, sizeof(fnum));
|
client.Send(&fnum, sizeof(fnum));
|
||||||
client.Send(args, sizeof(args));
|
client.Send(args, sizeof(args));
|
||||||
|
client.Send(gainIndices.data(), sizeof(decltype(gainIndices[0])) * nch);
|
||||||
|
client.Send(values.data(), sizeof(decltype(values[0])) * nch);
|
||||||
client.Send(gainIndices.data(), sizeof(int) * nch);
|
client.Send(gainIndices.data(), sizeof(int) * nch);
|
||||||
client.Send(values.data(), sizeof(int) * nch);
|
client.Send(values.data(), sizeof(int) * nch);
|
||||||
client.Receive(&ret, sizeof(ret));
|
client.Receive(&ret, sizeof(ret));
|
||||||
|
@ -371,8 +371,8 @@ class Module : public virtual slsDetectorDefs {
|
|||||||
void setBurstPeriod(int64_t value);
|
void setBurstPeriod(int64_t value);
|
||||||
std::array<int, 2> getInjectChannel() const;
|
std::array<int, 2> getInjectChannel() const;
|
||||||
void setInjectChannel(const int offsetChannel, const int incrementChannel);
|
void setInjectChannel(const int offsetChannel, const int incrementChannel);
|
||||||
void sendVetoPhoton(const int chipIndex, std::vector<int> gainIndices,
|
void sendVetoPhoton(const int chipIndex, const std::vector<int>& gainIndices,
|
||||||
std::vector<int> values);
|
const std::vector<int>& values);
|
||||||
void getVetoPhoton(const int chipIndex, const std::string &fname) const;
|
void getVetoPhoton(const int chipIndex, const std::string &fname) const;
|
||||||
void setVetoPhoton(const int chipIndex, const int numPhotons,
|
void setVetoPhoton(const int chipIndex, const int numPhotons,
|
||||||
const int energy, const std::string &fname);
|
const int energy, const std::string &fname);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user