]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONPainterHelper.cxx
Compilation warning fixed.
[u/mrichter/AliRoot.git] / MUON / AliMUONPainterHelper.cxx
index 8cc51a8c2a2fab8d961e2ff0913c07cabf6a2ed1..eca927efcfc49a986cf0c40dca5e346d24408ef4 100644 (file)
@@ -27,7 +27,6 @@
 #include "AliMUONGeometryTransformer.h"
 #include "AliMUONManuContourMaker.h"
 #include "AliMUONPainterEnv.h"
-#include "AliMUONPainterMatrix.h"
 #include "AliMUONPainterRegistry.h"
 #include "AliMUONPadStatusMaker.h"
 #include "AliMUONVCalibParam.h"
@@ -60,6 +59,7 @@
 #include <TLine.h>
 #include <TList.h>
 #include <TMap.h>
+#include <TMath.h>
 #include <TObjArray.h>
 #include <TObjString.h>
 #include <TStyle.h>
@@ -86,7 +86,6 @@ AliMUONPainterHelper* AliMUONPainterHelper::fgInstance(0x0);
 //_____________________________________________________________________________
 AliMUONPainterHelper::AliMUONPainterHelper() : 
 TObject(),
-fPainterMatrices(0x0),
 fEnv(0x0),
 fReal(0x0),
 fExploded(0x0)
@@ -109,7 +108,6 @@ fExploded(0x0)
 AliMUONPainterHelper::~AliMUONPainterHelper()
 {
   /// dtor
-  delete fPainterMatrices;
   delete fReal;
   delete fExploded;
   fEnv->Save();
@@ -153,54 +151,6 @@ AliMUONPainterHelper::GetContour(const char* contourName, Bool_t explodedView) c
   return 0x0;
 }
 
-//_____________________________________________________________________________
-void
-AliMUONPainterHelper::GenerateDefaultMatrices()
-{
-  /// Kind of bootstrap method to trigger the generation of all contours
-  
-  AliCodeTimerAuto("",0);
-  
-  fPainterMatrices = new TObjArray;
-  fPainterMatrices->SetOwner(kFALSE);
-  
-  TObjArray attributes;
-  
-  AliMUONAttPainter att;
-  
-  att.SetViewPoint(kTRUE,kFALSE);
-  att.SetCathode(kFALSE,kFALSE);
-  att.SetPlane(kTRUE,kFALSE);
-  attributes.Add(new AliMUONAttPainter(att));
-
-  TIter next(&attributes);
-  AliMUONAttPainter* a;
-  
-  while ( ( a = static_cast<AliMUONAttPainter*>(next()) ) )
-  {
-    AliMUONPainterMatrix* matrix = new AliMUONPainterMatrix("Tracker",5,2);
-    
-    for ( Int_t i = 0; i < 10; ++i )
-    {
-      AliMUONVPainter* painter = new AliMUONChamberPainter(*a,i);
-      
-      painter->SetResponder("Chamber");
-      
-      painter->SetOutlined("*",kFALSE);
-      
-      painter->SetOutlined("MANU",kTRUE);
-      
-      for ( Int_t j = 0; j < 3; ++j ) 
-      {
-        painter->SetLine(j,1,4-j);
-      }
-      
-      matrix->Adopt(painter);    
-    }
-    AliMUONPainterRegistry::Instance()->Register(matrix);
-    fPainterMatrices->Add(matrix);
-  }
-}
 
 //_____________________________________________________________________________
 AliMp::CathodType
@@ -373,7 +323,7 @@ AliMUONPainterHelper::ColorFromValue(Double_t value, Double_t min, Double_t max)
   else if (value <= min) rv = 0;
   else
   {
-    if  ( max == min ) return gStyle->GetColorPalette(1);
+    if  ( TMath::AreEqualRel(max,min,1E-6) ) return gStyle->GetColorPalette(1);
     Double_t range = max - min;
     Double_t offset = value - min;
     rv = gStyle->GetColorPalette( 1 + int( offset*(gStyle->GetNumberOfColors()-2)/range - 0.5 ) );
@@ -411,12 +361,7 @@ AliMUONPainterHelper::Print(Option_t* opt) const
   {
     if ( fExploded ) fExploded->Print();
     if ( fReal ) fReal->Print();
-  }
-  
-  if ( fPainterMatrices && ( sopt.Contains("MATRI") || sopt.Contains("FULL") ) )
-  {
-    fPainterMatrices->Print(opt);
-  }
+  }  
 }
 
 //_____________________________________________________________________________