1#ifndef CALIBRATION_H_INCLUDED
2#define CALIBRATION_H_INCLUDED
13#include "tof_typedefs.h"
21void spike_cleaning_drs4(Vec<Vec<f32>> &wf, u16 tCell, i32 spikes[]);
24void spike_cleaning_simple(Vec<Vec<f32>> &voltages,
bool calibrated =
true);
27void spike_cleaning_all(Vec<Vec<f32>> &voltages,
bool calibrated =
true);
34 static const u16 HEAD = 0xAAAA;
35 static const u16 TAIL = 0x5555;
36 static bool serialize_event_data;
44 Vec<Vec<f32>> v_offsets;
60 Vec<Vec<f32>> nanoseconds (
const RBEvent &event)
const;
63 Vec<f32> nanoseconds(
const RBEvent &event,
const u8 channel)
const;
74 bool discard_events =
true);
86 bool discard_events =
true);
98 bool channel_check(u8 channel)
const;
101std::ostream& operator<<(std::ostream& os,
const RBCalibration& pck);
Definition calibration.h:33
static RBCalibration from_bytestream(const Vec< u8 > &bytestream, u64 &pos, bool discard_events=true)
std::string to_string() const
String representation for printing.
static RBCalibration from_txtfile(const String &filename)
f32 d_v
voltage difference between noi and voltage data
Definition calibration.h:41
Vec< Vec< f32 > > voltages(const RBEvent &event, bool spike_cleaning=false) const
get the voltage values for the traces of the event
static void disable_eventdata()
Vec< RBEvent > noi_data
The no-input data used to calculate the constants.
Definition calibration.h:50
Vec< RBEvent > vcal_data
The constant voltage data used to calculate the constants.
Definition calibration.h:52
static RBCalibration from_file(const String &filename, bool discard_events=true)
u32 timestamp
timestamp when the calibration has been taken
Definition calibration.h:43
Vec< RBEvent > tcal_data
The timing calibration data used to calculate the constants.
Definition calibration.h:54
u8 rb_id
id of the RB this calibration belongs to
Definition calibration.h:39