]>
Commit | Line | Data |
---|---|---|
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 | |
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); | |
10eb3d17 | 66 | const Int_t AliMUONMchViewApplication::fgkFILEPRINTAS(4); |
49419555 | 67 | const Int_t AliMUONMchViewApplication::fgkABOUT(5); |
68 | const Int_t AliMUONMchViewApplication::fgkCOMPAREDATA(6); | |
10eb3d17 | 69 | |
70 | const char* AliMUONMchViewApplication::fgkFileTypes[] = { | |
71 | "ROOT files", "*.root", | |
72 | "All files", "*", | |
73 | 0, 0 }; | |
90037e4e | 74 | |
75 | //______________________________________________________________________________ | |
76 | AliMUONMchViewApplication::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 | ||
90 | if (!w | !h) | |
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 | //______________________________________________________________________________ | |
207 | AliMUONMchViewApplication::~AliMUONMchViewApplication() | |
208 | { | |
209 | /// dtor | |
fcabdc0c | 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; | |
90037e4e | 248 | } |
249 | ||
49419555 | 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 | ||
fcabdc0c | 269 | t->MapRaised(); |
49419555 | 270 | } |
271 | ||
90037e4e | 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); | |
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 | //______________________________________________________________________________ | |
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; | |
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 | //______________________________________________________________________________ | |
338 | void | |
339 | AliMUONMchViewApplication::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 | //______________________________________________________________________________ | |
363 | void | |
364 | AliMUONMchViewApplication::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 | //______________________________________________________________________________ | |
387 | void | |
388 | AliMUONMchViewApplication::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 | //______________________________________________________________________________ |
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 | ||
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 | //______________________________________________________________________________ |
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); | |
1ffbeb9d | 468 | |
fcabdc0c | 469 | rn->AddLine("1.03"); |
470 | rn->AddLine(""); | |
471 | rn->AddLine("Add Print buttons"); | |
472 | rn->AddLine("Add the automatic creation of often used canvases when using pedestal source"); | |
473 | // Internal reorganization to allow several independent tabs to be created to | |
474 | // show different master frames (not used yet). Important for the moment | |
475 | // is the ability to create a PainterMatrix and pass it to the PainterMasterFrame | |
476 | rn->AddLine(""); | |
477 | ||
ca913045 | 478 | rn->AddLine("1.02"); |
479 | rn->AddLine(""); | |
480 | rn->AddLine("Internal change (merging of AliMUONTrackerACFDataMaker and AliMUONTrackerOCDBDataMaker into AliMUONTrackerConditionDataMaker)"); | |
481 | rn->AddLine("Added --ocdb option"); | |
482 | rn->AddLine("Corrected the display of the configuration"); | |
483 | rn->AddLine("Corrected the interpretation of the switches for the HV display"); | |
484 | rn->AddLine(""); | |
485 | ||
6c870207 | 486 | rn->AddLine("1.01"); |
487 | rn->AddLine(""); | |
488 | rn->AddLine("Added the configuration as a possible OCDB data source"); | |
489 | rn->AddLine(""); | |
490 | ||
fef32488 | 491 | rn->AddLine("1.00"); |
492 | rn->AddLine(""); | |
493 | rn->AddLine("Added the Status and StatusMap as a possible OCDB data source"); | |
494 | rn->AddLine(""); | |
495 | rn->AddLine("Added one (computed) dimension to the Gains data source = 1/a1/0.2 (mV/fC)"); | |
496 | rn->AddLine(""); | |
6c870207 | 497 | |
fef32488 | 498 | rn->AddLine("0.99a"); |
499 | rn->AddLine(""); | |
500 | rn->AddLine("Added the --de and --chamber options"); | |
501 | rn->AddLine(""); | |
502 | ||
dc9bb08e | 503 | rn->AddLine("0.99"); |
504 | rn->AddLine(""); | |
505 | rn->AddLine("The chamberid in the label (top right of panel) is now starting at 1 as in common usage"); | |
506 | rn->AddLine(""); | |
507 | ||
3f979838 | 508 | rn->AddLine("0.98"); |
509 | rn->AddLine(""); | |
510 | rn->AddLine("Added --asciimapping option"); | |
511 | rn->AddLine(""); | |
512 | ||
66cdf5b3 | 513 | rn->AddLine("0.97"); |
514 | rn->AddLine(""); | |
515 | rn->AddLine("Adding calibration option with Emelec (aka injection) gain"); | |
516 | rn->AddLine(""); | |
517 | ||
8f0acce4 | 518 | rn->AddLine("0.96a"); |
519 | rn->AddLine(""); | |
520 | rn->AddLine("Internal reorganization of the contour computations, that lead to improved performance. "); | |
521 | rn->AddLine("Improved enough to be able to remove completely the usage of the padstore.root file with precomputed contours."); | |
522 | rn->AddLine(""); | |
523 | ||
b6f591ae | 524 | rn->AddLine("0.96"); |
525 | rn->AddLine(""); | |
526 | rn->AddLine("New features"); | |
527 | rn->AddLine(""); | |
528 | rn->AddLine("- Can now read raw data from memory (using the mem://@gdc: syntax)"); | |
529 | rn->AddLine("- Raw data decoder now automatically skips buspatches with parity errors"); | |
530 | rn->AddLine(""); | |
531 | ||
532 | rn->AddLine("0.95"); | |
1ffbeb9d | 533 | rn->AddLine(""); |
534 | rn->AddLine("New features"); | |
535 | rn->AddLine(""); | |
536 | rn->AddLine("- Can now read and display HV values from OCDB"); | |
537 | rn->AddLine("- New program option --geometry to force geometry of the window"); | |
538 | rn->AddLine("- Added possibility, in painters' context menu, to include or exclude part of the detector"); | |
539 | rn->AddLine(" (which will be used later on to communicate with LC2 which parts should be read out or not)"); | |
540 | rn->AddLine(""); | |
541 | rn->AddLine("Improvement"); | |
542 | rn->AddLine(""); | |
543 | rn->AddLine("- When displaying Gains, the quality information is now decoded"); | |
544 | rn->AddLine(""); | |
49419555 | 545 | |
1286237e | 546 | rn->AddLine("0.94"); |
547 | rn->AddLine(""); | |
548 | rn->AddLine("New features"); | |
549 | rn->AddLine(""); | |
550 | rn->AddLine("Can now read ASCII calibration files produced by the DA"); | |
551 | rn->AddLine(""); | |
552 | ||
49419555 | 553 | rn->AddLine("0.93"); |
554 | rn->AddLine(""); | |
555 | rn->AddLine("New features"); | |
556 | rn->AddLine(""); | |
557 | rn->AddLine("- Adding a Lock button under the color slider to lock the range shown"); | |
558 | rn->AddLine(" when switching between views"); | |
559 | rn->AddLine("- Default display now shows bending plane (instead of cathode 0 before)"); | |
560 | rn->AddLine("- If pad is responder and there's some histo for that pad, "); | |
561 | rn->AddLine(" clicking on it will display an histo"); | |
562 | rn->AddLine("- Right-click on a painter will now display several histogram options"); | |
563 | rn->AddLine(" (e.g. raw charge as before, but also simple distributions of mean"); | |
564 | rn->AddLine(" and sigma"); | |
565 | rn->AddLine("- In the Data Sources Tab, each data source can now be removed and saved"); | |
566 | rn->AddLine("- There's a new Tool menu which allow to produce a TrackerData from two others"); | |
567 | rn->AddLine(" in order to compare data."); | |
568 | rn->AddLine(" - The --use option can now reference alien files"); | |
569 | rn->AddLine(""); | |
570 | rn->AddLine("Bug fixes"); | |
571 | rn->AddLine(""); | |
572 | rn->AddLine("- Can now read Capacitances from OCDB"); | |
573 | ||
574 | rn->Resize(width,height); | |
575 | ||
576 | t->AddFrame(rn, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY)); | |
577 | ||
578 | t->MapSubwindows(); | |
579 | t->Resize(); | |
580 | t->MapWindow(); | |
581 | t->CenterOnParent(); | |
582 | ||
583 | // set names | |
584 | ||
585 | t->SetWindowName("mchview release notes"); | |
586 | t->SetIconName("mchview release notes"); | |
587 | ||
588 | // t->SetMWMHints(kMWMDecorAll | kMWMDecorResizeH | kMWMDecorMaximize | | |
589 | // kMWMDecorMinimize | kMWMDecorMenu, | |
590 | // kMWMFuncAll | kMWMFuncResize | kMWMFuncMaximize | | |
591 | // kMWMFuncMinimize, | |
592 | // kMWMInputModeless); | |
593 | ||
594 | t->MapRaised(); | |
595 | // gClient->WaitFor(t); | |
596 | } | |
597 | ||
90037e4e | 598 | //______________________________________________________________________________ |
599 | void | |
600 | AliMUONMchViewApplication::Save() | |
601 | { | |
602 | /// Open "Save VTrackerData objects to file" dialog | |
603 | ||
604 | TGFileInfo fileInfo; | |
605 | ||
606 | new TGFileDialog(gClient->GetRoot(),gClient->GetRoot(), | |
607 | kFDSave,&fileInfo); | |
608 | ||
609 | Save(gSystem->ExpandPathName(Form("%s",fileInfo.fFilename))); | |
610 | } | |
611 | ||
612 | //______________________________________________________________________________ | |
613 | void | |
614 | AliMUONMchViewApplication::Save(const char* filename) | |
615 | { | |
49419555 | 616 | /// Save VTrackerDataMaker objects into file of given name |
90037e4e | 617 | |
8f0acce4 | 618 | AliMUONPainterDataRegistry* reg = AliMUONPainterDataRegistry::Instance(); |
90037e4e | 619 | |
620 | TFile f(filename,"RECREATE"); | |
621 | ||
49419555 | 622 | for ( Int_t i = 0; i < reg->NumberOfDataMakers(); ++i ) |
90037e4e | 623 | { |
49419555 | 624 | AliMUONVTrackerDataMaker* maker = reg->DataMaker(i); |
625 | maker->Write(); | |
90037e4e | 626 | } |
627 | ||
628 | f.Close(); | |
629 | } |