source: trunk/MagicSoft/Cosy/main/MCaos.h@ 5059

Last change on this file since 5059 was 4865, checked in by rwagner, 20 years ago
*** empty log message ***
File size: 1.7 KB
Line 
1#ifndef CAOS_MCaos
2#define CAOS_MCaos
3
4#ifndef CAOS_Leds
5#include "Leds.h"
6#endif
7#ifndef CAOS_Ring
8#include "Ring.h"
9#endif
10
11#ifndef COSY_PixClient
12#include "PixClient.h" // byte
13#endif
14
15class TFile;
16class TH1F;
17class TH2F;
18class TGraph;
19
20class MTime;
21class ZdAz;
22
23class MCaos
24{
25private:
26 TFile *fFile; // File we may write data to
27
28 Leds fPositions;
29
30 Leds *fLeds;
31 Double_t fEvtTime;
32 Double_t fZenithDist;
33 Double_t fAzimuth;
34
35 TH1F *fHistpr;
36 TH2F **fHistled;
37 TH1F *fHistallw;
38 TH1F **fHistw;
39
40 TH2F *fHistprxpry;
41
42 TGraph *fGraphprx;
43 TGraph *fGraphpry;
44 TGraph *fGraphw;
45 TGraph *fGraphr;
46
47 Short_t fMinNumberLeds;
48 Double_t fMinRadius;
49 Double_t fMaxRadius;
50
51public:
52 MCaos() : fFile(NULL), fHistpr(NULL), fMinNumberLeds(5), fMinRadius(265), fMaxRadius(268)
53 {
54 fLeds = new Leds;
55 }
56
57 ~MCaos()
58 {
59 CloseFile();
60 DeleteHistograms();
61 delete fLeds;
62 }
63
64 void AddPosition(Float_t x, Float_t y, Float_t dx, Float_t dy)
65 {
66 fPositions.Add(x, y, dx, dy);
67 }
68
69 void ReadResources(const char *name="leds.txt");
70
71 void OpenFile();
72 void CloseFile();
73
74 void SetMinNumberRings(Short_t n)
75 {
76 fMinNumberLeds = n;
77 }
78
79 void SetRadii(Double_t min, Double_t max)
80 {
81 fMinRadius=min;
82 fMaxRadius=max;
83 }
84
85 void InitHistograms();
86 void DeleteHistograms();
87 void ShowHistograms();
88 void ResetHistograms();
89
90 Ring Run(byte *img, bool printl, bool printr, const ZdAz &pos,
91 const MTime &t, Double_t box, Double_t cut);
92};
93
94#endif
Note: See TracBrowser for help on using the repository browser.