]>
Commit | Line | Data |
---|---|---|
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 "AliMUONMchViewApplication.h" | |
19 | ||
20 | #include "AliCDBManager.h" | |
21 | #include "AliCodeTimer.h" | |
22 | #include "AliLog.h" | |
23 | #include "AliMUONChamberPainter.h" | |
24 | #include "AliMUONDEPainter.h" | |
25 | #include "AliMUONPainterDataRegistry.h" | |
26 | #include "AliMUONPainterDataSourceFrame.h" | |
27 | #include "AliMUONPainterEnv.h" | |
28 | #include "AliMUONPainterHelper.h" | |
29 | #include "AliMUONPainterGroup.h" | |
30 | #include "AliMUONPainterMasterFrame.h" | |
31 | #include "AliMUONPainterMatrix.h" | |
32 | #include "AliMUONPainterRegistry.h" | |
33 | #include "AliMUONTrackerDataCompareDialog.h" | |
34 | #include "AliMUONTrackerDataWrapper.h" | |
35 | #include "AliMUONVTrackerData.h" | |
36 | #include "AliMUONVTrackerDataMaker.h" | |
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> | |
45 | #include <TGTextView.h> | |
46 | #include <TGrid.h> | |
47 | #include <TKey.h> | |
48 | #include <TList.h> | |
49 | #include <TRegexp.h> | |
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 | |
60 | ClassImp(AliMUONMchViewApplication) | |
61 | /// \endcond CLASSIMP | |
62 | ||
63 | const Int_t AliMUONMchViewApplication::fgkFILESAVEAS(1); | |
64 | const Int_t AliMUONMchViewApplication::fgkFILEOPEN(2); | |
65 | const Int_t AliMUONMchViewApplication::fgkFILEEXIT(3); | |
66 | const Int_t AliMUONMchViewApplication::fgkFILEPRINTAS(4); | |
67 | const Int_t AliMUONMchViewApplication::fgkABOUT(5); | |
68 | const Int_t AliMUONMchViewApplication::fgkCOMPAREDATA(6); | |
69 | ||
70 | const char* AliMUONMchViewApplication::fgkFileTypes[] = { | |
71 | "ROOT files", "*.root", | |
72 | "All files", "*", | |
73 | 0, 0 }; | |
74 | ||
75 | //______________________________________________________________________________ | |
76 | AliMUONMchViewApplication::AliMUONMchViewApplication(const char* name, | |
77 | int* argc, char** argv, | |
78 | UInt_t w, UInt_t h, | |
79 | UInt_t ox, UInt_t oy) | |
80 | : TRint(name,argc,argv), | |
81 | fMainFrame(0x0), | |
82 | fPainterMasterFrameList(new TList), | |
83 | fTabs(0x0) | |
84 | { | |
85 | ||
86 | /// ctor | |
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 | ||
90 | if (!w || !h) | |
91 | { | |
92 | w = (UInt_t)(gClient->GetDisplayWidth()*0.7); | |
93 | h = (UInt_t)(gClient->GetDisplayHeight()*0.9); | |
94 | } | |
95 | ||
96 | fMainFrame = new TGMainFrame(gClient->GetRoot(),w,h); | |
97 | ||
98 | CreateMenuBar(w); | |
99 | ||
100 | const Int_t kbs = 2; | |
101 | ||
102 | // h -= 60; // menubar | |
103 | ||
104 | fTabs = new TGTab(fMainFrame,w,h); | |
105 | ||
106 | TGCompositeFrame* t = fTabs->AddTab("Painter Master Frame"); | |
107 | ||
108 | fPainterMasterFrameList->SetOwner(kTRUE); | |
109 | ||
110 | ||
111 | AliMUONPainterMasterFrame* pmf = new AliMUONPainterMasterFrame(t,t->GetWidth()-kbs*2,t->GetHeight()-kbs*2, | |
112 | GenerateStartupMatrix()); | |
113 | ||
114 | fPainterMasterFrameList->Add(pmf); | |
115 | ||
116 | t->AddFrame(pmf, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY,kbs,kbs,kbs,kbs)); | |
117 | ||
118 | t = fTabs->AddTab("Data Sources"); | |
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 | ||
125 | fMainFrame->AddFrame(fTabs,new TGLayoutHints(kLHintsExpandX | kLHintsExpandY,0,0,0,0)); | |
126 | ||
127 | fMainFrame->SetWindowName("mchview - Visualization of MUON Tracker detector"); | |
128 | ||
129 | fMainFrame->MapSubwindows(); | |
130 | fMainFrame->Resize(); | |
131 | ||
132 | pmf->Update(); | |
133 | ||
134 | fMainFrame->MapWindow(); | |
135 | ||
136 | fMainFrame->Connect("CloseWindow()","AliMUONMchViewApplication",this,"Terminate()"); | |
137 | ||
138 | fMainFrame->MoveResize(ox,oy, w, h); | |
139 | fMainFrame->SetWMPosition(ox, oy); | |
140 | fMainFrame->SetWMSizeHints(w,h,w,h,0,0); | |
141 | ||
142 | cout << "***************************************************" << endl; | |
143 | cout << " Welcome to mchview" << endl; | |
144 | cout << " " << FullVersion() << endl; | |
145 | cout << "***************************************************" << endl; | |
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()); | |
162 | ||
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 | { | |
199 | pmf->ShiftClicked(painter,0x0); | |
200 | ||
201 | pmf->Update(); | |
202 | } | |
203 | ||
204 | } | |
205 | ||
206 | //______________________________________________________________________________ | |
207 | AliMUONMchViewApplication::~AliMUONMchViewApplication() | |
208 | { | |
209 | /// dtor | |
210 | delete fPainterMasterFrameList; | |
211 | } | |
212 | ||
213 | //_____________________________________________________________________________ | |
214 | AliMUONPainterMatrix* | |
215 | AliMUONMchViewApplication::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; | |
248 | } | |
249 | ||
250 | //______________________________________________________________________________ | |
251 | void | |
252 | AliMUONMchViewApplication::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 | ||
269 | t->MapRaised(); | |
270 | } | |
271 | ||
272 | //______________________________________________________________________________ | |
273 | void | |
274 | AliMUONMchViewApplication::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); | |
282 | file->AddEntry("&Print As...",fgkFILEPRINTAS); | |
283 | file->AddEntry("&Exit",fgkFILEEXIT); | |
284 | ||
285 | TGMenuBar* bar = new TGMenuBar(fMainFrame,w); | |
286 | ||
287 | TGPopupMenu* tools = new TGPopupMenu(gClient->GetRoot()); | |
288 | tools->AddEntry("&Compare data",fgkCOMPAREDATA); | |
289 | ||
290 | TGPopupMenu* about = new TGPopupMenu(gClient->GetRoot()); | |
291 | about->AddEntry(FullVersion(),fgkABOUT); | |
292 | ||
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 | ||
297 | bar->AddPopup("&File",file,new TGLayoutHints(kLHintsLeft|kLHintsTop)); | |
298 | bar->AddPopup("&Tools",tools,new TGLayoutHints(kLHintsLeft|kLHintsTop)); | |
299 | bar->AddPopup("&About",about,new TGLayoutHints(kLHintsRight|kLHintsTop)); | |
300 | ||
301 | fMainFrame->AddFrame(bar,new TGLayoutHints(kLHintsLeft|kLHintsExpandX)); | |
302 | ||
303 | AliMUONPainterRegistry::Instance()->SetMenuBar(bar); | |
304 | } | |
305 | ||
306 | //______________________________________________________________________________ | |
307 | void | |
308 | AliMUONMchViewApplication::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; | |
323 | case fgkFILEPRINTAS: | |
324 | PrintAs(); | |
325 | break; | |
326 | case fgkABOUT: | |
327 | ReleaseNotes(); | |
328 | break; | |
329 | case fgkCOMPAREDATA: | |
330 | CompareData(); | |
331 | break; | |
332 | default: | |
333 | break; | |
334 | } | |
335 | } | |
336 | ||
337 | //______________________________________________________________________________ | |
338 | void | |
339 | AliMUONMchViewApplication::Open() | |
340 | { | |
341 | /// Open file dialog | |
342 | ||
343 | TGFileInfo fileInfo; | |
344 | ||
345 | fileInfo.fFileTypes = fgkFileTypes; | |
346 | ||
347 | delete[] fileInfo.fIniDir; | |
348 | ||
349 | AliMUONPainterEnv* env = AliMUONPainterHelper::Instance()->Env(); | |
350 | ||
351 | fileInfo.fIniDir = StrDup(env->String("LastOpenDir",".")); | |
352 | ||
353 | new TGFileDialog(gClient->GetRoot(),gClient->GetRoot(), | |
354 | kFDOpen,&fileInfo); | |
355 | ||
356 | env->Set("LastOpenDir",fileInfo.fIniDir); | |
357 | env->Save(); | |
358 | ||
359 | Open(gSystem->ExpandPathName(Form("%s",fileInfo.fFilename))); | |
360 | } | |
361 | ||
362 | //______________________________________________________________________________ | |
363 | void | |
364 | AliMUONMchViewApplication::Open(const char* filename) | |
365 | { | |
366 | /// Open a given file containing saved VTrackerDataMaker objects | |
367 | ||
368 | TString sfilename(gSystem->ExpandPathName(filename)); | |
369 | ||
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 | ||
381 | ReadDir(*f); | |
382 | ||
383 | delete f; | |
384 | } | |
385 | ||
386 | //______________________________________________________________________________ | |
387 | void | |
388 | AliMUONMchViewApplication::ReadDir(TDirectory& dir) | |
389 | { | |
390 | /// Read the given directory and import VTrackerData objects found | |
391 | ||
392 | TList* keys = dir.GetListOfKeys(); | |
393 | TIter next(keys); | |
394 | ||
395 | TKey* k; | |
396 | ||
397 | while ( ( k = static_cast<TKey*>(next()) ) ) | |
398 | { | |
399 | TObject* object = k->ReadObj(); | |
400 | ||
401 | if ( object->InheritsFrom("TDirectory") ) | |
402 | { | |
403 | TDirectory* d = static_cast<TDirectory*>(object); | |
404 | ReadDir(*d); | |
405 | continue; | |
406 | } | |
407 | ||
408 | if ( object->InheritsFrom("AliMUONVTrackerDataMaker") ) | |
409 | { | |
410 | AliMUONVTrackerDataMaker* maker = dynamic_cast<AliMUONVTrackerDataMaker*>(object); | |
411 | if ( maker ) | |
412 | { | |
413 | AliMUONPainterDataRegistry::Instance()->Register(maker); | |
414 | } | |
415 | } | |
416 | ||
417 | if ( object->InheritsFrom("AliMUONVTrackerData") ) | |
418 | { | |
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); | |
423 | if ( data ) | |
424 | { | |
425 | AliMUONVTrackerDataMaker* maker = new AliMUONTrackerDataWrapper(data); | |
426 | AliMUONPainterDataRegistry::Instance()->Register(maker); | |
427 | } | |
428 | } | |
429 | } | |
430 | ||
431 | } | |
432 | ||
433 | //______________________________________________________________________________ | |
434 | void | |
435 | AliMUONMchViewApplication::PrintAs() | |
436 | { | |
437 | /// Print as... | |
438 | ||
439 | TGFileInfo fileInfo; | |
440 | ||
441 | new TGFileDialog(gClient->GetRoot(),gClient->GetRoot(), | |
442 | kFDSave,&fileInfo); | |
443 | ||
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 | } | |
454 | } | |
455 | ||
456 | //______________________________________________________________________________ | |
457 | void | |
458 | AliMUONMchViewApplication::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); | |
468 | ||
469 | rn->AddLine("1.08"); | |
470 | rn->AddLine(""); | |
471 | rn->AddLine("Changed the default OCDB to 2011 version"); | |
472 | rn->AddLine(""); | |
473 | ||
474 | rn->AddLine("1.07"); | |
475 | rn->AddLine(""); | |
476 | rn->AddLine("Added the RejectList as a possible OCDB data source"); | |
477 | rn->AddLine(""); | |
478 | ||
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 | ||
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 | ||
490 | rn->AddLine("1.04"); | |
491 | rn->AddLine(""); | |
492 | rn->AddLine("Changed the default OCDB to 2010 version"); | |
493 | rn->AddLine(""); | |
494 | ||
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 | ||
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 | ||
512 | rn->AddLine("1.01"); | |
513 | rn->AddLine(""); | |
514 | rn->AddLine("Added the configuration as a possible OCDB data source"); | |
515 | rn->AddLine(""); | |
516 | ||
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(""); | |
523 | ||
524 | rn->AddLine("0.99a"); | |
525 | rn->AddLine(""); | |
526 | rn->AddLine("Added the --de and --chamber options"); | |
527 | rn->AddLine(""); | |
528 | ||
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 | ||
534 | rn->AddLine("0.98"); | |
535 | rn->AddLine(""); | |
536 | rn->AddLine("Added --asciimapping option"); | |
537 | rn->AddLine(""); | |
538 | ||
539 | rn->AddLine("0.97"); | |
540 | rn->AddLine(""); | |
541 | rn->AddLine("Adding calibration option with Emelec (aka injection) gain"); | |
542 | rn->AddLine(""); | |
543 | ||
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 | ||
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"); | |
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(""); | |
571 | ||
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 | ||
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 | ||
624 | //______________________________________________________________________________ | |
625 | void | |
626 | AliMUONMchViewApplication::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 | //______________________________________________________________________________ | |
639 | void | |
640 | AliMUONMchViewApplication::Save(const char* filename) | |
641 | { | |
642 | /// Save VTrackerDataMaker objects into file of given name | |
643 | ||
644 | AliMUONPainterDataRegistry* reg = AliMUONPainterDataRegistry::Instance(); | |
645 | ||
646 | TFile f(filename,"RECREATE"); | |
647 | ||
648 | for ( Int_t i = 0; i < reg->NumberOfDataMakers(); ++i ) | |
649 | { | |
650 | AliMUONVTrackerDataMaker* maker = reg->DataMaker(i); | |
651 | maker->Write(); | |
652 | } | |
653 | ||
654 | f.Close(); | |
655 | } |