34 lines
1.2 KiB
C++
34 lines
1.2 KiB
C++
// Copyright (2019-2022) Paul Scherrer Institute
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
#ifndef JUNGFRAUJOCH_JFCONVERSIONFLOATINGPOINT_H
|
|
#define JUNGFRAUJOCH_JFCONVERSIONFLOATINGPOINT_H
|
|
|
|
#include "JFConversion.h"
|
|
|
|
class JFConversionFloatingPoint : public JFConversion {
|
|
|
|
std::vector<uint16_t> pedestal_g0;
|
|
std::vector<uint16_t> pedestal_g1;
|
|
std::vector<uint16_t> pedestal_g2;
|
|
std::vector<float> gain_g0;
|
|
std::vector<float> gain_g1;
|
|
std::vector<float> gain_g2;
|
|
void ConvertLine(int16_t *dest, const uint16_t *source, int line);
|
|
public:
|
|
JFConversionFloatingPoint();
|
|
|
|
void Setup(const JFModuleGainCalibration &gain_calibration,
|
|
const JFModulePedestal &pedestal_g0,
|
|
const JFModulePedestal &pedestal_g1,
|
|
const JFModulePedestal &pedestal_g2,
|
|
double energy) override;
|
|
void ConvertPacket(int16_t* dest, const uint16_t* source, uint16_t packet_number) override;
|
|
void ConvertFP(float *dest, const uint16_t *source);
|
|
void ConvertAdjustGeom(int16_t *dest, const uint16_t *source, int64_t slow_dir_step,
|
|
int64_t fast_dir_step, int64_t offset) override;
|
|
};
|
|
|
|
|
|
#endif //JUNGFRAUJOCH_JFCONVERSIONFLOATINGPOINT_H
|