]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/Alieve/AliEveITSModuleStepper.cxx
Put black-listed classes out of Alieve namespace.
[u/mrichter/AliRoot.git] / EVE / Alieve / AliEveITSModuleStepper.cxx
1 // $Id$
2 // Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
3
4 /**************************************************************************
5  * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
6  * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for          *
7  * full copyright notice.                                                 * 
8  **************************************************************************/
9
10 #include "AliEveITSModuleStepper.h"
11 #include "AliEveITSDigitsInfo.h"
12 #include "AliEveITSScaledModule.h"
13
14 #include <TEveManager.h>
15 #include <TEveGedEditor.h>
16 #include <TEveGridStepper.h>
17 #include <TEveGLText.h>
18 #include <TEveTrans.h>
19
20 #include <TObject.h>
21
22 #include <TBuffer3D.h>
23 #include <TBuffer3DTypes.h>
24 #include <TVirtualPad.h>
25 #include <TVirtualViewer3D.h>
26
27 #include <TGLRnrCtx.h>
28 #include <TGLSelectRecord.h>
29 #include <TGLText.h>
30 // #include <FTFont.h>
31 #include <TGLAxis.h>
32 #include <TGLViewer.h>
33
34
35 //______________________________________________________________________
36 // AliEveITSModuleStepper
37 //
38
39 ClassImp(AliEveITSModuleStepper)
40
41 AliEveITSModuleStepper::AliEveITSModuleStepper(AliEveITSDigitsInfo* di) :
42   TEveElementList("ITS 2DStore", "AliEveITSModuleStepper", kTRUE),
43
44   fPosition(0), 
45     
46   fDigitsInfo(di),
47   fScaleInfo(0),
48
49   fSubDet(-1),
50
51   fStepper(0),
52   fAxis(0),
53   fText(0),
54   fTextSize(0.05),
55   fPagerGap(0.1),
56   fRnrFrame(kFALSE),
57
58   fExpandCell(0.85),
59   fModuleFrameCol(2),
60
61   fPaletteOffset(0.2),
62   fPaletteLength(0.6),
63
64   fWActive(-1),
65   fWWidth(0.025),
66   fWHeight(0.032),
67   fWOff(0.05),
68   fWCol(30),
69   fWActiveCol(45),
70   fFontCol(8)
71 {
72   // override member from base TEveElementList
73   fChildClass = AliEveITSScaledModule::Class();
74
75   SetMainColorPtr(&fWCol);
76
77   fDigitsInfo->IncRefCount();
78
79   fStepper = new TEveGridStepper();
80   fStepper->SetNs(5, 4);
81
82   fScaleInfo = new AliEveDigitScaleInfo();
83   fScaleInfo->IncRefCount();
84
85   fAxis = new TGLAxis();
86   fAxis->SetLineColor(4);
87   fAxis->SetTextColor(fFontCol);
88
89   fText = new TGLText();
90   fText->SetTextColor(fFontCol);
91   fText->SetGLTextFont(40);
92   fText->SetGLTextAngles(0, 0, 0);
93   fText->SetTextSize(fTextSize);
94
95   gEve->GetGLViewer()->AddOverlayElement(this);
96 }
97
98 AliEveITSModuleStepper::~AliEveITSModuleStepper()
99 {
100   gEve->GetGLViewer()->RemoveOverlayElement(this);
101
102    fScaleInfo->DecRefCount();
103   fDigitsInfo->DecRefCount();
104
105   delete fStepper;
106
107   delete fAxis;
108   delete fText;
109 }
110
111 /**************************************************************************/
112
113 void AliEveITSModuleStepper::Capacity()
114 {
115   Int_t N = fStepper->GetNx()*fStepper->GetNy();
116   if (N != GetNChildren())
117   {
118     DestroyElements();
119     for (Int_t m=0; m<N; m++) 
120     {
121       AddElement(new AliEveITSScaledModule(m, fDigitsInfo, fScaleInfo));
122     }
123   }
124 }
125
126 /**************************************************************************/
127
128 void AliEveITSModuleStepper::SetFirst(Int_t first)
129 {
130   Int_t lastpage = fIDs.size()/Nxy();
131   if(fIDs.size() % Nxy() ) lastpage++;  
132         
133   Int_t first_lastpage = (lastpage -1)*Nxy();
134   if(first > first_lastpage) first = first_lastpage;
135   if(first < 0) first = 0;
136   fPosition = first;
137   Apply();
138 }
139
140 void AliEveITSModuleStepper::Start()
141 {
142   fPosition = 0;
143   Apply();
144 }
145
146 void AliEveITSModuleStepper::Next()
147 {
148   SetFirst(fPosition + Nxy());
149 }
150
151 void AliEveITSModuleStepper::Previous()
152 {
153   // move to the top left corner first
154   SetFirst(fPosition - Nxy());
155 }
156
157 void AliEveITSModuleStepper::End()
158
159   Int_t lastpage = fIDs.size()/Nxy();
160   if(fIDs.size() % Nxy() ) lastpage++;  
161   fPosition = (lastpage -1)*Nxy();
162
163   fStepper->Reset(); 
164   Apply();
165 }
166
167 /**************************************************************************/
168
169 void AliEveITSModuleStepper::DisplayDet(Int_t det, Int_t layer)
170 {
171   fSubDet = det;
172   fIDs.clear();
173   AliEveITSModuleSelection sel = AliEveITSModuleSelection();
174   sel.fType = det; sel.fLayer=layer;
175   fDigitsInfo->GetModuleIDs(&sel, fIDs);
176   //in reder menu define a space between left and right pager
177   fPagerGap = 1.2*TextLength(Form("%d/%d",GetPages(), GetPages()));
178   Start();
179 }
180
181 /**************************************************************************/
182
183 void AliEveITSModuleStepper::DisplayTheta(Float_t min, Float_t max)
184 {
185   fIDs.clear();
186   AliEveITSModuleSelection sel = AliEveITSModuleSelection();
187   sel.fMaxTheta = max; sel.fMinTheta=min; 
188   fDigitsInfo->GetModuleIDs(&sel, fIDs);
189   Start();
190 }
191
192 /**************************************************************************/
193
194 Int_t AliEveITSModuleStepper::GetCurrentPage()
195 {
196   Int_t idx = fPosition +1; 
197   Int_t n = idx/Nxy();
198   if(idx % Nxy()) n++;
199   return n;
200 }
201
202 /**************************************************************************/
203
204 Int_t AliEveITSModuleStepper::GetPages()
205 {
206   Int_t n = fIDs.size()/Nxy(); 
207   if(fIDs.size() % Nxy()) n++; 
208   return n;
209 }
210   
211 /**************************************************************************/
212
213 void  AliEveITSModuleStepper::Apply()
214 {
215   // printf("AliEveITSModuleStepper::Apply fPosition %d \n", fPosition);
216   gEve->DisableRedraw();
217   Capacity();
218
219   UInt_t idx = fPosition;
220   for(List_i childit=fChildren.begin(); childit!=fChildren.end(); ++childit)
221   {
222     if(idx < fIDs.size()) 
223     {
224       AliEveITSScaledModule* mod = dynamic_cast<AliEveITSScaledModule*>(*childit);
225       mod->SetID(fIDs[idx], kFALSE); 
226       TEveTrans& tr = mod->RefHMTrans();
227       tr.UnitTrans();
228       tr.RotateLF(3,2,TMath::PiOver2());
229       tr.RotateLF(1,3,TMath::PiOver2());   
230
231       // scaling 
232       Float_t mz, mx;
233       Float_t* fp = mod->GetFrame()->GetFramePoints();
234       // switch x,z it will be rotated afterwards
235       mx = -2*fp[0];
236       mz = -2*fp[2];
237
238       // fit width first
239       Double_t sx = fStepper->GetDx();
240       Double_t sy = (mx*fStepper->GetDx())/mz;
241       if(sy > fStepper->GetDy())
242       {
243         //      printf("fit width \n");
244         sy =  fStepper->GetDy();
245         sx =  (mz*fStepper->GetDx())/mx;
246       }
247       Float_t scale = (fExpandCell*sx)/mz;
248       tr.Scale(scale, scale, scale);
249
250       Float_t  p[3];
251       fStepper->GetPosition(p);
252       tr.SetPos(p[0]+0.5*fStepper->GetDx(), p[1]+0.5*fStepper->GetDy(), p[2]+0.5*fStepper->GetDz());
253   
254       if(mod->GetSubDetID() == 2)
255         mod->SetName(Form("SSD %d", idx));
256       else if(mod->GetSubDetID() == 1)
257         mod->SetName(Form("SDD %d", idx));
258       else
259         mod->SetName(Form("SPD %d", idx));
260       mod->SetRnrSelf(kTRUE);
261       mod->UpdateItems();
262
263       fStepper->Step();
264       idx++;
265     }
266     else {
267       (*childit)->SetRnrSelf(kFALSE);
268     }
269   }
270
271   fStepper->Reset();
272   ElementChanged();
273   gEve->EnableRedraw();
274 }
275
276 /**************************************************************************/
277
278 void AliEveITSModuleStepper::Render(TGLRnrCtx& rnrCtx)
279 {
280   // render everyting in relative coordinates
281   glMatrixMode(GL_PROJECTION);
282   glPushMatrix();
283   glLoadIdentity();
284   if (rnrCtx.Selection())
285   {
286     // Should be
287     // glLoadMatrix(rnrCtx.GetCamera()->GetProjMBase());
288     TGLRect rect(*rnrCtx.GetPickRectangle());
289     rnrCtx.GetCamera()->WindowToViewport(rect);
290     gluPickMatrix(rect.X(), rect.Y(), rect.Width(), rect.Height(),
291                   (Int_t*) rnrCtx.GetCamera()->RefViewport().CArr());
292   }
293    
294   glMatrixMode(GL_MODELVIEW);
295   glPushMatrix();
296   glLoadIdentity();
297
298   GLboolean lightp;
299   glGetBooleanv(GL_LIGHTING, &lightp);
300   if (lightp) glDisable(GL_LIGHTING);
301
302   glPushAttrib(GL_ENABLE_BIT | GL_POLYGON_BIT);
303   glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
304   glDisable(GL_CULL_FACE);
305   glEnable(GL_BLEND);
306   glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); 
307   RenderMenu();
308   RenderPalette(fPaletteLength, 1.6*fWWidth, fWHeight*0.6);
309   glPopMatrix();
310   glPopAttrib();
311   
312   if (lightp) glEnable(GL_LIGHTING);
313
314   glMatrixMode(GL_PROJECTION);
315   glPopMatrix();
316
317   glMatrixMode(GL_MODELVIEW);
318   RenderCellIDs();
319 }
320
321
322 /**************************************************************************/
323 // Protected sub-renderers
324 /**************************************************************************/
325
326 //______________________________________________________________________
327 Float_t AliEveITSModuleStepper::TextLength(const char* txt)
328 {
329   Float_t llx, lly, llz, urx, ury, urz;
330   fText->BBox(txt, llx, lly, llz, urx, ury, urz);
331   return (urx-llx)*fTextSize;
332 }
333
334 //______________________________________________________________________
335 void AliEveITSModuleStepper::RenderString(TString string, Int_t id)
336 {
337   Float_t txtY = fWHeight*0.5;
338   Float_t txtl = TextLength(string.Data());
339
340   if(id > 0) glLoadName(id);
341   if(id>0 && fWActive == id)
342     fText->SetTextColor(fWActiveCol);
343   else  
344     fText->SetTextColor(fFontCol);
345
346   
347   if(id>0)
348   { 
349     if(fWActive == id) 
350       fText->SetTextColor(fWActiveCol);
351     else
352       fText->SetTextColor(fFontCol);
353
354     glLoadName(id);
355     Float_t ss = fWWidth*0.4;
356     fText->PaintGLText(ss, txtY, -0.8, string.Data());
357     // box
358     Float_t bw =2*ss+txtl;
359     RenderFrame(bw,fWHeight*2,id);
360     glTranslatef( bw, 0, 0);
361   }
362   else 
363   {
364     fText->SetTextColor(fFontCol);
365     fText->PaintGLText(0, txtY, -0.8, string.Data());
366     glTranslatef(txtl, 0, 0);
367   }
368 }
369
370 //______________________________________________________________________
371 void AliEveITSModuleStepper::RenderFrame(Float_t dx, Float_t dy, Int_t id)
372 {
373   if(fRnrFrame == kFALSE)return;
374
375   glPushAttrib(GL_ENABLE_BIT | GL_POLYGON_BIT);
376   glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
377   UChar_t color[4];
378   if (fWActive == id)
379     TEveUtil::TEveUtil::ColorFromIdx(fWActiveCol, color);
380   else  
381     TEveUtil:: TEveUtil::ColorFromIdx(fWCol, color);
382   glColor4ubv(color);
383
384   glBegin(GL_QUADS);
385   glVertex2f(0, 0);   glVertex2f(dx, 0);
386   glVertex2f(dx, dy); glVertex2f(0, dy);
387   glEnd();
388   glPopAttrib();
389 }
390
391 //______________________________________________________________________
392 void AliEveITSModuleStepper::RenderSymbol(Float_t dx, Float_t dy, Int_t id)
393 {
394   glLoadName(id);
395
396   UChar_t color[4];
397   if (fWActive == id)
398     TEveUtil::TEveUtil::ColorFromIdx(fWActiveCol, color);
399   else  
400     TEveUtil::TEveUtil::ColorFromIdx(fWCol, color);
401   glColor4ubv(color);
402
403   Float_t xs = dx/4, ys = dy/4;
404   if(id == 0) {
405     glBegin(GL_QUADS);
406     glVertex2f(0,ys); glVertex2f(0, ys*3); 
407     glVertex2f(dx, ys*3); glVertex2f(dx, ys);
408     glEnd();
409     return;
410   }
411
412   glBegin(GL_TRIANGLES);
413   switch (id) {
414     case 1:
415     {
416       // left
417       //      glVertex2f(xs*2.5, ys*3); glVertex2f(xs*1.5, ys*2); glVertex2f(xs*2.5, ys);
418       glVertex2f(xs*3, ys*3); glVertex2f(xs*1, ys*2); glVertex2f(xs*3, ys);
419       break;
420     }
421     case 2:
422     {
423       //double left
424       glVertex2f(xs*2, ys*3); glVertex2f(xs, ys*2);    glVertex2f(xs*2, ys);
425       glVertex2f(xs*3, ys*3); glVertex2f(xs*2, ys*2);  glVertex2f(xs*3, ys);
426       break;
427     }
428     case 3:
429     {
430       // right
431       //glVertex2f(xs*1.5, ys); glVertex2f(xs*2.5, ys*2); glVertex2f(xs*1.5, ys*3);
432       glVertex2f(xs*1, ys); glVertex2f(xs*3, ys*2); glVertex2f(xs*1, ys*3);
433       break;
434     }
435     case 4:
436     {
437       // double right
438       glVertex2f(xs, ys);     glVertex2f(xs*2, ys*2);   glVertex2f(xs, ys*3);
439       glVertex2f(xs*2, ys);   glVertex2f(xs*3, ys*2);   glVertex2f(xs*2, ys*3);
440       break;
441     }
442     case 5:
443     {
444       // up
445       glVertex2f(xs, ys*2.5);  glVertex2f(xs*2, ys*3.5); glVertex2f(xs*3, ys*2.5);
446       break;
447     }
448     case 6:
449     {
450       // down
451       glVertex2f(xs, ys*1.5);  glVertex2f(xs*2, ys*0.5); glVertex2f(xs*3, ys*1.5);
452       break;
453     }
454    
455     default:
456       break;
457   }
458   glEnd();
459   glLoadName(0);
460 }
461
462 //______________________________________________________________________
463 void AliEveITSModuleStepper::RenderPalette(Float_t dx, Float_t x, Float_t y)
464 {
465   glPushMatrix();
466   glLoadIdentity();
467   glTranslatef(1 -x- dx, -1+y*4, 0);
468   AliEveITSModule* qs = dynamic_cast<AliEveITSModule*>(*BeginChildren());
469   TEveRGBAPalette* p = qs->GetPalette();
470   glBegin(GL_QUAD_STRIP);
471   glColor4ubv(p->ColorFromValue(p->GetMinVal()));
472   glVertex2f(0, 0);
473   glVertex2f(0, y);
474   if (p->GetMaxVal() > p->GetMinVal() + 1)
475   {
476     Float_t xs = dx/(p->GetMaxVal() - p->GetMinVal());
477     Float_t x0 = xs;
478     for(Int_t i=p->GetMinVal() + 1; i<p->GetMaxVal(); i++) 
479     {
480       glColor4ubv(p->ColorFromValue(i));
481       glVertex2f(x0, 0);
482       glVertex2f(x0, y);
483       x0+=xs;
484     }
485   }
486   glColor4ubv(p->ColorFromValue(p->GetMaxVal()));
487   glVertex2f(dx, 0);
488   glVertex2f(dx, y);
489   glEnd();
490
491   if (p->GetMaxVal() > p->GetMinVal())
492   {
493     glRotatef(-90,1, 0, 0 );
494     Double_t v1[3] = {0., 0., 0.};
495     Double_t v2[3] = {dx, 0, 0.};
496     fAxis->SetLabelsSize(fTextSize/dx);
497     fAxis->PaintGLAxis(v1, v2, p->GetMinVal(), p->GetMaxVal(), 206);
498   }
499   glPopMatrix();
500 }
501
502 //______________________________________________________________________
503 void AliEveITSModuleStepper::RenderMenu()
504 {
505   Float_t ww = 2*fWWidth;
506   Float_t wh = 2*fWHeight;
507
508   // transparent bar
509   Float_t a=0.3;
510   glColor4f(a, a, a, a);
511   Float_t H = 1.9*wh*(1+ 2*fWOff);
512   if(1) {
513     glBegin(GL_QUADS);
514     glVertex3f(-1, -1,   0.1); glVertex3f(-1, -1+H, 0.1); 
515     glVertex3f(1 , -1+H, 0.1); glVertex3f( 1, -1  , 0.1);
516     glEnd();
517   }
518
519   Float_t y_base = -1 + wh*0.35;
520   glTranslatef(-1, y_base, 0.);
521   glPushName(0);
522   // pager
523   glPushMatrix();
524   glTranslatef(ww, 0, 0.);
525   fText->SetTextSize(fTextSize);
526   Float_t soff = ww*1.3;
527   glTranslatef(0, fWOff*wh, 0);
528   RenderSymbol(ww, wh, 2);
529   RenderFrame(ww,wh,2);
530   glTranslatef(soff, 0, 0);
531   RenderSymbol(ww, wh, 1);
532   RenderFrame(ww,wh,1);
533   glTranslatef(soff, 0, 0);
534   // text info
535   { 
536     const char* txt =  Form("%d/%d ", GetCurrentPage(), GetPages());
537     Float_t dx = (fPagerGap - TextLength(txt))*0.5;
538     fText->SetTextColor(fFontCol);
539     fText->PaintGLText(dx, wh*0.25, -0.8, txt);
540   }
541   glTranslatef(fPagerGap, 0, 0);
542
543   RenderSymbol(ww, wh, 3);
544   RenderFrame(ww,wh,3);
545   glTranslatef(soff, 0, 0);
546   RenderSymbol(ww, wh, 4);
547   RenderFrame(ww,wh,4);
548   glTranslatef(2*ww, 0, 0);
549   glPopMatrix();  
550
551   // scale info
552   glPushMatrix();
553   AliEveITSDigitsInfo* di = fDigitsInfo;
554   Int_t scale = fScaleInfo->GetScale() - 1;
555   AliEveITSScaledModule* sm = dynamic_cast<AliEveITSScaledModule*>(*BeginChildren());
556   Int_t cnx = 0, cnz = 0;
557   switch(sm->GetSubDetID())
558   {
559     case 0: 
560       cnx = di->fSPDScaleX[scale], cnz = di->fSPDScaleZ[scale];
561       break;
562     case 1: 
563       cnx = di->fSDDScaleX[scale], cnz = di->fSDDScaleZ[scale];
564       break;
565     case 2:
566       cnx = di->fSSDScale[scale], cnz = 1;
567       break;
568   }
569   glTranslatef(10*ww,0, 0);
570   RenderString(Form("Zoom: "));
571   glPushMatrix();
572   glTranslatef(0, 0.2*wh, 0);
573   RenderSymbol(ww, wh*0.9, 5);
574   glTranslatef(0, 0.4*wh, 0);
575   RenderFrame(ww, wh*0.5, 5);
576   glPopMatrix();
577   RenderSymbol(ww, wh*0.9, 6);
578   RenderFrame(ww, wh*0.5, 6);
579   glTranslatef(ww, 0, 0);
580   RenderString(Form("%dx%d ", cnx, cnz));
581   glPopMatrix();
582
583   //choose detector
584   glPushMatrix();
585   glTranslatef(18*ww, 0, 0);
586   Float_t bs = ww*0.2;
587   RenderString("SPD", 8);  
588   glTranslatef(bs, 0, 0);
589   RenderString("SDD", 9); 
590   glTranslatef(bs, 0, 0);
591   RenderString("SSD", 10);
592   glPopMatrix();
593
594   glPopName();
595 }
596
597 //______________________________________________________________________
598 void AliEveITSModuleStepper::RenderCellIDs()
599 {
600   fText->SetTextSize(fStepper->GetDy()*0.1);
601   fText->SetTextColor(fFontCol);
602   Double_t x, y, z;
603   Double_t sx, sy, sz;
604   UInt_t idx = fPosition;
605   for (List_i childit=fChildren.begin(); childit!=fChildren.end(); ++childit)
606   {
607     if(idx < fIDs.size()) 
608     { 
609       AliEveITSScaledModule* mod = dynamic_cast<AliEveITSScaledModule*>(*childit);
610       TEveTrans& tr = mod->RefHMTrans();
611       TString name = Form("%d",mod->GetID());
612       tr.GetPos(x,y,z);
613       x += fStepper->GetDx()*0.5;
614       y -= fStepper->GetDy()*0.5;
615       z += 0.4; // !!! MT hack - cross check with overlay rendering.
616       Float_t llx, lly, llz, urx, ury, urz;
617       fText->BBox(name, llx, lly, llz, urx, ury, urz);
618       tr.GetScale(sx, sy, sz);
619       fText->PaintGLText(x-(urx-llx)*sx, y, z, name);
620       idx++;
621     }
622   }
623 }
624
625
626 /**************************************************************************/
627 // Virtual event handlers from TGLOverlayElement
628 /**************************************************************************/
629
630 //______________________________________________________________________
631 Bool_t AliEveITSModuleStepper::Handle(TGLRnrCtx          & /*rnrCtx*/,
632                                 TGLOvlSelectRecord & rec,
633                                 Event_t            * event)
634 {
635   // Handle overlay event.
636   // Return TRUE if event was handled.
637
638   switch (event->fType)
639   { 
640     case kMotionNotify:
641     {
642       Int_t item = rec.GetN() < 2 ? -1 : (Int_t)rec.GetItem(1);
643       if (fWActive != item) {
644         fWActive = item;
645         return kTRUE;
646       } else {
647         return kFALSE;
648       }
649       break;
650     }
651     case kButtonPress:
652     {
653       if (event->fCode != kButton1) {
654         return kFALSE;
655       }
656       switch (rec.GetItem(1))
657       {
658         case 1:
659           Previous();
660           break;
661         case 2:
662           Start();
663           break;
664         case 3:
665           Next();
666           break;
667         case 4:
668           End();
669           break;
670         case 5:
671         {
672           AliEveDigitScaleInfo* si = fScaleInfo;
673           if(si->GetScale() < 5) 
674           {
675             si->ScaleChanged(si->GetScale() + 1);       
676             ElementChanged(kTRUE, kTRUE);
677           }
678           break;
679         }
680         case 6:
681         {
682           AliEveDigitScaleInfo* si = fScaleInfo;
683           if(si->GetScale() > 1) 
684           {
685             si->ScaleChanged(si->GetScale() - 1);       
686             ElementChanged(kTRUE, kTRUE);
687           }
688           break;
689         }
690         case 7:
691           gEve->GetEditor()->DisplayElement(*BeginChildren());
692           break;
693
694         case 8:
695             DisplayDet(0, -1);
696           break;
697         case 9: 
698             DisplayDet(1, -1);
699           break;
700         case 10: 
701             DisplayDet(2, -1);
702           break;
703         default:
704           break;
705       }
706       return kTRUE;
707       break;
708     }
709     default:
710       break;
711   } // end switch
712   return kFALSE;
713 }
714
715 //______________________________________________________________________
716 Bool_t AliEveITSModuleStepper::MouseEnter(TGLOvlSelectRecord& /*rec*/)
717 {
718   return kTRUE;
719 }
720
721 //______________________________________________________________________
722 void AliEveITSModuleStepper::MouseLeave()
723 {
724   // Mouse has left the element.
725
726   fWActive = -1;
727