]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONTrackerPreprocessor.cxx
- Update to read the "new" data format for the TailCancelation Filter Analysis
[u/mrichter/AliRoot.git] / MUON / AliMUONTrackerPreprocessor.cxx
index f2385fa07678277cf75bfd472a0020d023b1caa3..2dfd08264e0e7df2ad3e3acccd80f57ce5e146cf 100644 (file)
 #include "AliMUONPedestalSubprocessor.h"
 #include "AliMUONHVSubprocessor.h"
 #include "AliMUONGMSSubprocessor.h"
+#include "AliMUONGainSubprocessor.h"
+#include "AliMUONOccupancySubprocessor.h"
 
 #include "AliLog.h"
 #include "AliShuttleInterface.h"
 #include "Riostream.h"
 #include "TObjArray.h"
 
+//-----------------------------------------------------------------------------
 /// \class AliMUONTrackerPreprocessor
 ///
 /// Shuttle preprocessor for MUON tracker
@@ -34,6 +37,7 @@
 /// (of type AliMUONVSubprocessor).
 ///
 /// \author Laurent Aphecetche
+//-----------------------------------------------------------------------------
 
 /// \cond CLASSIMP
 ClassImp(AliMUONTrackerPreprocessor)
@@ -41,47 +45,72 @@ ClassImp(AliMUONTrackerPreprocessor)
 
 //_____________________________________________________________________________
 AliMUONTrackerPreprocessor::AliMUONTrackerPreprocessor(AliShuttleInterface* shuttle)
-: AliMUONPreprocessor("MCH",shuttle)
+: AliMUONPreprocessor("MCH",shuttle),
+fPedestalSubprocessor(new AliMUONPedestalSubprocessor(this)),
+fGMSSubprocessor(new AliMUONGMSSubprocessor(this)),    
+fHVSubprocessor(new AliMUONHVSubprocessor(this)),
+fGainSubprocessor(new AliMUONGainSubprocessor(this)),
+fOccupancySubprocessor(new AliMUONOccupancySubprocessor(this))
 {
   /// ctor. 
+    
+    AddRunType("PEDESTAL");
+    AddRunType("CALIBRATION");
+    AddRunType("GMS");
+    AddRunType("PHYSICS");
 }
 
 //_____________________________________________________________________________
 AliMUONTrackerPreprocessor::~AliMUONTrackerPreprocessor()
 {
   /// dtor
+
+  delete fPedestalSubprocessor;
+  delete fGMSSubprocessor;
+  delete fHVSubprocessor;
+  delete fGainSubprocessor;
+  delete fOccupancySubprocessor;
 }
 
 //_____________________________________________________________________________
 void
 AliMUONTrackerPreprocessor::Initialize(Int_t run, UInt_t startTime, UInt_t endTime)
 {
-  DeleteSubprocessors();
+  /// Re-register the subprocessor(s) depending on the actual runType
+
+  ClearSubprocessors();
   
   TString runType = GetRunType();
-  if ( runType == "PEDESTAL_RUN" ) // FIXME : check the name
+  
+  fIsValid = kTRUE;
+  fIsApplicable = kTRUE;
+  
+  if ( runType == "PEDESTAL" )
   {
-    Add(new AliMUONPedestalSubprocessor(this)); // to be called only for pedestal runs
+    Add(fPedestalSubprocessor); // to be called only for pedestal runs
     Log("INFO-Will run Pedestal subprocessor");
   }
-  else if ( runType == "ELECTRONICS_CALIBRATION_RUN" ) // FIXME : check the name
+  else if ( runType == "CALIBRATION" )
   {
-    Log("WARNING-Subprocessor for gains not yet implemented");
-    //fSubprocessors->Add(new AliMUONGainSubprocessor(this)); // to be called only for gain runs
+    Add(fGainSubprocessor); // to be called only for gain runs
+    Log("INFO-Will run Gain subprocessor");
   }
-  else if ( runType == "GMS" ) // FIXME : check the name
+  else if ( runType == "GMS" )
   {
-    Add(new AliMUONGMSSubprocessor(this));
+    Add(fGMSSubprocessor);
     Log("INFO-Will run GMS subprocessor");
   }
-  else if ( runType == "PHYSICS" ) // FIXME : check the name
+  else if ( runType == "PHYSICS" )
   {
-    Add(new AliMUONHVSubprocessor(this)); // to be called only for physics runs
+    Bool_t useDCS(kTRUE);
+    Add(fHVSubprocessor,useDCS); // to be called only for physics runs
+    Add(fOccupancySubprocessor);
     Log("INFO-Will run HV subprocessor");
+    Log("INFO-Will run Occupancy subprocessor");
   }
   else
   {
-    Log(Form("ERROR-Unknown RunType=%",runType.Data()));
+    fIsApplicable = kFALSE;
   }
   
   AliMUONPreprocessor::Initialize(run,startTime,endTime);