]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONQAMappingCheck.cxx
rewrote AliMUONAlignment to - use AliMillePede2 instead of AliMillepede - use AliMill...
[u/mrichter/AliRoot.git] / MUON / AliMUONQAMappingCheck.cxx
index 880957cac58b2f8724baab10342f92653bea3e09..c55322f4da5a2e6561dd424aa72e3fae506ca1bc 100644 (file)
@@ -31,6 +31,7 @@
 #include "AliMUONQAMappingCheck.h"
 
 #include "AliCDBManager.h"
+#include "AliCodeTimer.h"
 #include "AliLog.h"
 #include "AliMUON2DMap.h"
 #include "AliMUONDigitCalibrator.h"
@@ -47,6 +48,8 @@
 #include "AliMpSegmentation.h"
 #include "AliMpVSegmentation.h"
 
+#include "AliMpManuIterator.h"
+
 /// \cond CLASSIMP
 ClassImp(AliMUONQAMappingCheck)
 /// \endcond
@@ -64,7 +67,21 @@ fNumberOfLegitimateMonoCathodeClusters(0)
 {
   /// Ctor
   
+  AliCodeTimerAuto(Form("RUN %d",runNumber),0);
+  
   fGeometryTransformer->LoadGeometryData();
+  
+  // Init the store with all the manus. Note that this is not strictly necessary, 
+  // but it helps not to get its growth (that would otherwise happen in
+  // AddClusterLocation each time we get a cluster associated with a manu where
+  // we got no cluster yet) confused with a memory leak...
+  AliMpManuIterator it;
+  Int_t detElemId, manuId;
+  
+  while (it.Next(detElemId,manuId))
+  {
+    fStore->Add(new AliMUONCalibParamND(4,AliMpConstants::ManuNofChannels(),detElemId,manuId,0.0));
+  }
 }
 
 //_____________________________________________________________________________
@@ -96,11 +113,10 @@ void AliMUONQAMappingCheck::AddClusterLocation(Int_t detElemId,
       p = new AliMUONCalibParamND(4,AliMpConstants::ManuNofChannels(),detElemId,manuId,0.0);
       fStore->Add(p);
     }
-    if ( !monoCathode) 
-    {
-      p->SetValueAsDouble(manuChannel,0,p->ValueAsDouble(manuChannel,0)+1.0);
-    }
-    else 
+
+    p->SetValueAsDouble(manuChannel,0,p->ValueAsDouble(manuChannel,0)+1.0);
+    
+    if ( monoCathode )
     {
       p->SetValueAsDouble(manuChannel,1,p->ValueAsDouble(manuChannel,1)+1.0); 
       if (!legitimateMonoCathode)