#include "AliMUONPedestalSubprocessor.h"
#include "AliMUONHVSubprocessor.h"
#include "AliMUONGMSSubprocessor.h"
+#include "AliMUONGainSubprocessor.h"
#include "AliLog.h"
#include "AliShuttleInterface.h"
//_____________________________________________________________________________
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))
{
/// ctor.
}
AliMUONTrackerPreprocessor::~AliMUONTrackerPreprocessor()
{
/// dtor
+
+ delete fPedestalSubprocessor;
+ delete fGMSSubprocessor;
+ delete fHVSubprocessor;
+ delete fGainSubprocessor;
}
//_____________________________________________________________________________
void
AliMUONTrackerPreprocessor::Initialize(Int_t run, UInt_t startTime, UInt_t endTime)
{
- DeleteSubprocessors();
+ /// Re-register the subprocessor(s) depnding on the actual runTYpe
+
+ ClearSubprocessors();
TString runType = GetRunType();
+
if ( runType == "PEDESTAL_RUN" ) // FIXME : check the name
{
- 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
{
- Log("WARNING-Subprocessor for gains not yet implemented");
- //fSubprocessors->Add(new AliMUONGainSubprocessor(this)); // to be called only for gain runs
+ Add(new AliMUONGainSubprocessor(this)); // to be called only for gain runs
+ Log("INFO-Will run Gain subprocessor");
}
else if ( runType == "GMS" ) // FIXME : check the name
{
- Add(new AliMUONGMSSubprocessor(this));
+ Add(fGMSSubprocessor);
Log("INFO-Will run GMS subprocessor");
}
else if ( runType == "PHYSICS" ) // FIXME : check the name
{
- 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
Log("INFO-Will run HV subprocessor");
}
else