Go from pointer to ifstream to ifstream.
[u/mrichter/AliRoot.git] / MUON / AliMUONTriggerGUIbdmap.h
CommitLineData
905654c2 1#ifndef ALIMUONTRIGGERGUIBDMAP_H
2#define ALIMUONTRIGGERGUIBDMAP_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7/// \ingroup evaluation
8/// \class AliMUONTriggerGUIbdmap
9/// \brief Trigger GUI utility class: single board map of the strips/digits
bae1aa70 10// Author Bogdan Vulpescu, LPC Clermont-Ferrand
905654c2 11
905654c2 12#include <TGFrame.h>
13
14class TCanvas;
15class TGCheckButton;
16class TGTextEdit;
17class TPolyLine;
18class TBox;
19class TPaveText;
20class TObjArray;
21class TH1F;
22class TLatex;
23class TGTableLayout;
24class TGLabel;
25
26class AliMUONTriggerGUIboard;
27class AliMUONTriggerGUI;
28class AliMUONTriggerCircuit;
f9eb4448 29class AliMUONTriggerCrateStore;
30class AliMUONMCDataInterface;
8b067dfe 31class AliMUONDigitStoreV1;
32class AliMUONTriggerStoreV1;
9671bf76 33class AliMUONCalibrationData;
905654c2 34class AliLoader;
905654c2 35
bae1aa70 36class AliMUONTriggerGUIbdmap : public TGFrame
905654c2 37{
38
905654c2 39public:
40
9671bf76 41 AliMUONTriggerGUIbdmap(const TGWindow *p, const TGWindow *mainWindow, UInt_t w, UInt_t h);
905654c2 42 virtual ~AliMUONTriggerGUIbdmap();
43
905654c2 44 /// set the name of the board gui window
bae1aa70 45 void SetName(const Char_t *name) { fMain->SetWindowName(name); };
905654c2 46 /// set the board associated to this instance
e1ac4804 47 void SetBoard(AliMUONTriggerGUIboard * const b) { fBoard = b; };
905654c2 48 /// set the board associated to this instance, from boards array and id
e1ac4804 49 void SetBoard(TObjArray * const boards, Int_t id) {
905654c2 50 fBoards = boards;
51 fBoard = (AliMUONTriggerGUIboard*)boards->UncheckedAt(id); }
52 /// set the current muon loader
e1ac4804 53 void SetLoader(AliLoader * const loader) { fLoader = loader; };
f9eb4448 54 /// set the MC data interface
e1ac4804 55 void SetMCDataInterface(AliMUONMCDataInterface * const mc) { fMCDataInterface = mc; };
8b067dfe 56 /// set the digit store from raw data
e1ac4804 57 void SetRawDigitStore(AliMUONDigitStoreV1 * const ds) { fRawDigitStore = ds; };
8b067dfe 58 /// set the trigger store from raw data
e1ac4804 59 void SetRawTriggerStore(AliMUONTriggerStoreV1 * const ts) { fRawTriggerStore = ts; };
8b067dfe 60
f9eb4448 61 /// set the trigger boards manager
e1ac4804 62 void SetCrateManager(AliMUONTriggerCrateStore * const crates) { fCrateManager = crates; };
905654c2 63
64 void Show();
65
66 void DrawStrips(Bool_t bx, Bool_t by);
67 void DrawDigits(Bool_t bx, Bool_t by);
68 void DrawClear();
69 void EditStrips(Int_t event, Int_t x, Int_t y, TObject *sel);
70
71 void Init();
72 void HandleButtons(Int_t id = -1);
73 void HandleEditButton();
8b067dfe 74 void CloseWindow() const;
905654c2 75 void DoClose();
76 void DoDigits();
77 void ResetDigits();
78 void LocalTriggerInfo();
79
80private:
bae1aa70 81 /// Not implemented
82 AliMUONTriggerGUIbdmap (const AliMUONTriggerGUIbdmap& bdmap);
83 /// Not implemented
84 AliMUONTriggerGUIbdmap& operator=(const AliMUONTriggerGUIbdmap& bdmap);
85
905654c2 86
87 enum { kNBoards = 234, kNMT = 4, kNS = 16 }; ///< constants
88
89 TGTransientFrame *fMain; ///< Main board frame
90 TCanvas *fCanvas[kNMT]; ///< MT canvases
91 TGTextEdit *fLocTrigE; ///< Window local trigger info
92
f9eb4448 93 AliMUONTriggerGUIboard *fBoard; ///< Current board object
94 AliLoader *fLoader; ///< The MUON loader
95 AliMUONMCDataInterface *fMCDataInterface; ///< MC data interface
8b067dfe 96 AliMUONDigitStoreV1 *fRawDigitStore; ///< Raw data digit store
97 AliMUONTriggerStoreV1 *fRawTriggerStore; ///< Raw data trigger store
905654c2 98
99 TGCheckButton *fXStrips; ///< Draw x-strips and digits
100 TGCheckButton *fYStrips; ///< Draw y-strips and digits
101 TGCheckButton *fEditStrips; ///< Set/unset the strips
102
103 TPolyLine *fXDigPL[kNMT][kNS]; ///< X-strip polyline
104 TPolyLine *fYDigPL[kNMT][kNS]; ///< Y-strip polyline
105 TBox *fXDigBox[kNMT][kNS]; ///< X-digit box
106 TBox *fYDigBox[kNMT][kNS]; ///< Y-digit box
107 TPaveText *fXLabelL[kNMT][kNS]; ///< X-strip labels left
108 TPaveText *fXLabelR[kNMT][kNS]; ///< X-strip labels right
109 TPaveText *fYLabelL[kNMT][kNS]; ///< Y-strip labels left
110 TPaveText *fYLabelR[kNMT][kNS]; ///< Y-strip labels right
111
112 Float_t fXWidth[kNMT]; ///< Board x-width
113 Float_t fYWidth[kNMT]; ///< Board y-width
114 Float_t fXCenter[kNMT]; ///< Board x-center
115 Float_t fYCenter[kNMT]; ///< Board y-center
116
117 Bool_t fXOn; ///< x-strips/digits on canvas ?
118 Bool_t fYOn; ///< y-strips/digits on canvas ?
119 Bool_t fLabelX; ///< x-labels exist
120 Bool_t fLabelY; ///< y-labels exist
121 Bool_t fIsEditable; ///< allows set/unset the strips
122
123 UInt_t fCanvasSize; ///< Size of the canvas
124 Int_t fNStripX; ///< Number of x-strips on board
125 Int_t fNStripY; ///< Number of y-strips on board
126
127 TObjArray *fBoards; ///< Array with all boards
128
f9eb4448 129 AliMUONCalibrationData *fCalibrationData; ///< Pointer to calibration data
130 AliMUONTriggerCrateStore *fCrateManager; ///< trigger boards manager
131
8b067dfe 132 ClassDef(AliMUONTriggerGUIbdmap,2) // board gui class
905654c2 133
134};
135
136#endif