1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
18 #include "AliMUONTrackerPreprocessor.h"
20 #include "AliMUONPedestalSubprocessor.h"
21 #include "AliMUONHVSubprocessor.h"
22 #include "AliMUONGMSSubprocessor.h"
23 #include "AliMUONGainSubprocessor.h"
26 #include "AliShuttleInterface.h"
27 #include "Riostream.h"
28 #include "TObjArray.h"
30 //-----------------------------------------------------------------------------
31 /// \class AliMUONTrackerPreprocessor
33 /// Shuttle preprocessor for MUON tracker
35 /// It's simply a manager class that deals with a list of sub-tasks
36 /// (of type AliMUONVSubprocessor).
38 /// \author Laurent Aphecetche
39 //-----------------------------------------------------------------------------
42 ClassImp(AliMUONTrackerPreprocessor)
45 //_____________________________________________________________________________
46 AliMUONTrackerPreprocessor::AliMUONTrackerPreprocessor(AliShuttleInterface* shuttle)
47 : AliMUONPreprocessor("MCH",shuttle),
48 fPedestalSubprocessor(new AliMUONPedestalSubprocessor(this)),
49 fGMSSubprocessor(new AliMUONGMSSubprocessor(this)),
50 fHVSubprocessor(new AliMUONHVSubprocessor(this)),
51 fGainSubprocessor(new AliMUONGainSubprocessor(this))
55 AddRunType("PEDESTAL");
56 AddRunType("CALIBRATION");
58 AddRunType("PHYSICS");
61 //_____________________________________________________________________________
62 AliMUONTrackerPreprocessor::~AliMUONTrackerPreprocessor()
66 delete fPedestalSubprocessor;
67 delete fGMSSubprocessor;
68 delete fHVSubprocessor;
69 delete fGainSubprocessor;
72 //_____________________________________________________________________________
74 AliMUONTrackerPreprocessor::Initialize(Int_t run, UInt_t startTime, UInt_t endTime)
76 /// Re-register the subprocessor(s) depending on the actual runType
80 TString runType = GetRunType();
83 fIsApplicable = kTRUE;
85 if ( runType == "PEDESTAL" )
87 Add(fPedestalSubprocessor); // to be called only for pedestal runs
88 Log("INFO-Will run Pedestal subprocessor");
90 else if ( runType == "CALIBRATION" )
92 Add(fGainSubprocessor); // to be called only for gain runs
93 Log("INFO-Will run Gain subprocessor");
95 else if ( runType == "GMS" )
97 Add(fGMSSubprocessor);
98 Log("INFO-Will run GMS subprocessor");
100 else if ( runType == "PHYSICS" )
102 Bool_t useDCS(kTRUE);
103 Add(fHVSubprocessor,useDCS); // to be called only for physics runs
104 Log("INFO-Will run HV subprocessor");
108 fIsApplicable = kFALSE;
111 AliMUONPreprocessor::Initialize(run,startTime,endTime);