]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONHVSubprocessor.cxx
Small correction for shifts in SSD (M. Van Leeuwen)
[u/mrichter/AliRoot.git] / MUON / AliMUONHVSubprocessor.cxx
index b3d0d83e1ff6626b56c2b3dd4a38f3817aac5620..b782e5ff69ad91ecf55cf75c5101872f6661ffa2 100644 (file)
@@ -13,7 +13,9 @@
 * provided "as is" without express or implied warranty.                  *
 **************************************************************************/
 
-/// $Id$
+// $Id$
+
+//-----------------------------------------------------------------------------
 /// \class AliMUONHVSubprocessor
 ///
 /// A subprocessor to read HV values for one run
 /// It simply creates a copy of the dcsAliasMap w/o information
 /// from the MUON TRK, and dumps this copy into the CDB
 ///
-// Author: Laurent Aphecetche, Subatech
+/// \author Laurent Aphecetche, Subatech
+//-----------------------------------------------------------------------------
 
 #include "AliMUONHVSubprocessor.h"
-#include "AliMUONHVNamer.h"
 #include "AliMUONPreprocessor.h"
 
 #include "AliMpDEIterator.h"
 #include "AliMpDEManager.h"
+#include "AliMpHVNamer.h"
 
 #include "AliCDBMetaData.h"
 #include "AliLog.h"
@@ -65,7 +68,7 @@ AliMUONHVSubprocessor::Process(TMap* dcsAliasMap)
   TMap hv;
   hv.SetOwner(kTRUE);
   
-  AliMUONHVNamer hvNamer;
+  AliMpHVNamer hvNamer;
 
   AliMpDEIterator deIt;
 
@@ -120,15 +123,14 @@ AliMUONHVSubprocessor::Process(TMap* dcsAliasMap)
     if (!hvPair)
     {
       ++aliasNotFound;
-//      Master()->Log(Form("WARNING Did not find expected alias (%s)",aliasName.Data()));
     }
     else
     {
-      TObjArray* values = static_cast<TObjArray*>(hvPair->Value());
+      kNoAliases = kFALSE;
+      TObjArray* values = static_cast<TObjArray*>(hvPair->Value()->Clone());
       if (!values)
       {
         ++valueNotFound;
-//        Master()->Log(Form("WARNING Could not get values for alias (%s)",aliasName.Data()));
       }
       else
       {
@@ -137,7 +139,6 @@ AliMUONHVSubprocessor::Process(TMap* dcsAliasMap)
         hv.Add(new TObjString(aliasName.Data()),values);
       }
     }
-    kNoAliases = kFALSE;
   }
   
   if ( kNoAliases ) 
@@ -165,8 +166,8 @@ AliMUONHVSubprocessor::Process(TMap* dcsAliasMap)
   
   Bool_t validToInfinity(kFALSE);
   
-  UInt_t result = Master()->Store("Calib","HV",&hv,&metaData,0,validToInfinity);
+  Bool_t result = Master()->Store("Calib","HV",&hv,&metaData,0,validToInfinity);
   
-  return result;
+  return ( result != kTRUE); // return 0 if everything is ok
 }