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"
24 #include "AliMUONOccupancySubprocessor.h"
27 #include "AliShuttleInterface.h"
28 #include "Riostream.h"
29 #include "TObjArray.h"
31 //-----------------------------------------------------------------------------
32 /// \class AliMUONTrackerPreprocessor
34 /// Shuttle preprocessor for MUON tracker
36 /// It's simply a manager class that deals with a list of sub-tasks
37 /// (of type AliMUONVSubprocessor).
39 /// \author Laurent Aphecetche
40 //-----------------------------------------------------------------------------
43 ClassImp(AliMUONTrackerPreprocessor)
46 //_____________________________________________________________________________
47 AliMUONTrackerPreprocessor::AliMUONTrackerPreprocessor(AliShuttleInterface* shuttle)
48 : AliMUONPreprocessor("MCH",shuttle),
49 fPedestalSubprocessor(new AliMUONPedestalSubprocessor(this)),
50 fGMSSubprocessor(new AliMUONGMSSubprocessor(this)),
51 fHVSubprocessor(new AliMUONHVSubprocessor(this)),
52 fGainSubprocessor(new AliMUONGainSubprocessor(this)),
53 fOccupancySubprocessor(new AliMUONOccupancySubprocessor(this))
57 AddRunType("PEDESTAL");
58 AddRunType("CALIBRATION");
60 AddRunType("PHYSICS");
63 //_____________________________________________________________________________
64 AliMUONTrackerPreprocessor::~AliMUONTrackerPreprocessor()
68 delete fPedestalSubprocessor;
69 delete fGMSSubprocessor;
70 delete fHVSubprocessor;
71 delete fGainSubprocessor;
72 delete fOccupancySubprocessor;
75 //_____________________________________________________________________________
77 AliMUONTrackerPreprocessor::Initialize(Int_t run, UInt_t startTime, UInt_t endTime)
79 /// Re-register the subprocessor(s) depending on the actual runType
83 TString runType = GetRunType();
86 fIsApplicable = kTRUE;
88 if ( runType == "PEDESTAL" )
90 Add(fPedestalSubprocessor); // to be called only for pedestal runs
91 Log("INFO-Will run Pedestal subprocessor");
93 else if ( runType == "CALIBRATION" )
95 Add(fGainSubprocessor); // to be called only for gain runs
96 Log("INFO-Will run Gain subprocessor");
98 else if ( runType == "GMS" )
100 Add(fGMSSubprocessor);
101 Log("INFO-Will run GMS subprocessor");
103 else if ( runType == "PHYSICS" )
105 Bool_t useDCS(kTRUE);
106 Add(fHVSubprocessor,useDCS); // to be called only for physics runs
107 Add(fOccupancySubprocessor);
108 Log("INFO-Will run HV subprocessor");
109 Log("INFO-Will run Occupancy subprocessor");
113 fIsApplicable = kFALSE;
116 AliMUONPreprocessor::Initialize(run,startTime,endTime);