PandaRoot
ReadMainzProto60v4.h
Go to the documentation of this file.
1 /****************************************************
2  * ReadMainzProto60v4 class to read data files from
3  * the proto60 tests at mami
4  *
5  * author: chammann@hiskp.uni-bonn.de
6  * date: 6.1.2010
7  *
8  * *************************************************/
9 
10 #ifndef ReadMainzProto60v4_h
11 #define ReadMainzProto60v4_h
12 #include "TObject.h"
13 #include "ReadMainzProto60.h"
14 
16  public:
17  void GetEnergies(Double_t *energies); // energies has to be at least 60 long
18  void GetTimes(Double_t *times); // times has to be at least 60 long
19  void GetADCValues(Double_t *ADCs); // ADCs has to be at least 60 long
20  void GetTaggerTimes(Double_t *taggertimes); // taggertimes has to be at least 16 long
21  void GetTaggerEnergies(Double_t *taggerEnergies); // taggertimes has to be at least 16 long
22 
23  void Reset();
24 
25  void PrintEvent();
26 
27  Long_t ReadNextEvent(); // returns total number of events read, -1 if no event could be read (end of file)
28  Long_t GetNumberOfEvents();
29 
31  ReadMainzProto60v4(const char *datafilename, const char *calibrationfilename);
33 
34  private:
35  FILE *in;
36  unsigned int read_one_event();
37  Bool_t ResetToFirstEvent;
38  void convert_60(void);
39  void calibrate_60(void);
40  void read_energy_factor(const char *filename);
41  Long_t NumberOfEvents;
42 
43  double LG[60];
44  double TIME[60];
45  double TAGGER[16];
46  double TP;
47  double MU;
48  double VETO;
49 
50  double LG_CAL[60];
51  double TIME_CAL[60];
52  double TAGGER_CAL[16];
53  double TP_CAL;
54  double MU_CAL;
55  double VETO_CAL;
56 
57  unsigned int rawdata[32][16];
58  unsigned int noe_of_board[16];
59  int no_of_boards, what[16], geos[16];
60  unsigned int geo_to_bnr[32];
61  char versionsstr[15];
62 
63  int RANGE, BINS;
64  int CAL_RANGE, CAL_BINS;
65  int central;
66 
67  double lg_factor[60];
68  double lg_ped[60];
69  double ctime_factor;
70  Bool_t IsInit;
71 
72  ClassDef(ReadMainzProto60v4, 1)
73 };
74 #endif
Long_t ReadNextEvent()
void GetEnergies(Double_t *energies)
Long_t GetNumberOfEvents()
void GetTaggerEnergies(Double_t *taggerEnergies)
void GetTimes(Double_t *times)
void GetTaggerTimes(Double_t *taggertimes)
void GetADCValues(Double_t *ADCs)