LCOV - code coverage report
Current view: top level - MUON/MUONgraphics - AliMUONMchViewApplication.cxx (source / functions) Hit Total Coverage
Test: coverage.info Lines: 1 363 0.3 %
Date: 2016-06-14 17:26:59 Functions: 1 20 5.0 %

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

Generated by: LCOV version 1.11