]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONPainterPlotSelector.cxx
Always delete TObjArrays created by TString::Tokenize (Ruben)
[u/mrichter/AliRoot.git] / MUON / AliMUONPainterPlotSelector.cxx
index 7b544904e0c5f8eb85aabaf9948d0dc7971ff291..8b7749f504f55533a21aed3cb845ff69346fbca3 100644 (file)
@@ -30,7 +30,7 @@
 #include "AliMUONPainterGroup.h"
 #include "AliMUONPainterInterfaceHelper.h"
 #include "AliMUONPainterMatrix.h"
-#include "AliMUONPainterRegistry.h"
+#include "AliMUONPainterDataRegistry.h"
 #include "AliMUONVPainter.h"
 #include "AliMUONVTrackerData.h"
 #include "AliLog.h"
@@ -62,7 +62,7 @@ fCurrentDimension(-1)
 
   fDataSourceNames = new TGButtonGroup(this,"Sources");
       
-  AliMUONPainterRegistry* reg = AliMUONPainterRegistry::Instance();
+  AliMUONPainterDataRegistry* reg = AliMUONPainterDataRegistry::Instance();
   
   reg->Connect("DataSourceWasRegistered(AliMUONVTrackerData*)",
                "AliMUONPainterPlotSelector",
@@ -142,7 +142,7 @@ AliMUONPainterPlotSelector::CreateDimensionButtons(const char* dataSourceName)
   
   AliDebug(1,Form("Creating dimension buttons for dataSource %s",dataSourceName));
   
-  AliMUONVTrackerData* data = AliMUONPainterRegistry::Instance()->DataSource(dataSourceName);
+  AliMUONVTrackerData* data = AliMUONPainterDataRegistry::Instance()->DataSource(dataSourceName);
 
   TGButtonGroup* bg = new TGButtonGroup(this,0,3,5,0,dataSourceName);
   
@@ -409,9 +409,8 @@ AliMUONPainterPlotSelector::SourceButtonWasClicked(Int_t id)
   TGButton* button = fDataSourceNames->GetButton(id);
   if ( !button ) 
   {
-    AliError(Form("Could not get DataSource button id=%d",id));
     StdoutToAliDebug(1,AliMUONPainterInterfaceHelper::Dump(*fDataSourceNames));
-    button->GetUserData(); // to trigger a crash so gdb is possible ;-)
+    AliFatal(Form("Could not get DataSource button id=%d",id));
   }
   
   AliMUONVTrackerData* data = reinterpret_cast<AliMUONVTrackerData*>(button->GetUserData());
@@ -591,6 +590,18 @@ AliMUONPainterPlotSelector::UpdateTypeButton()
                { 
                        manuButton->SetEnabled(fCurrentData->IsManuLevelEnabled());
                }
+               TGTextButton* busPatchButton = static_cast<TGTextButton*>
+               (AliMUONPainterInterfaceHelper::FindButtonByName(*fTypes,"BUSPATCH"));
+               if (busPatchButton) 
+               { 
+                       busPatchButton->SetEnabled(fCurrentData->IsBusPatchLevelEnabled());
+               }
+               TGTextButton* pcbButton = static_cast<TGTextButton*>
+               (AliMUONPainterInterfaceHelper::FindButtonByName(*fTypes,"PCB"));
+               if (pcbButton) 
+               { 
+                       pcbButton->SetEnabled(fCurrentData->IsPCBLevelEnabled());
+               }
     
        }