]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONMchViewApplication.cxx
Added possibility to run without reading the MC (Andrea)
[u/mrichter/AliRoot.git] / MUON / AliMUONMchViewApplication.cxx
index 99c6573abab88a60870dd0b977e8707002f16e41..fdf57a7ffb85cf89e6f3053be653bda480e0595c 100644 (file)
@@ -20,6 +20,9 @@
 #include "AliCDBManager.h"
 #include "AliCodeTimer.h"
 #include "AliLog.h"
+#include "AliMUONChamberPainter.h"
+#include "AliMUONDEPainter.h"
+#include "AliMUONPainterDataRegistry.h"
 #include "AliMUONPainterDataSourceFrame.h"
 #include "AliMUONPainterEnv.h"
 #include "AliMUONPainterHelper.h"
@@ -88,7 +91,9 @@ AliMUONMchViewApplication::AliMUONMchViewApplication(const char* name,
   }
 
   fMainFrame = new TGMainFrame(gClient->GetRoot(),w,h);
-  
+
+  AliMUONPainterHelper::Instance()->GenerateDefaultMatrices();
+
   CreateMenuBar(w);
 
   const Int_t kbs = 2;
@@ -132,7 +137,64 @@ AliMUONMchViewApplication::AliMUONMchViewApplication(const char* name,
   cout << "   Welcome to mchview" << endl;
   cout << "   " << FullVersion() << endl;
   cout << "***************************************************" << endl;
+  
+  // Trying to see if we're requested to draw something specific instead
+  // of the global view of all the chambers
+  
+  AliMUONVPainter* painter(0x0);
+  TObjArray args;
+  args.SetOwner(kTRUE);
+  
+  for ( int i = 1; i < argc[0]; ++i ) 
+  {
+    args.Add(new TObjString(argv[i]));
+  }
+  
+  for ( Int_t i = 0; i <= args.GetLast(); ++i ) 
+  {
+    TString a(static_cast<TObjString*>(args.At(i))->String());
+
+    AliMUONAttPainter att;
+    
+    att.SetPlane(kTRUE,kFALSE);
+    att.SetCathode(kFALSE,kFALSE);
+    att.SetViewPoint(kTRUE,kFALSE);
+        
+    if ( a == "--de" )
+    {
+      Int_t detElemId = static_cast<TObjString*>(args.At(i+1))->String().Atoi();
+      
+      painter = new AliMUONDEPainter(att,detElemId);
+      
+      painter->SetOutlined("*",kFALSE);      
+      painter->SetOutlined("BUSPATCH",kTRUE);
+
+      painter->SetLine(1,4,3);      
+      ++i;
+    }
 
+    if ( a == "--chamber" )
+    {
+      Int_t chamberId = static_cast<TObjString*>(args.At(i+1))->String().Atoi();
+      
+      painter = new AliMUONChamberPainter(att,chamberId-1);
+      
+      painter->SetOutlined("*",kFALSE);      
+      painter->SetOutlined("DE",kTRUE);
+      
+      painter->SetLine(1,4,3);      
+      ++i;
+    }
+    
+  }
+  
+  if ( painter ) 
+  {
+    fPainterMasterFrame->ShiftClicked(painter,0x0);
+    
+    fPainterMasterFrame->Update();
+  }
+      
 }
 
 //______________________________________________________________________________
@@ -305,7 +367,7 @@ AliMUONMchViewApplication::ReadDir(TDirectory& dir)
       AliMUONVTrackerDataMaker* maker = dynamic_cast<AliMUONVTrackerDataMaker*>(object);
       if ( maker ) 
       {
-        AliMUONPainterRegistry::Instance()->Register(maker);
+        AliMUONPainterDataRegistry::Instance()->Register(maker);
       }
     }
     
@@ -318,7 +380,7 @@ AliMUONMchViewApplication::ReadDir(TDirectory& dir)
       if ( data ) 
       {
         AliMUONVTrackerDataMaker* maker = new AliMUONTrackerDataWrapper(data);
-        AliMUONPainterRegistry::Instance()->Register(maker);
+        AliMUONPainterDataRegistry::Instance()->Register(maker);
       }
     }
   }
@@ -352,6 +414,44 @@ AliMUONMchViewApplication::ReleaseNotes()
   
   TGTextView* rn = new TGTextView(t);
 
+  rn->AddLine("1.01");
+  rn->AddLine("");
+  rn->AddLine("Added the configuration as a possible OCDB data source");
+  rn->AddLine("");
+  
+  rn->AddLine("1.00");
+  rn->AddLine("");
+  rn->AddLine("Added the Status and StatusMap as a possible OCDB data source");
+  rn->AddLine("");
+  rn->AddLine("Added one (computed) dimension to the Gains data source = 1/a1/0.2 (mV/fC)");
+  rn->AddLine("");
+    
+  rn->AddLine("0.99a");
+  rn->AddLine("");
+  rn->AddLine("Added the --de and --chamber options");
+  rn->AddLine("");
+  
+  rn->AddLine("0.99");
+  rn->AddLine("");
+  rn->AddLine("The chamberid in the label (top right of panel) is now starting at 1 as in common usage");  
+  rn->AddLine("");
+  
+  rn->AddLine("0.98");
+  rn->AddLine("");
+  rn->AddLine("Added --asciimapping option");
+  rn->AddLine("");
+  
+  rn->AddLine("0.97");
+  rn->AddLine("");
+  rn->AddLine("Adding calibration option with Emelec (aka injection) gain");
+  rn->AddLine("");
+  
+  rn->AddLine("0.96a");
+  rn->AddLine("");
+  rn->AddLine("Internal reorganization of the contour computations, that lead to improved performance. ");
+  rn->AddLine("Improved enough to be able to remove completely the usage of the padstore.root file with precomputed contours.");
+  rn->AddLine("");
+  
   rn->AddLine("0.96");
   rn->AddLine("");
   rn->AddLine("New features");
@@ -446,7 +546,7 @@ AliMUONMchViewApplication::Save(const char* filename)
 {
   /// Save VTrackerDataMaker objects into file of given name
   
-  AliMUONPainterRegistry* reg = AliMUONPainterRegistry::Instance();
+  AliMUONPainterDataRegistry* reg = AliMUONPainterDataRegistry::Instance();
 
   TFile f(filename,"RECREATE");