122 {
123 BesView* view = dynamic_cast<BesView*>( gPad->GetView() );
124
126 {
128 }
130 {
131
132 if ( gPad ) gPad->SetCursor( kPointer );
133
134 Int_t width, color;
135 Int_t normalWidth = 1, hlWidth = 2;
136
137 switch ( event )
138 {
139 case kMouseEnter:
140 if ( fType == 0 )
141 {
143 {
144 for ( Int_t i = 0; i < fHits.GetEntries(); i++ )
145 {
146 Mdc2DWire* aHit = (Mdc2DWire*)fHits.At( i );
147 if ( aHit != 0 )
148 {
150 }
151 }
152 }
153 }
154 else if ( fType == 1 )
155 {
157 {
158 for ( Int_t i = 0; i < fHits.GetEntries(); i++ )
159 {
160 Tof2DScin* aHit = (Tof2DScin*)fHits.At( i );
161 if ( aHit != 0 )
162 {
167 }
168 }
169 }
170 }
171 else if ( fType == 2 )
172 {
174 {
175 for ( Int_t i = 0; i < fHits.GetEntries(); i++ )
176 {
177 Emc2DCrystal* aHit = (Emc2DCrystal*)fHits.At( i );
178 if ( aHit != 0 )
179 {
184 }
185 }
186 }
187 }
188 else if ( fType == 3 )
189 {
191 {
192 for ( Int_t i = 0; i < fHits.GetEntries(); i++ )
193 {
194 Muc2DStrip* aHit = (Muc2DStrip*)fHits.At( i );
195 if ( aHit != 0 )
196 {
198 }
199 }
200 }
201 }
202
203 if ( fType == 0 )
204 {
205 width = this->GetLineWidth();
206 color = this->GetLineColor();
209 }
210 else if ( fType == 1 ) { fMarker->SetMarkerColor( kMagenta ); }
211 else if ( fType == 2 ) { fMarker->SetMarkerColor( kMagenta ); }
212 else if ( fType == 3 )
213 {
214 width = this->GetLineWidth();
215 color = this->GetLineColor();
218 }
219 else if ( fType == 4 )
220 {
223 }
224 else if ( fType == 6 || fType == 7 )
225 {
226 fMarker->SetMarkerColor( kViolet );
227 fMarker->SetMarkerStyle( 8 );
228 }
229
230 fTip->SetPos( px, py );
232
233
234
236 gPad->Modified();
237 gPad->Update();
238 break;
239
240 case kMouseLeave:
241 if ( fType == 0 )
242 {
243 for ( Int_t i = 0; i < (Int_t)fHits.GetEntries(); i++ )
244 {
245 Mdc2DWire* aHit = (Mdc2DWire*)fHits.At( i );
247 }
248 }
249 else if ( fType == 1 )
250 {
251 for ( Int_t i = 0; i < fHits.GetEntries(); i++ )
252 {
253 Tof2DScin* aHit = (Tof2DScin*)fHits.At( i );
255 }
256 }
257 else if ( fType == 2 )
258 {
259 for ( Int_t i = 0; i < fHits.GetEntries(); i++ )
260 {
261 Emc2DCrystal* aHit = (Emc2DCrystal*)fHits.At( i );
263 }
264 }
265 else if ( fType == 3 )
266 {
267 for ( Int_t i = 0; i < (Int_t)fHits.GetEntries(); i++ )
268 {
269 Muc2DStrip* aHit = (Muc2DStrip*)fHits.At( i );
271 }
272 }
273
274 if ( fType == 0 )
275 {
278 }
279 else if ( fType == 1 ) { fMarker->SetMarkerColor( kBlack ); }
280 else if ( fType == 2 ) { fMarker->SetMarkerColor( kBlack ); }
281 else if ( fType == 3 )
282 {
285 }
286 else if ( fType == 4 )
287 {
290 }
291 else if ( fType == 6 || fType == 7 )
292 {
293 fMarker->SetMarkerColor( kBlack );
294 fMarker->SetMarkerStyle( 4 );
295 }
296
298 gPad->Modified();
299 gPad->Update();
300 break;
301 }
302
303 TGeoTrack::ExecuteEvent( event, px, py );
304 }
305}
R__EXTERN BesCursor * gBesCursor
Bool_t GetVisMucHitsGlobal()
Bool_t GetVisMdcHitsGlobal()
Bool_t GetVisEmcHitsBarrel()
Bool_t GetVisEmcHitsGlobal()
virtual void UpdateView(Bool_t resetview=kFALSE)
Bool_t GetVisEmcHitsWest()
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Bool_t GetVisTofHitsWest()
Bool_t GetVisTofHitsGlobal()
Bool_t GetVisEmcHitsEast()
Bool_t GetVisTofHitsBarrel()
Bool_t GetVisTofHitsEast()
virtual void SetHighlighted(bool status=true)
virtual bool IsHighlighted()
virtual void SetHighlighted(bool status=true)
virtual bool IsHighlighted()
virtual void SetHighlighted(bool status=true)
virtual bool IsHighlighted()
virtual void SetHighlighted(bool status=true)
virtual bool IsHighlighted()