]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONMchViewApplication.cxx
update from Marco
[u/mrichter/AliRoot.git] / MUON / AliMUONMchViewApplication.cxx
index 1471ebaf034da66fffde7320f700f2b329d5d32d..e23eaeaed4905b39079fba69cd7866bb8788ce1d 100644 (file)
@@ -20,6 +20,7 @@
 #include "AliCDBManager.h"
 #include "AliCodeTimer.h"
 #include "AliLog.h"
+#include "AliMUONAlignmentCompareDialog.h"
 #include "AliMUONChamberPainter.h"
 #include "AliMUONDEPainter.h"
 #include "AliMUONPainterDataRegistry.h"
@@ -56,6 +57,8 @@
 ///
 ///\author Laurent Aphecetche, Subatech
 
+using std::cout;
+using std::endl;
 /// \cond CLASSIMP
 ClassImp(AliMUONMchViewApplication)
 /// \endcond CLASSIMP
@@ -66,6 +69,7 @@ const Int_t AliMUONMchViewApplication::fgkFILEEXIT(3);
 const Int_t AliMUONMchViewApplication::fgkFILEPRINTAS(4);
 const Int_t AliMUONMchViewApplication::fgkABOUT(5);
 const Int_t AliMUONMchViewApplication::fgkCOMPAREDATA(6);
+const Int_t AliMUONMchViewApplication::fgkCOMPAREALIGNMENTS(7);
 
 const char* AliMUONMchViewApplication::fgkFileTypes[] = { 
   "ROOT files",    "*.root", 
@@ -135,9 +139,10 @@ AliMUONMchViewApplication::AliMUONMchViewApplication(const char* name,
   
   fMainFrame->Connect("CloseWindow()","AliMUONMchViewApplication",this,"Terminate()");
 
-  fMainFrame->MoveResize(ox,oy, w, h); 
+//  fMainFrame->MoveResize(ox,oy, w, h); 
   fMainFrame->SetWMPosition(ox, oy);
-  fMainFrame->SetWMSizeHints(w,h,w,h,0,0);
+//  fMainFrame->SetWMSizeHints(w,h,w,h,0,0);
+//  fMainFrame->SetWMSizeHints(w,h,w,h,10,10);
   
   cout << "***************************************************" << endl;
   cout << "   Welcome to mchview" << endl;
@@ -247,6 +252,28 @@ AliMUONMchViewApplication::GenerateStartupMatrix()
   return matrix;
 }
 
+//______________________________________________________________________________
+void
+AliMUONMchViewApplication::CompareAlignments()
+{
+  /// Launch compare data dialog
+  TGTransientFrame* t = new AliMUONAlignmentCompareDialog(gClient->GetRoot(),
+                                                          gClient->GetRoot(),
+                                                          400,400);
+  
+  t->MapSubwindows();
+  t->Resize();
+  t->MapWindow();
+  t->CenterOnParent();
+  
+  // set names
+  
+  t->SetWindowName("mchview compare alignments tool");
+  t->SetIconName("mchview compare alignments tool");
+  
+  t->MapRaised();  
+}
+
 //______________________________________________________________________________
 void
 AliMUONMchViewApplication::CompareData()
@@ -286,6 +313,7 @@ AliMUONMchViewApplication::CreateMenuBar(UInt_t w)
   
   TGPopupMenu* tools = new TGPopupMenu(gClient->GetRoot());
   tools->AddEntry("&Compare data",fgkCOMPAREDATA);
+  tools->AddEntry("&Compare alignments",fgkCOMPAREALIGNMENTS);
   
   TGPopupMenu* about = new TGPopupMenu(gClient->GetRoot());  
   about->AddEntry(FullVersion(),fgkABOUT);
@@ -329,7 +357,10 @@ AliMUONMchViewApplication::HandleMenu(Int_t i)
     case fgkCOMPAREDATA:
       CompareData();
       break;
-    default:
+    case fgkCOMPAREALIGNMENTS:
+      CompareAlignments();
+      break;
+      default:
       break;
     }
 }
@@ -466,6 +497,26 @@ AliMUONMchViewApplication::ReleaseNotes()
   
   TGTextView* rn = new TGTextView(t);
 
+  rn->AddLine("1.14");
+  rn->AddLine("");
+  rn->AddLine("Fixing anti-aliasing problem on MacOSX");
+  rn->AddLine("");
+
+  rn->AddLine("1.13");
+  rn->AddLine("");
+  rn->AddLine("Make default OCDB = 2013 one");
+  rn->AddLine("");
+
+  rn->AddLine("1.11");
+  rn->AddLine("");
+  rn->AddLine("Adding [Compare alignments] in the Tools menu + make default OCDB be 2012's version");
+  rn->AddLine("");
+  
+  rn->AddLine("1.10");
+  rn->AddLine("");
+  rn->AddLine("Make the raw OCDB more obvious in the data source tab");
+  rn->AddLine("");
+  
   rn->AddLine("1.08");
   rn->AddLine("");
   rn->AddLine("Changed the default OCDB to 2011 version");