PandaRoot
ReadMainzProto60v6.h
Go to the documentation of this file.
1 /****************************************************
2  * ReadMainzProto60v6 class to read data files from
3  * the proto60 tests at mami
4  *
5  * author: chammann@hiskp.uni-bonn.de
6  * date: 10.5.2010
7  *
8  * *************************************************/
9 
10 #ifndef ReadMainzProto60v6_h
11 #define ReadMainzProto60v6_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  ReadMainzProto60v6(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  double LG_VETO[8];
50  double TIME_VETO[8];
51 
52  double LG_CAL[60];
53  double TIME_CAL[60];
54  double TAGGER_CAL[16];
55  double TP_CAL;
56  double MU_CAL;
57  double VETO_CAL;
58 
59  char starttime[30];
60  char stoptime[30];
61 
62  unsigned int rawdata[32][16];
63  unsigned int noe_of_board[16];
64  int no_of_boards, what[16], geos[16];
65  unsigned int geo_to_bnr[44];
66  char versionsstr[15];
67 
68  int central;
69 
70  double lg_factor[60];
71  double lg_ped[60];
72  double ctime_factor;
73  Bool_t IsInit;
74 
75  ClassDef(ReadMainzProto60v6, 1)
76 };
77 #endif
void GetADCValues(Double_t *ADCs)
void GetTaggerEnergies(Double_t *taggerEnergies)
void GetEnergies(Double_t *energies)
void GetTaggerTimes(Double_t *taggertimes)
Long_t GetNumberOfEvents()
Long_t ReadNextEvent()
void GetTimes(Double_t *times)