PandaRoot
ReadMainzProto60v4.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 /****************************************************
14  * ReadMainzProto60v4 class to read data files from
15  * the proto60 tests at mami
16  *
17  * author: chammann@hiskp.uni-bonn.de
18  * date: 6.1.2010
19  *
20  * *************************************************/
21 
22 #ifndef ReadMainzProto60v4_h
23 #define ReadMainzProto60v4_h
24 #include "TObject.h"
25 #include "ReadMainzProto60.h"
26 
28  public:
29  void GetEnergies(Double_t *energies); // energies has to be at least 60 long
30  void GetTimes(Double_t *times); // times has to be at least 60 long
31  void GetADCValues(Double_t *ADCs); // ADCs has to be at least 60 long
32  void GetTaggerTimes(Double_t *taggertimes); // taggertimes has to be at least 16 long
33  void GetTaggerEnergies(Double_t *taggerEnergies); // taggertimes has to be at least 16 long
34 
35  void Reset();
36 
37  void PrintEvent();
38 
39  Long_t ReadNextEvent(); // returns total number of events read, -1 if no event could be read (end of file)
40  Long_t GetNumberOfEvents();
41 
43  ReadMainzProto60v4(const char *datafilename, const char *calibrationfilename);
45 
46  private:
47  FILE *in;
48  unsigned int read_one_event();
49  Bool_t ResetToFirstEvent;
50  void convert_60(void);
51  void calibrate_60(void);
52  void read_energy_factor(const char *filename);
53  Long_t NumberOfEvents;
54 
55  double LG[60];
56  double TIME[60];
57  double TAGGER[16];
58  double TP;
59  double MU;
60  double VETO;
61 
62  double LG_CAL[60];
63  double TIME_CAL[60];
64  double TAGGER_CAL[16];
65  double TP_CAL;
66  double MU_CAL;
67  double VETO_CAL;
68 
69  unsigned int rawdata[32][16];
70  unsigned int noe_of_board[16];
71  int no_of_boards, what[16], geos[16];
72  unsigned int geo_to_bnr[32];
73  char versionsstr[15];
74 
75  int RANGE, BINS;
76  int CAL_RANGE, CAL_BINS;
77  int central;
78 
79  double lg_factor[60];
80  double lg_ped[60];
81  double ctime_factor;
82  Bool_t IsInit;
83 
84  ClassDef(ReadMainzProto60v4, 1)
85 };
86 #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)