Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
caen_correction.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file caen_correction.h
1 
2 #ifndef __CAEN_CORRECTION_H__
3 #define __CAEN_CORRECTION_H__
4 
5 #include <string>
6 
7 class Packet;
9 
10 public:
11 
12  // caen_correction ( const std::string chip0, const std::string chip1, const std::string chip2, const std::string chip3);
13  // caen_correction ( const char *chip0, const char *chip1, const char *chip2, const char *chip3);
14  caen_correction ( const char *calibdata);
15  virtual ~caen_correction () {};
16 
17  int init(Packet *p);
18 
19  float caen_corrected(const int sample, const int channel) const;
20  float caen_time(const int sample, const int channel) const;
21 
22  float caen_rollover(const int channel) const {
23  return (channel >= 0 && channel <= 31 ? timevec[1023][channel/8] : 0);
24  };
25 
26  // virtual void identify(std::ostream& os = std::cout) const;
27 
28  protected:
29  Packet *_p;
30  int _broken;
31 
32  int base[1024][4*9];
33  float timevec[1024][4];
34 
35  int current_wave[1024][4*9];
36  float current_time[1024][4];
37 
38 };
39 
40 #endif