File indexing completed on 2025-08-03 08:20:43
0001
0002 #ifndef __CAEN_CORRECTION_H__
0003 #define __CAEN_CORRECTION_H__
0004
0005 #include <string>
0006
0007 class Packet;
0008 class caen_correction {
0009
0010 public:
0011
0012
0013
0014 caen_correction ( const char *calibdata);
0015 virtual ~caen_correction () {};
0016
0017 int init(Packet *p);
0018
0019 float caen_corrected(const int sample, const int channel) const;
0020 float caen_time(const int sample, const int channel) const;
0021
0022 float caen_rollover(const int channel) const {
0023 return (channel >= 0 && channel <= 31 ? timevec[1023][channel/8] : 0);
0024 };
0025
0026
0027
0028 protected:
0029 Packet *_p;
0030 int _broken;
0031 int _samples;
0032
0033 int base[1024][4*9];
0034 float timevec[1024][4];
0035
0036 int current_wave[1024][4*9];
0037 float current_time[1024][4];
0038
0039 };
0040
0041 #endif