]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONMchViewApplication.cxx
Fix for savannah bug report 87728 (Laurent) + fix invalid read found with valgrind...
[u/mrichter/AliRoot.git] / MUON / AliMUONMchViewApplication.cxx
CommitLineData
bf4d93eb 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
90037e4e 18#include "AliMUONMchViewApplication.h"
19
20#include "AliCDBManager.h"
21#include "AliCodeTimer.h"
22#include "AliLog.h"
fef32488 23#include "AliMUONChamberPainter.h"
24#include "AliMUONDEPainter.h"
8f0acce4 25#include "AliMUONPainterDataRegistry.h"
90037e4e 26#include "AliMUONPainterDataSourceFrame.h"
49419555 27#include "AliMUONPainterEnv.h"
90037e4e 28#include "AliMUONPainterHelper.h"
fcabdc0c 29#include "AliMUONPainterGroup.h"
90037e4e 30#include "AliMUONPainterMasterFrame.h"
fcabdc0c 31#include "AliMUONPainterMatrix.h"
90037e4e 32#include "AliMUONPainterRegistry.h"
49419555 33#include "AliMUONTrackerDataCompareDialog.h"
34#include "AliMUONTrackerDataWrapper.h"
90037e4e 35#include "AliMUONVTrackerData.h"
49419555 36#include "AliMUONVTrackerDataMaker.h"
90037e4e 37#include <Riostream.h>
38#include <TCanvas.h>
39#include <TEnv.h>
40#include <TFile.h>
41#include <TGClient.h>
42#include <TGFileDialog.h>
43#include <TGMenu.h>
44#include <TGTab.h>
49419555 45#include <TGTextView.h>
46#include <TGrid.h>
90037e4e 47#include <TKey.h>
48#include <TList.h>
49419555 49#include <TRegexp.h>
90037e4e 50#include <TString.h>
51#include <TSystem.h>
52
53/// \class AliMUONMchViewApplication
54///
55/// Main class for the mchview program
56///
57///\author Laurent Aphecetche, Subatech
58
59/// \cond CLASSIMP
60ClassImp(AliMUONMchViewApplication)
61/// \endcond CLASSIMP
62
63const Int_t AliMUONMchViewApplication::fgkFILESAVEAS(1);
64const Int_t AliMUONMchViewApplication::fgkFILEOPEN(2);
65const Int_t AliMUONMchViewApplication::fgkFILEEXIT(3);
10eb3d17 66const Int_t AliMUONMchViewApplication::fgkFILEPRINTAS(4);
49419555 67const Int_t AliMUONMchViewApplication::fgkABOUT(5);
68const Int_t AliMUONMchViewApplication::fgkCOMPAREDATA(6);
10eb3d17 69
70const char* AliMUONMchViewApplication::fgkFileTypes[] = {
71 "ROOT files", "*.root",
72 "All files", "*",
73 0, 0 };
90037e4e 74
75//______________________________________________________________________________
76AliMUONMchViewApplication::AliMUONMchViewApplication(const char* name,
77 int* argc, char** argv,
1ffbeb9d 78 UInt_t w, UInt_t h,
79 UInt_t ox, UInt_t oy)
90037e4e 80: TRint(name,argc,argv),
10eb3d17 81 fMainFrame(0x0),
fcabdc0c 82 fPainterMasterFrameList(new TList),
83 fTabs(0x0)
90037e4e 84{
85
86 /// ctor
1ffbeb9d 87 /// (w,h) is the size in pixel (if 0,0 it will be computed as 70%,90% of display size)
88 /// (ox,oy) is the offset from the top-left of the display
89
d2b2e698 90 if (!w || !h)
1ffbeb9d 91 {
92 w = (UInt_t)(gClient->GetDisplayWidth()*0.7);
93 h = (UInt_t)(gClient->GetDisplayHeight()*0.9);
94 }
90037e4e 95
96 fMainFrame = new TGMainFrame(gClient->GetRoot(),w,h);
fef32488 97
90037e4e 98 CreateMenuBar(w);
99
100 const Int_t kbs = 2;
101
102// h -= 60; // menubar
103
fcabdc0c 104 fTabs = new TGTab(fMainFrame,w,h);
105
106 TGCompositeFrame* t = fTabs->AddTab("Painter Master Frame");
107
108 fPainterMasterFrameList->SetOwner(kTRUE);
109
90037e4e 110
fcabdc0c 111 AliMUONPainterMasterFrame* pmf = new AliMUONPainterMasterFrame(t,t->GetWidth()-kbs*2,t->GetHeight()-kbs*2,
112 GenerateStartupMatrix());
90037e4e 113
fcabdc0c 114 fPainterMasterFrameList->Add(pmf);
90037e4e 115
fcabdc0c 116 t->AddFrame(pmf, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY,kbs,kbs,kbs,kbs));
90037e4e 117
fcabdc0c 118 t = fTabs->AddTab("Data Sources");
90037e4e 119
120 AliMUONPainterDataSourceFrame* dsf =
121 new AliMUONPainterDataSourceFrame(t,t->GetWidth()-kbs*2,t->GetHeight()-kbs*2);
122
123 t->AddFrame(dsf,new TGLayoutHints(kLHintsExpandX | kLHintsExpandY,kbs,kbs,kbs,kbs));
124
fcabdc0c 125 fMainFrame->AddFrame(fTabs,new TGLayoutHints(kLHintsExpandX | kLHintsExpandY,0,0,0,0));
90037e4e 126
127 fMainFrame->SetWindowName("mchview - Visualization of MUON Tracker detector");
128
129 fMainFrame->MapSubwindows();
130 fMainFrame->Resize();
10eb3d17 131
fcabdc0c 132 pmf->Update();
10eb3d17 133
90037e4e 134 fMainFrame->MapWindow();
135
136 fMainFrame->Connect("CloseWindow()","AliMUONMchViewApplication",this,"Terminate()");
1ffbeb9d 137
138 fMainFrame->MoveResize(ox,oy, w, h);
139 fMainFrame->SetWMPosition(ox, oy);
90037e4e 140 fMainFrame->SetWMSizeHints(w,h,w,h,0,0);
10eb3d17 141
142 cout << "***************************************************" << endl;
143 cout << " Welcome to mchview" << endl;
144 cout << " " << FullVersion() << endl;
145 cout << "***************************************************" << endl;
fef32488 146
147 // Trying to see if we're requested to draw something specific instead
148 // of the global view of all the chambers
149
150 AliMUONVPainter* painter(0x0);
151 TObjArray args;
152 args.SetOwner(kTRUE);
153
154 for ( int i = 1; i < argc[0]; ++i )
155 {
156 args.Add(new TObjString(argv[i]));
157 }
158
159 for ( Int_t i = 0; i <= args.GetLast(); ++i )
160 {
161 TString a(static_cast<TObjString*>(args.At(i))->String());
10eb3d17 162
fef32488 163 AliMUONAttPainter att;
164
165 att.SetPlane(kTRUE,kFALSE);
166 att.SetCathode(kFALSE,kFALSE);
167 att.SetViewPoint(kTRUE,kFALSE);
168
169 if ( a == "--de" )
170 {
171 Int_t detElemId = static_cast<TObjString*>(args.At(i+1))->String().Atoi();
172
173 painter = new AliMUONDEPainter(att,detElemId);
174
175 painter->SetOutlined("*",kFALSE);
176 painter->SetOutlined("BUSPATCH",kTRUE);
177
178 painter->SetLine(1,4,3);
179 ++i;
180 }
181
182 if ( a == "--chamber" )
183 {
184 Int_t chamberId = static_cast<TObjString*>(args.At(i+1))->String().Atoi();
185
186 painter = new AliMUONChamberPainter(att,chamberId-1);
187
188 painter->SetOutlined("*",kFALSE);
189 painter->SetOutlined("DE",kTRUE);
190
191 painter->SetLine(1,4,3);
192 ++i;
193 }
194
195 }
196
197 if ( painter )
198 {
fcabdc0c 199 pmf->ShiftClicked(painter,0x0);
fef32488 200
fcabdc0c 201 pmf->Update();
fef32488 202 }
203
90037e4e 204}
205
206//______________________________________________________________________________
207AliMUONMchViewApplication::~AliMUONMchViewApplication()
208{
209 /// dtor
fcabdc0c 210 delete fPainterMasterFrameList;
211}
212
213//_____________________________________________________________________________
214AliMUONPainterMatrix*
215AliMUONMchViewApplication::GenerateStartupMatrix()
216{
217 /// Kind of bootstrap method to trigger the generation of all contours
218
219 AliCodeTimerAuto("",0);
220
221 AliMUONAttPainter att;
222
223 att.SetViewPoint(kTRUE,kFALSE);
224 att.SetCathode(kFALSE,kFALSE);
225 att.SetPlane(kTRUE,kFALSE);
226
227 AliMUONPainterMatrix* matrix = new AliMUONPainterMatrix("Tracker",5,2);
228
229 for ( Int_t i = 0; i < 10; ++i )
230 {
231 AliMUONVPainter* painter = new AliMUONChamberPainter(att,i);
232
233 painter->SetResponder("Chamber");
234
235 painter->SetOutlined("*",kFALSE);
236
237 painter->SetOutlined("MANU",kTRUE);
238
239 for ( Int_t j = 0; j < 3; ++j )
240 {
241 painter->SetLine(j,1,4-j);
242 }
243
244 matrix->Adopt(painter);
245 }
246 AliMUONPainterRegistry::Instance()->Register(matrix);
247 return matrix;
90037e4e 248}
249
49419555 250//______________________________________________________________________________
251void
252AliMUONMchViewApplication::CompareData()
253{
254 /// Launch compare data dialog
255 TGTransientFrame* t = new AliMUONTrackerDataCompareDialog(gClient->GetRoot(),
256 gClient->GetRoot(),
257 400,400);
258
259 t->MapSubwindows();
260 t->Resize();
261 t->MapWindow();
262 t->CenterOnParent();
263
264 // set names
265
266 t->SetWindowName("mchview compare data tool");
267 t->SetIconName("mchview compare data tool");
268
fcabdc0c 269 t->MapRaised();
49419555 270}
271
90037e4e 272//______________________________________________________________________________
273void
274AliMUONMchViewApplication::CreateMenuBar(UInt_t w)
275{
276 /// Create the application menu bar
277
278 TGPopupMenu* file = new TGPopupMenu(gClient->GetRoot());
279
280 file->AddEntry("&Open...",fgkFILEOPEN);
281 file->AddEntry("&Save As...",fgkFILESAVEAS);
10eb3d17 282 file->AddEntry("&Print As...",fgkFILEPRINTAS);
90037e4e 283 file->AddEntry("&Exit",fgkFILEEXIT);
284
90037e4e 285 TGMenuBar* bar = new TGMenuBar(fMainFrame,w);
286
49419555 287 TGPopupMenu* tools = new TGPopupMenu(gClient->GetRoot());
288 tools->AddEntry("&Compare data",fgkCOMPAREDATA);
289
10eb3d17 290 TGPopupMenu* about = new TGPopupMenu(gClient->GetRoot());
49419555 291 about->AddEntry(FullVersion(),fgkABOUT);
10eb3d17 292
49419555 293 file->Connect("Activated(Int_t)","AliMUONMchViewApplication",this,"HandleMenu(Int_t)");
294 about->Connect("Activated(Int_t)","AliMUONMchViewApplication",this,"HandleMenu(Int_t)");
295 tools->Connect("Activated(Int_t)","AliMUONMchViewApplication",this,"HandleMenu(Int_t)");
296
90037e4e 297 bar->AddPopup("&File",file,new TGLayoutHints(kLHintsLeft|kLHintsTop));
49419555 298 bar->AddPopup("&Tools",tools,new TGLayoutHints(kLHintsLeft|kLHintsTop));
10eb3d17 299 bar->AddPopup("&About",about,new TGLayoutHints(kLHintsRight|kLHintsTop));
90037e4e 300
301 fMainFrame->AddFrame(bar,new TGLayoutHints(kLHintsLeft|kLHintsExpandX));
302
303 AliMUONPainterRegistry::Instance()->SetMenuBar(bar);
304}
305
306//______________________________________________________________________________
307void
308AliMUONMchViewApplication::HandleMenu(Int_t i)
309{
310 /// Handle the click of one menu item
311
312 switch (i)
313 {
314 case fgkFILEEXIT:
315 Terminate(1);
316 break;
317 case fgkFILEOPEN:
318 Open();
319 break;
320 case fgkFILESAVEAS:
321 Save();
322 break;
10eb3d17 323 case fgkFILEPRINTAS:
324 PrintAs();
325 break;
49419555 326 case fgkABOUT:
327 ReleaseNotes();
328 break;
329 case fgkCOMPAREDATA:
330 CompareData();
331 break;
90037e4e 332 default:
333 break;
334 }
335}
336
337//______________________________________________________________________________
338void
339AliMUONMchViewApplication::Open()
340{
341 /// Open file dialog
342
343 TGFileInfo fileInfo;
344
10eb3d17 345 fileInfo.fFileTypes = fgkFileTypes;
346
49419555 347 delete[] fileInfo.fIniDir;
348
349 AliMUONPainterEnv* env = AliMUONPainterHelper::Instance()->Env();
350
351 fileInfo.fIniDir = StrDup(env->String("LastOpenDir","."));
352
90037e4e 353 new TGFileDialog(gClient->GetRoot(),gClient->GetRoot(),
354 kFDOpen,&fileInfo);
49419555 355
356 env->Set("LastOpenDir",fileInfo.fIniDir);
357 env->Save();
358
90037e4e 359 Open(gSystem->ExpandPathName(Form("%s",fileInfo.fFilename)));
360}
361
362//______________________________________________________________________________
363void
364AliMUONMchViewApplication::Open(const char* filename)
365{
49419555 366 /// Open a given file containing saved VTrackerDataMaker objects
90037e4e 367
49419555 368 TString sfilename(gSystem->ExpandPathName(filename));
90037e4e 369
49419555 370 if ( sfilename.Contains(TRegexp("^alien")) )
371 {
372 // insure we've initialized the grid...
373 if (!gGrid)
374 {
375 TGrid::Connect("alien://");
376 }
377 }
378
379 TFile* f = TFile::Open(filename);
380
632a2059 381 ReadDir(*f);
382
383 delete f;
384}
385
386//______________________________________________________________________________
387void
388AliMUONMchViewApplication::ReadDir(TDirectory& dir)
389{
72dae9ff 390 /// Read the given directory and import VTrackerData objects found
391
632a2059 392 TList* keys = dir.GetListOfKeys();
90037e4e 393 TIter next(keys);
394
395 TKey* k;
396
397 while ( ( k = static_cast<TKey*>(next()) ) )
398 {
399 TObject* object = k->ReadObj();
49419555 400
632a2059 401 if ( object->InheritsFrom("TDirectory") )
402 {
403 TDirectory* d = static_cast<TDirectory*>(object);
404 ReadDir(*d);
405 continue;
406 }
407
49419555 408 if ( object->InheritsFrom("AliMUONVTrackerDataMaker") )
409 {
410 AliMUONVTrackerDataMaker* maker = dynamic_cast<AliMUONVTrackerDataMaker*>(object);
411 if ( maker )
412 {
8f0acce4 413 AliMUONPainterDataRegistry::Instance()->Register(maker);
49419555 414 }
415 }
90037e4e 416
417 if ( object->InheritsFrom("AliMUONVTrackerData") )
418 {
49419555 419 // this is for backward compatibility. Early versions of mchview
420 // wrote VTrackerData objects, and not VTrackerDataMaker ones.
421
422 AliMUONVTrackerData* data = dynamic_cast<AliMUONVTrackerData*>(object);
90037e4e 423 if ( data )
424 {
49419555 425 AliMUONVTrackerDataMaker* maker = new AliMUONTrackerDataWrapper(data);
8f0acce4 426 AliMUONPainterDataRegistry::Instance()->Register(maker);
90037e4e 427 }
428 }
429 }
49419555 430
90037e4e 431}
432
10eb3d17 433//______________________________________________________________________________
434void
435AliMUONMchViewApplication::PrintAs()
436{
437 /// Print as...
438
439 TGFileInfo fileInfo;
440
441 new TGFileDialog(gClient->GetRoot(),gClient->GetRoot(),
442 kFDSave,&fileInfo);
443
fcabdc0c 444 TIter next(fPainterMasterFrameList);
445 AliMUONPainterMasterFrame* pmf;
446 Bool_t first(kTRUE);
447
448 while ( ( pmf = static_cast<AliMUONPainterMasterFrame*>(next()) ) )
449 {
450 pmf->SaveAs(gSystem->ExpandPathName(Form("%s",fileInfo.fFilename)),
451 first ? "RECREATE" : "UPDATE");
452 first = kFALSE;
453 }
10eb3d17 454}
455
49419555 456//______________________________________________________________________________
457void
458AliMUONMchViewApplication::ReleaseNotes()
459{
460 /// Display release notes
461
462 UInt_t width = 600;
463 UInt_t height = 400;
464
465 TGTransientFrame* t = new TGTransientFrame(gClient->GetRoot(),gClient->GetRoot(),width,height);
466
467 TGTextView* rn = new TGTextView(t);
1ffbeb9d 468
007e62b2 469 rn->AddLine("1.08");
470 rn->AddLine("");
471 rn->AddLine("Changed the default OCDB to 2011 version");
472 rn->AddLine("");
473
6ebcde15 474 rn->AddLine("1.07");
475 rn->AddLine("");
476 rn->AddLine("Added the RejectList as a possible OCDB data source");
477 rn->AddLine("");
478
991adcd3 479 rn->AddLine("1.06");
480 rn->AddLine("");
481 rn->AddLine("Changed a bit the HV display. Now a trip is indicated with a value of -1");
482 rn->AddLine("");
483
a679753e 484 rn->AddLine("1.05");
485 rn->AddLine("");
486 rn->AddLine("Added the possibility to select an event range when reading raw data");
487 rn->AddLine("Usefull e.g. to look at a single suspect event...");
488 rn->AddLine("");
489
f5a46139 490 rn->AddLine("1.04");
491 rn->AddLine("");
492 rn->AddLine("Changed the default OCDB to 2010 version");
493 rn->AddLine("");
494
fcabdc0c 495 rn->AddLine("1.03");
496 rn->AddLine("");
497 rn->AddLine("Add Print buttons");
498 rn->AddLine("Add the automatic creation of often used canvases when using pedestal source");
499 // Internal reorganization to allow several independent tabs to be created to
500 // show different master frames (not used yet). Important for the moment
501 // is the ability to create a PainterMatrix and pass it to the PainterMasterFrame
502 rn->AddLine("");
503
ca913045 504 rn->AddLine("1.02");
505 rn->AddLine("");
506 rn->AddLine("Internal change (merging of AliMUONTrackerACFDataMaker and AliMUONTrackerOCDBDataMaker into AliMUONTrackerConditionDataMaker)");
507 rn->AddLine("Added --ocdb option");
508 rn->AddLine("Corrected the display of the configuration");
509 rn->AddLine("Corrected the interpretation of the switches for the HV display");
510 rn->AddLine("");
511
6c870207 512 rn->AddLine("1.01");
513 rn->AddLine("");
514 rn->AddLine("Added the configuration as a possible OCDB data source");
515 rn->AddLine("");
516
fef32488 517 rn->AddLine("1.00");
518 rn->AddLine("");
519 rn->AddLine("Added the Status and StatusMap as a possible OCDB data source");
520 rn->AddLine("");
521 rn->AddLine("Added one (computed) dimension to the Gains data source = 1/a1/0.2 (mV/fC)");
522 rn->AddLine("");
6c870207 523
fef32488 524 rn->AddLine("0.99a");
525 rn->AddLine("");
526 rn->AddLine("Added the --de and --chamber options");
527 rn->AddLine("");
528
dc9bb08e 529 rn->AddLine("0.99");
530 rn->AddLine("");
531 rn->AddLine("The chamberid in the label (top right of panel) is now starting at 1 as in common usage");
532 rn->AddLine("");
533
3f979838 534 rn->AddLine("0.98");
535 rn->AddLine("");
536 rn->AddLine("Added --asciimapping option");
537 rn->AddLine("");
538
66cdf5b3 539 rn->AddLine("0.97");
540 rn->AddLine("");
541 rn->AddLine("Adding calibration option with Emelec (aka injection) gain");
542 rn->AddLine("");
543
8f0acce4 544 rn->AddLine("0.96a");
545 rn->AddLine("");
546 rn->AddLine("Internal reorganization of the contour computations, that lead to improved performance. ");
547 rn->AddLine("Improved enough to be able to remove completely the usage of the padstore.root file with precomputed contours.");
548 rn->AddLine("");
549
b6f591ae 550 rn->AddLine("0.96");
551 rn->AddLine("");
552 rn->AddLine("New features");
553 rn->AddLine("");
554 rn->AddLine("- Can now read raw data from memory (using the mem://@gdc: syntax)");
555 rn->AddLine("- Raw data decoder now automatically skips buspatches with parity errors");
556 rn->AddLine("");
557
558 rn->AddLine("0.95");
1ffbeb9d 559 rn->AddLine("");
560 rn->AddLine("New features");
561 rn->AddLine("");
562 rn->AddLine("- Can now read and display HV values from OCDB");
563 rn->AddLine("- New program option --geometry to force geometry of the window");
564 rn->AddLine("- Added possibility, in painters' context menu, to include or exclude part of the detector");
565 rn->AddLine(" (which will be used later on to communicate with LC2 which parts should be read out or not)");
566 rn->AddLine("");
567 rn->AddLine("Improvement");
568 rn->AddLine("");
569 rn->AddLine("- When displaying Gains, the quality information is now decoded");
570 rn->AddLine("");
49419555 571
1286237e 572 rn->AddLine("0.94");
573 rn->AddLine("");
574 rn->AddLine("New features");
575 rn->AddLine("");
576 rn->AddLine("Can now read ASCII calibration files produced by the DA");
577 rn->AddLine("");
578
49419555 579 rn->AddLine("0.93");
580 rn->AddLine("");
581 rn->AddLine("New features");
582 rn->AddLine("");
583 rn->AddLine("- Adding a Lock button under the color slider to lock the range shown");
584 rn->AddLine(" when switching between views");
585 rn->AddLine("- Default display now shows bending plane (instead of cathode 0 before)");
586 rn->AddLine("- If pad is responder and there's some histo for that pad, ");
587 rn->AddLine(" clicking on it will display an histo");
588 rn->AddLine("- Right-click on a painter will now display several histogram options");
589 rn->AddLine(" (e.g. raw charge as before, but also simple distributions of mean");
590 rn->AddLine(" and sigma");
591 rn->AddLine("- In the Data Sources Tab, each data source can now be removed and saved");
592 rn->AddLine("- There's a new Tool menu which allow to produce a TrackerData from two others");
593 rn->AddLine(" in order to compare data.");
594 rn->AddLine(" - The --use option can now reference alien files");
595 rn->AddLine("");
596 rn->AddLine("Bug fixes");
597 rn->AddLine("");
598 rn->AddLine("- Can now read Capacitances from OCDB");
599
600 rn->Resize(width,height);
601
602 t->AddFrame(rn, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY));
603
604 t->MapSubwindows();
605 t->Resize();
606 t->MapWindow();
607 t->CenterOnParent();
608
609 // set names
610
611 t->SetWindowName("mchview release notes");
612 t->SetIconName("mchview release notes");
613
614// t->SetMWMHints(kMWMDecorAll | kMWMDecorResizeH | kMWMDecorMaximize |
615// kMWMDecorMinimize | kMWMDecorMenu,
616// kMWMFuncAll | kMWMFuncResize | kMWMFuncMaximize |
617// kMWMFuncMinimize,
618// kMWMInputModeless);
619
620 t->MapRaised();
621// gClient->WaitFor(t);
622}
623
90037e4e 624//______________________________________________________________________________
625void
626AliMUONMchViewApplication::Save()
627{
628 /// Open "Save VTrackerData objects to file" dialog
629
630 TGFileInfo fileInfo;
631
632 new TGFileDialog(gClient->GetRoot(),gClient->GetRoot(),
633 kFDSave,&fileInfo);
634
635 Save(gSystem->ExpandPathName(Form("%s",fileInfo.fFilename)));
636}
637
638//______________________________________________________________________________
639void
640AliMUONMchViewApplication::Save(const char* filename)
641{
49419555 642 /// Save VTrackerDataMaker objects into file of given name
90037e4e 643
8f0acce4 644 AliMUONPainterDataRegistry* reg = AliMUONPainterDataRegistry::Instance();
90037e4e 645
646 TFile f(filename,"RECREATE");
647
49419555 648 for ( Int_t i = 0; i < reg->NumberOfDataMakers(); ++i )
90037e4e 649 {
49419555 650 AliMUONVTrackerDataMaker* maker = reg->DataMaker(i);
651 maker->Write();
90037e4e 652 }
653
654 f.Close();
655}