]>
Commit | Line | Data |
---|---|---|
905654c2 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | ||
37391c63 | 16 | // $Id$ |
17 | ||
3d1463c8 | 18 | //----------------------------------------------------------------------------- |
37391c63 | 19 | /// \class AliMUONTriggerGUIboard |
20 | /// | |
21 | /// Single trigger board object with geometry information, strips and digits | |
22 | /// | |
23 | /// \author Bogdan Vulpescu, LPC Clermont-Ferrand | |
3d1463c8 | 24 | //----------------------------------------------------------------------------- |
905654c2 | 25 | |
26 | #include <TBox.h> | |
27 | ||
28 | #include "AliMUONTriggerGUIboard.h" | |
29 | ||
30 | /// \cond CLASSIMP | |
31 | ClassImp(AliMUONTriggerGUIboard) | |
32 | /// \endcond | |
33 | ||
34 | //__________________________________________________________________________ | |
35 | AliMUONTriggerGUIboard::AliMUONTriggerGUIboard(Int_t id, Char_t *name) | |
36 | : TObject(), | |
37 | fName(0), | |
38 | fID(-1), | |
39 | fStatus(0), | |
40 | fPosition(0), | |
41 | fYOver(0), | |
42 | fXSix(0), | |
43 | fXSiy1(0), | |
44 | fXSiy2(0), | |
45 | fYSix1(0), | |
46 | fYSix2(0), | |
47 | fYSiy(0), | |
48 | fDetElemId(0), | |
49 | fIdCircuit(-1), | |
50 | fIsOpen(0) | |
51 | { | |
52 | /// board main constructor | |
53 | ||
54 | fName = new TString(name); | |
55 | fID = id; | |
56 | ||
57 | for (Int_t i = 0; i < kNMT; i++) { | |
58 | fXCenter[i] = 0.; | |
59 | fYCenter[i] = 0.; | |
60 | fZCenter[i] = 0.; | |
61 | fXWidth[i] = 0.; | |
62 | fYWidth[i] = 0.; | |
63 | for (Int_t is = 0; is < kNS; is++) { | |
64 | fXDig[i][is] = 0; | |
65 | fYDig[i][is] = 0; | |
66 | fXDigBox[i][is] = new TBox(0,0,0,0); | |
67 | fYDigBox[i][is] = new TBox(0,0,0,0); | |
68 | fXDigBox[i][is]->SetBit(kCannotPick); | |
69 | fYDigBox[i][is]->SetBit(kCannotPick); | |
70 | fXDigBox[i][is]->SetFillStyle(1001); | |
71 | fYDigBox[i][is]->SetFillStyle(1001); | |
72 | fXDigBox[i][is]->SetFillColor(4); | |
73 | fYDigBox[i][is]->SetFillColor(4); | |
74 | } | |
75 | } | |
76 | ||
77 | fXSix = -1; | |
78 | fXSiy1 = -1; | |
79 | fXSiy2 = -1; | |
80 | ||
81 | fYSix1 = -1; | |
82 | fYSix2 = -1; | |
83 | fYSiy = -1; | |
84 | ||
85 | fDetElemId = -1; | |
86 | fIdCircuit = -1; | |
87 | ||
88 | fIsOpen = kFALSE; | |
89 | ||
90 | fYOver = 0; | |
91 | fPosition = 0; | |
92 | ||
93 | } | |
94 | ||
95 | //__________________________________________________________________________ | |
96 | AliMUONTriggerGUIboard::~AliMUONTriggerGUIboard() | |
97 | { | |
98 | /// board destructor | |
99 | ||
100 | delete fName; | |
101 | ||
102 | for (Int_t imt = 0; imt < kNMT; imt++) { | |
103 | for (Int_t is = 0; is < kNS; is++) { | |
104 | delete fXDigBox[imt][is]; | |
105 | delete fYDigBox[imt][is]; | |
106 | } | |
107 | } | |
108 | ||
109 | } | |
110 | ||
905654c2 | 111 | //__________________________________________________________________________ |
112 | void AliMUONTriggerGUIboard::SetXDigBox(Int_t imt, Int_t is, Double_t x1, Double_t y1, Double_t x2, Double_t y2) | |
113 | { | |
114 | /// set coordinates of "is" x-strip box in chamber "imt" | |
115 | ||
116 | fXDigBox[imt][is]->SetX1(x1); | |
117 | fXDigBox[imt][is]->SetY1(y1); | |
118 | fXDigBox[imt][is]->SetX2(x2); | |
119 | fXDigBox[imt][is]->SetY2(y2); | |
120 | ||
121 | } | |
122 | ||
123 | //__________________________________________________________________________ | |
124 | void AliMUONTriggerGUIboard::SetYDigBox(Int_t imt, Int_t is, Double_t x1, Double_t y1, Double_t x2, Double_t y2) | |
125 | { | |
126 | /// set coordinates of "is" y-strip box in chamber "imt" | |
127 | ||
128 | fYDigBox[imt][is]->SetX1(x1); | |
129 | fYDigBox[imt][is]->SetY1(y1); | |
130 | fYDigBox[imt][is]->SetX2(x2); | |
131 | fYDigBox[imt][is]->SetY2(y2); | |
132 | ||
133 | } | |
134 | ||
135 | //__________________________________________________________________________ | |
136 | void AliMUONTriggerGUIboard::ClearXDigits() | |
137 | { | |
138 | /// delete the set x-digits | |
139 | ||
140 | for (Int_t imt = 0; imt < kNMT; imt++) { | |
141 | for (Int_t is = 0; is < kNS; is++) { | |
142 | fXDig[imt][is] = 0; | |
143 | } | |
144 | } | |
145 | ||
146 | } | |
147 | ||
148 | //__________________________________________________________________________ | |
149 | void AliMUONTriggerGUIboard::ClearYDigits() | |
150 | { | |
151 | /// delete the set y-digits | |
152 | ||
153 | for (Int_t imt = 0; imt < kNMT; imt++) { | |
154 | for (Int_t is = 0; is < kNS; is++) { | |
155 | fYDig[imt][is] = 0; | |
156 | } | |
157 | } | |
158 | ||
159 | } |