]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONPreprocessor.cxx
Removing quick code hack and unnecessary methods. Now have a much cleaner implementat...
[u/mrichter/AliRoot.git] / MUON / AliMUONPreprocessor.cxx
index a1a8dbf7b3780dbfbab6adc82a76feba668931e5..5c91fd08a93393bf97224bd3b3073c0569ea2fb7 100644 (file)
 #include "AliMUONHVSubprocessor.h"
 #include "AliMUONGMSSubprocessor.h"
 
+#include "AliMpSegmentation.h"
+#include "AliMpDDLStore.h"
+
 #include "AliLog.h"
 #include "AliShuttleInterface.h"
 #include "Riostream.h"
 #include "TObjArray.h"
 
+//-----------------------------------------------------------------------------
 /// \class AliMUONPreprocessor
 ///
 /// Shuttle preprocessor for MUON subsystems (TRK and TRG)
@@ -34,6 +38,7 @@
 /// (of type AliMUONVSubprocessor).
 ///
 /// \author Laurent Aphecetche
+//-----------------------------------------------------------------------------
 
 /// \cond CLASSIMP
 ClassImp(AliMUONPreprocessor)
@@ -42,7 +47,8 @@ ClassImp(AliMUONPreprocessor)
 //_____________________________________________________________________________
 AliMUONPreprocessor::AliMUONPreprocessor(const char* detName, AliShuttleInterface* shuttle)
 : AliPreprocessor(detName, shuttle),
-  fSubprocessors(new TObjArray())
+  fSubprocessors(new TObjArray()),
+  fProcessDCS(kFALSE)
 {
   /// ctor
 }
@@ -60,21 +66,33 @@ AliMUONPreprocessor::ClearSubprocessors()
 {
   /// Empty our subprocessor list
   fSubprocessors->Clear();
+  fProcessDCS = kFALSE;
 }
 
 //_____________________________________________________________________________
 void
-AliMUONPreprocessor::Add(AliMUONVSubprocessor* sub)
+AliMUONPreprocessor::Add(AliMUONVSubprocessor* sub, Bool_t processDCS)
 {
   /// Add a subprocessor to our list of workers
   fSubprocessors->Add(sub);
+  if ( processDCS == kTRUE ) fProcessDCS = processDCS;
 }
 
 //_____________________________________________________________________________
 void
 AliMUONPreprocessor::Initialize(Int_t run, UInt_t startTime, UInt_t endTime)
 {
-  /// loop over subtasks and initialize them
+/// Load mapping and initialize subtasks  
+
+  // Delete previous mapping
+  delete AliMpSegmentation::Instance(false);
+  delete AliMpDDLStore::Instance(false);
+  
+  // Load mapping from CDB for this run
+  GetFromOCDB("Calib", "Mapping");
+  GetFromOCDB("Calib", "DDLStore");
+
+  // loop over subtasks and initialize them
   for ( Int_t i = 0; i <= fSubprocessors->GetLast(); ++i )
   {
     Subprocessor(i)->Initialize(run,startTime,endTime);