]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONPainterDataSourceFrame.cxx
remoe duplicate QA initialisation and do ESD QA for same detectors as RecPoint QA
[u/mrichter/AliRoot.git] / MUON / AliMUONPainterDataSourceFrame.cxx
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
16 // $Id$
17
18 #include "AliMUONPainterDataSourceFrame.h"
19
20
21 #include "AliLog.h"
22 #include "AliMUONPainterDataSourceItem.h"
23 #include "AliMUONPainterEnv.h"
24 #include "AliMUONPainterHelper.h"
25 #include "AliMUONPainterRegistry.h"
26 #include "AliMUONTrackerCalibratedDataMaker.h"
27 #include "AliMUONTrackerOCDBDataMaker.h"
28 #include "AliMUONTrackerRawDataMaker.h"
29 #include "AliRawReader.h"
30 #include <TGButton.h>
31 #include <TGComboBox.h>
32 #include <TGFileDialog.h>
33 #include <TGNumberEntry.h>
34 #include <TGTextEntry.h>
35 #include <TGrid.h>
36 #include <TObjArray.h>
37 #include <TObjString.h>
38 #include <TRegexp.h>
39 #include <TString.h>
40 #include <TSystem.h>
41
42 ///\class AliMUONPainterDataSourceFrame
43 ///
44 /// A complete frame to select and display various data sources to 
45 /// be displayed : either raw data or OCDB data. 
46 /// Later on we might add digits and clusters for instance.
47 ///
48 ///\author Laurent Aphecetche, Subatech
49
50 const char* AliMUONPainterDataSourceFrame::fgkNumberOfDataSourcesKey = "NumberOfDataSources";
51 const char* AliMUONPainterDataSourceFrame::fgkDataSourceURIKey = "DataSourceURI.%d";
52
53 ///\cond CLASSIMP
54 ClassImp(AliMUONPainterDataSourceFrame)
55 ///\endcond
56
57 //_____________________________________________________________________________
58 AliMUONPainterDataSourceFrame::AliMUONPainterDataSourceFrame(const TGWindow* p, UInt_t w, UInt_t h)
59 : TGCompositeFrame(p,w,h,kVerticalFrame),
60   fRecentSourceSelector(new TGGroupFrame(this,"Recent sources",kHorizontalFrame)),
61   fRawSelector(new TGGroupFrame(this,"Raw file URI",kHorizontalFrame)),
62   fRawSelector2(new TGCompositeFrame(fRawSelector,w,h,kVerticalFrame)),
63   fRawSelector21(new TGCompositeFrame(fRawSelector2,w,h,kHorizontalFrame)),
64   fRawSelector22(new TGCompositeFrame(fRawSelector2,w,h,kHorizontalFrame)),
65   fRawSelector23(new TGCompositeFrame(fRawSelector2,w,h,kHorizontalFrame)),
66   fCalibrateNoGain(new TGCheckButton(fRawSelector22,"Ped subraction")),
67   fCalibrateGainConstantCapa(new TGCheckButton(fRawSelector22,"Ped subraction + gain (capa cste)")),
68   fCalibrateGain(new TGCheckButton(fRawSelector22,"Full calib (Ped subraction + gain with capa)")),
69   fHistogramButton(new TGCheckButton(fRawSelector23,"Histogram")),
70   fHistoMin(new TGNumberEntry(fRawSelector23,0)),
71   fHistoMax(new TGNumberEntry(fRawSelector23,4096)),
72   fRawOCDBPath(new TGTextEntry(fRawSelector22,"")),
73   fOCDBSelector(new TGGroupFrame(this,"OCDB Path",kHorizontalFrame)),
74   fDataReaders(new TGGroupFrame(this,"Data sources")),
75   fFilePath(new TGTextEntry(fRawSelector21,"")),
76   fOCDBPath(new TGTextEntry(fOCDBSelector,"")),
77   fRunSelector(new TGNumberEntry(fOCDBSelector,0)),
78   fOCDBTypes(new TGComboBox(fOCDBSelector)),
79   fRecentSources(new TGComboBox(fRecentSourceSelector)),
80   fItems(new TObjArray)
81 {
82   /// Ctor
83   
84     AliMUONPainterRegistry* reg = AliMUONPainterRegistry::Instance();
85     
86     reg->Connect("DataMakerWasRegistered(AliMUONVTrackerDataMaker*)",
87                  "AliMUONPainterDataSourceFrame",
88                  this,
89                  "DataMakerWasRegistered(AliMUONVTrackerDataMaker*)");
90     
91     reg->Connect("DataMakerWasUnregistered(AliMUONVTrackerDataMaker*)",
92                  "AliMUONPainterDataSourceFrame",
93                  this,
94                  "DataMakerWasUnregistered(AliMUONVTrackerDataMaker*)");
95     
96     fItems->SetOwner(kFALSE);
97     
98     /// Recent source selection
99     
100     AliMUONPainterEnv* env = AliMUONPainterHelper::Instance()->Env();
101     
102     Int_t nsources = env->Integer(fgkNumberOfDataSourcesKey);
103     
104     for ( Int_t i = 0; i < nsources; ++i )
105     {
106       AddRecentSource(env->String(Form(fgkDataSourceURIKey,i)));
107     }
108
109     fRecentSources->Resize(100,20);
110     
111     TGButton* createRecentButton = new TGTextButton(fRecentSourceSelector,"Create data source");
112     createRecentButton->Connect("Clicked()",
113                                 "AliMUONPainterDataSourceFrame",
114                                 this,
115                                 "OpenRecentSource()");
116     
117     fRecentSourceSelector->AddFrame(fRecentSources,new TGLayoutHints(kLHintsExpandX | kLHintsTop,5,5,5,5));
118     fRecentSourceSelector->AddFrame(createRecentButton,new TGLayoutHints(kLHintsTop,5,5,5,5));
119                                     
120     /// Raw file selection
121     
122     TGButton* openButton = new TGPictureButton(fRawSelector21,
123                                            gClient->GetPicture("fileopen.xpm"));
124     openButton->SetToolTipText("Click to open file dialog");
125                                         
126     fRawSelector2->AddFrame(fRawSelector21, new TGLayoutHints(kLHintsExpandX,5,5,5,5));
127     fRawSelector2->AddFrame(fRawSelector22, new TGLayoutHints(kLHintsExpandX,5,5,5,5));
128     fRawSelector2->AddFrame(fRawSelector23, new TGLayoutHints(kLHintsExpandX,5,5,5,5));
129
130     fRawSelector21->AddFrame(openButton,new TGLayoutHints(kLHintsTop,5,5,5,5));
131     fRawSelector21->AddFrame(fFilePath, new TGLayoutHints(kLHintsExpandX | kLHintsTop,5,5,5,5));
132
133     fRawSelector22->AddFrame(fCalibrateNoGain, new TGLayoutHints(kLHintsTop,5,5,5,5));
134     fRawSelector22->AddFrame(fCalibrateGainConstantCapa, new TGLayoutHints(kLHintsTop,5,5,5,5));
135     fRawSelector22->AddFrame(fCalibrateGain, new TGLayoutHints(kLHintsTop,5,5,5,5));
136     fRawSelector22->AddFrame(fRawOCDBPath, new TGLayoutHints(kLHintsExpandX | kLHintsTop,5,5,5,5));
137     fRawOCDBPath->SetEnabled(kFALSE);
138     
139     fRawSelector23->AddFrame(fHistogramButton,new TGLayoutHints(kLHintsTop,5,5,5,5));
140     
141     fHistogramButton->Connect("Clicked()","AliMUONPainterDataSourceFrame",this,"HistogramButtonClicked()");
142     
143     fHistoMin->SetState(kFALSE);
144     fHistoMax->SetState(kFALSE);
145     
146     fRawSelector23->AddFrame(fHistoMin,new TGLayoutHints(kLHintsTop,5,5,5,5));
147     fRawSelector23->AddFrame(fHistoMax,new TGLayoutHints(kLHintsTop,5,5,5,5));
148     
149     TGButton* createRawButton = new TGTextButton(fRawSelector,"Create data source");
150     
151     fRawSelector->AddFrame(fRawSelector2, new TGLayoutHints(kLHintsExpandX | kLHintsTop,5,5,5,5));
152     fRawSelector->AddFrame(createRawButton, new TGLayoutHints(kLHintsCenterY,5,5,5,5));
153         
154     fCalibrateNoGain->Connect("Clicked()","AliMUONPainterDataSourceFrame",this,"CalibrateButtonClicked()");
155     fCalibrateGainConstantCapa->Connect("Clicked()","AliMUONPainterDataSourceFrame",this,"CalibrateButtonClicked()");
156     fCalibrateGain->Connect("Clicked()","AliMUONPainterDataSourceFrame",this,"CalibrateButtonClicked()");
157
158     openButton->Connect("Clicked()",
159                         "AliMUONPainterDataSourceFrame",
160                         this,
161                         "OpenFileDialog()");
162
163     createRawButton->Connect("Clicked()",
164                         "AliMUONPainterDataSourceFrame",
165                         this,
166                         "CreateRawDataSource()");
167     
168     /// OCDB selection
169     
170     fOCDBTypes->AddEntry("Pedestals",0);
171     fOCDBTypes->AddEntry("Gains",1);
172     fOCDBTypes->AddEntry("Capacitances",2);
173     fOCDBTypes->Select(0);
174     fOCDBTypes->Resize(100,20);
175     
176     TGButton* createOCDBButton = new TGTextButton(fOCDBSelector,"Create data source");
177     createOCDBButton->Connect("Clicked()",
178                              "AliMUONPainterDataSourceFrame",
179                              this,
180                              "CreateOCDBDataSource()");
181     
182     
183     fOCDBSelector->AddFrame(fOCDBPath,new TGLayoutHints(kLHintsExpandX | kLHintsTop,5,5,5,5));    
184     fOCDBSelector->AddFrame(fRunSelector,new TGLayoutHints(kLHintsTop,5,5,5,5));
185     fOCDBSelector->AddFrame(fOCDBTypes,new TGLayoutHints(kLHintsExpandX | kLHintsTop,5,5,5,5));
186     fOCDBSelector->AddFrame(createOCDBButton,new TGLayoutHints(kLHintsTop,5,5,5,5));
187
188     AddFrame(fRecentSourceSelector,new TGLayoutHints(kLHintsExpandX,10,10,10,10));
189
190     AddFrame(fRawSelector,new TGLayoutHints(kLHintsExpandX,10,10,10,10));
191
192     AddFrame(fOCDBSelector,new TGLayoutHints(kLHintsExpandX,10,10,10,10));
193
194     AddFrame(fDataReaders, new TGLayoutHints(kLHintsExpandX,10,10,10,10));
195     
196 }
197
198 //_____________________________________________________________________________
199 AliMUONPainterDataSourceFrame::~AliMUONPainterDataSourceFrame()
200 {
201   /// dtor
202   
203   delete fItems;
204 }
205
206 //_____________________________________________________________________________
207 void
208 AliMUONPainterDataSourceFrame::AddRecentSource(const char* name)
209 {  
210   /// Add a source to the list of recently used sources
211   
212   TGListBox* lb = fRecentSources->GetListBox();
213   
214   for ( Int_t i = 0; i < lb->GetNumberOfEntries(); ++i ) 
215   {
216     TGTextLBEntry* t = (TGTextLBEntry*)lb->GetEntry(i);
217     TString s(t->GetText()->GetString());
218     if ( s == name ) 
219     {
220       return;
221     }
222   }
223   
224   fRecentSources->AddEntry(name,lb->GetNumberOfEntries());
225   fRecentSources->MapSubwindows();
226   fRecentSources->Layout();
227 }
228
229 //_____________________________________________________________________________
230 void
231 AliMUONPainterDataSourceFrame::CalibrateButtonClicked()
232 {
233   /// Calibrate button was clicked.
234   
235   if ( fCalibrateNoGain->IsOn() ||
236        fCalibrateGainConstantCapa->IsOn() ||
237        fCalibrateGain->IsOn() ) 
238   {
239     fRawOCDBPath->SetEnabled(kTRUE);
240     fRawOCDBPath->SetFocus();
241   }
242   else
243   {
244     fRawOCDBPath->SetEnabled(kFALSE);
245   }
246 }
247
248 //_____________________________________________________________________________
249 void
250 AliMUONPainterDataSourceFrame::HistogramButtonClicked()
251 {
252   /// Histogram button was clicked.
253   
254   if ( fHistogramButton->IsOn() )
255   {
256     fHistoMin->SetState(kTRUE);
257     fHistoMax->SetState(kTRUE);
258   }
259   else
260   {
261     fHistoMin->SetState(kFALSE);
262     fHistoMax->SetState(kFALSE);
263   }
264 }
265
266 //_____________________________________________________________________________
267 void
268 AliMUONPainterDataSourceFrame::CreateOCDBDataSource()
269 {
270   /// Create an OCDB data source (using information from the widgets)
271   
272   TString cdbPath = fOCDBPath->GetText();
273   Int_t runNumber = fRunSelector->GetIntNumber();
274   TGTextLBEntry* t = static_cast<TGTextLBEntry*>(fOCDBTypes->GetSelectedEntry());
275   TString type = t->GetText()->GetString();
276   
277   CreateOCDBDataSource(cdbPath,runNumber,type);
278   
279   fOCDBPath->SetText("");
280   fRunSelector->SetNumber(0);  
281 }
282
283 //_____________________________________________________________________________
284 void
285 AliMUONPainterDataSourceFrame::CreateOCDBDataSource(const TString& uri)
286 {
287   /// Create an OCDB data source, given it's URI
288   
289   TObjArray* a = uri.Tokenize(";");
290   TString cdbPath = static_cast<TObjString*>(a->At(1))->String();
291   TString srun = static_cast<TObjString*>(a->At(2))->String();
292   TString type = static_cast<TObjString*>(a->At(3))->String();
293   
294   CreateOCDBDataSource(cdbPath,atoi(srun.Data()),type);
295   
296   delete a;
297 }
298
299 //_____________________________________________________________________________
300 void
301 AliMUONPainterDataSourceFrame::CreateOCDBDataSource(const TString& cdbPath,
302                                                     Int_t runNumber,
303                                                     const TString& type)
304 {
305   /// Create an OCDB data source for a given (path,runnumber,type) triplet
306   
307   AliMUONVTrackerDataMaker* reader = new AliMUONTrackerOCDBDataMaker(cdbPath.Data(),
308                                                                        runNumber,
309                                                                        type.Data());
310   
311   if ( reader->IsValid() ) 
312   {
313     AliMUONPainterRegistry::Instance()->Register(reader);
314     
315     AliMUONPainterEnv* env = AliMUONPainterHelper::Instance()->Env();
316     
317     Int_t n = env->Integer(fgkNumberOfDataSourcesKey);
318     
319     env->Set(fgkNumberOfDataSourcesKey,n+1);
320     
321     TString ds(Form("OCDB;%s;%d;%s",cdbPath.Data(),runNumber,type.Data()));
322     
323     env->Set(Form(fgkDataSourceURIKey,n),ds.Data());
324     
325     env->Save();
326     
327     AddRecentSource(ds.Data());
328   }
329 }
330
331 //_____________________________________________________________________________
332 void 
333 AliMUONPainterDataSourceFrame::CreateRawDataSource()
334 {
335   /// Create a new raw data source (using info from the widgets)
336   
337   TString uri(gSystem->ExpandPathName(fFilePath->GetText()));
338   
339   if ( gSystem->AccessPathName(uri.Data()) )
340   {
341     AliError(Form("File %s does not exist",uri.Data()));
342     fFilePath->SetText("");
343     return;
344   }
345
346   TString calibMode("");
347   TString name("RAW");
348   
349   if ( fCalibrateGain->IsOn() ) 
350   {
351     calibMode = "GAIN";
352     name = "CALC";
353   }
354   
355   if ( fCalibrateGainConstantCapa->IsOn() ) 
356   {
357     calibMode = "GAINCONSTANTCAPA";
358     name = "CALG";
359   }
360   
361   if ( fCalibrateNoGain->IsOn() ) 
362   {
363     calibMode = "NOGAIN";
364     name = "CALZ";
365   }
366   
367   uri = Form("%s%s;%s;%s;%s;%s;%s",
368              ( fHistogramButton->IsOn() ? "H":""),
369              name.Data(),uri.Data(),
370              ( strlen(fRawOCDBPath->GetText()) > 0 ? fRawOCDBPath->GetText() : " "),
371              ( calibMode.Length() > 0 ? calibMode.Data() : " "),
372              Form("%e",fHistoMin->GetNumber()),
373              Form("%e",fHistoMax->GetNumber()));
374   
375   if ( CreateRawDataSource(uri) )
376   {
377     fFilePath->SetText("");
378     fRawOCDBPath->SetText("");
379   }
380 }
381
382 //_____________________________________________________________________________
383 Bool_t 
384 AliMUONPainterDataSourceFrame::CreateRawDataSource(const TString& uri)
385 {
386   /// Create a new raw data source, given its URI
387   
388   TString filename;
389   TString ocdbPath;
390   TString calibMode;
391   TString sxmin("0.0");
392   TString sxmax("4096.0");
393   
394   TObjArray* a = uri.Tokenize(";");
395   
396   filename = static_cast<TObjString*>(a->At(1))->String();
397   
398   if ( a->GetLast() > 1 ) 
399   {
400     ocdbPath = static_cast<TObjString*>(a->At(2))->String();
401     if ( ocdbPath == " " ) ocdbPath = "";
402   }
403
404   if ( a->GetLast() > 2 ) 
405   {
406     calibMode = static_cast<TObjString*>(a->At(3))->String();
407     if ( calibMode == " " ) calibMode = "";
408   }
409
410   if ( a->GetLast() > 3 ) 
411   {
412     sxmin = static_cast<TObjString*>(a->At(4))->String();
413   }
414
415   if ( a->GetLast() > 4 ) 
416   {
417     sxmax = static_cast<TObjString*>(a->At(5))->String();
418   }
419   
420   AliRawReader* rawReader = 0x0;
421
422   if ( filename.Contains(TRegexp("^alien")) )
423   {
424     // insure we've initialized the grid...
425     if (!gGrid)
426     {
427       TGrid::Connect("alien://");
428     }
429   }
430   
431   rawReader = AliRawReader::Create(filename.Data());
432
433   if (!rawReader)
434   {
435     AliError(Form("Could not open file %s",filename.Data()));
436     fFilePath->SetText("");
437     return kFALSE;
438   }
439   
440   /// Basic test to see if the file is correct
441   Bool_t ok = rawReader->NextEvent();
442   if (!ok)
443   {
444     AliError(Form("File %s does not seem to be a raw data file",filename.Data()));
445     fFilePath->SetText("");
446     return kFALSE;
447   }
448   
449   rawReader->RewindEvents();
450   
451   AliMUONVTrackerDataMaker* reader(0x0);
452   Bool_t histogram(kFALSE);
453   
454   if ( uri.Contains(TRegexp("^H")) ) histogram = kTRUE;
455
456   if ( ocdbPath.Length() > 0 ) 
457   {
458     reader = new AliMUONTrackerCalibratedDataMaker(rawReader,ocdbPath.Data(),
459                                                    calibMode.Data(),
460                                                    histogram,
461                                                    sxmin.Atof(),
462                                                    sxmax.Atof());
463   }
464   else
465   {
466     reader = new AliMUONTrackerRawDataMaker(rawReader,histogram);
467   }
468   
469   reader->SetSource(filename.Data());
470   
471   AliMUONPainterRegistry::Instance()->Register(reader);
472   
473   AliMUONPainterEnv* env = AliMUONPainterHelper::Instance()->Env();
474   
475   Int_t n = env->Integer(fgkNumberOfDataSourcesKey);
476   
477   env->Set(fgkNumberOfDataSourcesKey,n+1);
478   
479   env->Set(Form(fgkDataSourceURIKey,n),uri.Data());
480   
481   AddRecentSource(uri.Data());
482   
483   env->Save();
484
485   return kTRUE;
486 }
487
488 //_____________________________________________________________________________
489 void 
490 AliMUONPainterDataSourceFrame::DataMakerWasRegistered(AliMUONVTrackerDataMaker* reader)
491 {
492   /// Update ourselves as a new data reader was created
493   
494   AliMUONPainterDataSourceItem* item = new AliMUONPainterDataSourceItem(fDataReaders,100,20,reader);
495       
496   item->Connect("StartRunning()",
497                 "AliMUONPainterDataSourceFrame",
498                 this,
499                 Form("StartRunning(=(AliMUONPainterDataSourceItem*)(0x%x))",item));
500
501   item->Connect("StopRunning()",
502                 "AliMUONPainterDataSourceFrame",
503                 this,
504                 Form("StopRunning(=(AliMUONPainterDataSourceItem*)(0x%x))",item));
505   
506   fDataReaders->AddFrame(item);
507   
508   fItems->Add(item);
509
510   fDataReaders->MapSubwindows();
511   fDataReaders->Resize();
512 }
513
514 //_____________________________________________________________________________
515 void 
516 AliMUONPainterDataSourceFrame::DataMakerWasUnregistered(AliMUONVTrackerDataMaker* maker)
517 {
518   /// Update ourselves as a data reader was deleted
519   
520   AliMUONPainterDataSourceItem* theItem(0x0);
521   
522   TIter next(fItems);
523   AliMUONPainterDataSourceItem* item;
524   
525   while ( ( item = static_cast<AliMUONPainterDataSourceItem*>(next()) ) && !theItem )
526   {
527     if ( item->DataMaker() == maker ) 
528     {
529       theItem = item;
530     }
531   }
532   
533   if  (!theItem) return;
534   
535   fDataReaders->RemoveFrame(theItem);
536   fItems->Remove(theItem);
537   theItem->DestroyWindow();
538   delete theItem;
539   
540   fDataReaders->MapSubwindows();
541   fDataReaders->Resize();
542
543 }
544
545 //_____________________________________________________________________________
546 void
547 AliMUONPainterDataSourceFrame::OpenFileDialog()
548 {
549   /// Open a file dialog to select a file to be read
550   
551   TGFileInfo fileInfo;
552   
553   const char* fileTypes[] = { 
554     "ROOT files","*.root",
555     "DATE files","*.raw",
556     "All files","*",
557     0,0 };
558   
559   fileInfo.fFileTypes = fileTypes;
560   delete[] fileInfo.fIniDir;
561
562   AliMUONPainterEnv* env = AliMUONPainterHelper::Instance()->Env();
563   
564   fileInfo.fIniDir = StrDup(env->String("LastOpenDir","."));
565   
566   new TGFileDialog(gClient->GetRoot(),gClient->GetRoot(),
567                    kFDOpen,&fileInfo);
568   
569   fFilePath->SetText(gSystem->ExpandPathName(Form("%s",fileInfo.fFilename)));
570   
571   env->Set("LastOpenDir",fileInfo.fIniDir);
572   env->Save();  
573 }
574
575
576 //_____________________________________________________________________________
577 void
578 AliMUONPainterDataSourceFrame::OpenRecentSource()
579 {
580   /// Open one source from the recently used ones
581   
582   TGTextLBEntry* t = (TGTextLBEntry*)fRecentSources->GetSelectedEntry();
583
584   TString uri(t->GetText()->GetString());
585   
586   if ( uri.Contains(TRegexp("^RAW")) || uri.Contains(TRegexp("^HRAW")) || 
587        uri.Contains(TRegexp("^CAL")) || uri.Contains(TRegexp("^HCAL")) )
588   {
589     CreateRawDataSource(uri);
590   }
591   else if ( uri.Contains(TRegexp("^OCDB")) )
592   {
593     CreateOCDBDataSource(uri);
594   }
595   
596   fRecentSources->Select(-1);
597 }
598
599 //_____________________________________________________________________________
600 void
601 AliMUONPainterDataSourceFrame::StartRunning(AliMUONPainterDataSourceItem* item)
602 {
603   /// One data source starts running. Disable the Run button of the other ones
604   TIter next(fItems);
605   AliMUONPainterDataSourceItem* o;
606   while ( ( o = static_cast<AliMUONPainterDataSourceItem*>(next()) ) )
607   {
608     if ( o != item ) 
609     {
610       o->DisableRun();
611     }
612   }
613 }  
614
615 //_____________________________________________________________________________
616 void
617 AliMUONPainterDataSourceFrame::StopRunning(AliMUONPainterDataSourceItem* /*item*/)
618 {
619   /// One data source stops running. Enable the Run button of all items
620   TIter next(fItems);
621   AliMUONPainterDataSourceItem* o;
622   while ( ( o = static_cast<AliMUONPainterDataSourceItem*>(next()) ) )
623   {
624     o->EnableRun();
625   }
626 }
627