]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONAttPainter.cxx
Coverity fix (forward Null)
[u/mrichter/AliRoot.git] / MUON / AliMUONAttPainter.cxx
index 807cff8e8cbd12654d0b10243f7d1be38ab0f97d..14290cd9f7d3105bd21ffe60753c6bf767d82116 100644 (file)
@@ -74,11 +74,12 @@ AliMUONAttPainter::Name() const
     if ( name.Length() > 0 ) name += "-";
     name += PlaneName();
   }
-  if ( ViewPointName().Length() > 0 ) 
-  {
-    if ( name.Length() > 0 ) name += "-";
-    name += ViewPointName();
-  }
+
+//  if ( ViewPointName().Length() > 0 ) 
+//  {
+//    if ( name.Length() > 0 ) name += "-";
+//    name += ViewPointName();
+//  }
   
   return name;
 }
@@ -96,6 +97,28 @@ AliMUONAttPainter::CathodeName() const
   return "";
 }
 
+//_____________________________________________________________________________
+void
+AliMUONAttPainter::Invert()
+{
+  /// Invert our cathode/plane states
+  
+  if ( IsCathodeDefined() ) 
+  {
+    Bool_t cath0(IsCathode0());
+    Bool_t cath1(IsCathode1());
+    SetCathode(!cath0,!cath1);
+  }
+
+  if ( IsPlaneDefined() ) 
+  {
+    Bool_t b(IsBendingPlane());
+    Bool_t nb(IsNonBendingPlane());
+    
+    SetPlane(!b,!nb);
+  }
+}
+
 //_____________________________________________________________________________
 TString
 AliMUONAttPainter::PlaneName() const
@@ -103,8 +126,8 @@ AliMUONAttPainter::PlaneName() const
   /// Return plane name in short form
   if ( IsBendingPlane() && IsNonBendingPlane() ) return "Both";
   else if ( !IsBendingPlane() && !IsNonBendingPlane() ) return "";
-  else if ( IsBendingPlane() ) return "B";
-  else if ( IsNonBendingPlane() ) return "NB";
+  else if ( IsBendingPlane() ) return "Bending";
+  else if ( IsNonBendingPlane() ) return "NonBending";
   return "";
 }