]>
Commit | Line | Data |
---|---|---|
a6882d5b | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
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 | **************************************************************************/ | |
15 | ||
16 | // $Id$ | |
17 | ||
18 | #include "AliMUONTrackerPreprocessor.h" | |
19 | ||
20 | #include "AliMUONPedestalSubprocessor.h" | |
21 | #include "AliMUONHVSubprocessor.h" | |
22 | #include "AliMUONGMSSubprocessor.h" | |
505bc496 | 23 | #include "AliMUONGainSubprocessor.h" |
7eafe398 | 24 | #include "AliMUONOccupancySubprocessor.h" |
a6882d5b | 25 | |
26 | #include "AliLog.h" | |
27 | #include "AliShuttleInterface.h" | |
28 | #include "Riostream.h" | |
29 | #include "TObjArray.h" | |
30 | ||
3d1463c8 | 31 | //----------------------------------------------------------------------------- |
a6882d5b | 32 | /// \class AliMUONTrackerPreprocessor |
33 | /// | |
34 | /// Shuttle preprocessor for MUON tracker | |
35 | /// | |
36 | /// It's simply a manager class that deals with a list of sub-tasks | |
37 | /// (of type AliMUONVSubprocessor). | |
38 | /// | |
39 | /// \author Laurent Aphecetche | |
3d1463c8 | 40 | //----------------------------------------------------------------------------- |
a6882d5b | 41 | |
42 | /// \cond CLASSIMP | |
43 | ClassImp(AliMUONTrackerPreprocessor) | |
44 | /// \endcond | |
45 | ||
46 | //_____________________________________________________________________________ | |
47 | AliMUONTrackerPreprocessor::AliMUONTrackerPreprocessor(AliShuttleInterface* shuttle) | |
7e59ccd2 | 48 | : AliMUONPreprocessor("MCH",shuttle), |
7eafe398 | 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)) | |
a6882d5b | 54 | { |
55 | /// ctor. | |
fcd6be20 | 56 | |
57 | AddRunType("PEDESTAL"); | |
58 | AddRunType("CALIBRATION"); | |
59 | AddRunType("GMS"); | |
60 | AddRunType("PHYSICS"); | |
a6882d5b | 61 | } |
62 | ||
63 | //_____________________________________________________________________________ | |
64 | AliMUONTrackerPreprocessor::~AliMUONTrackerPreprocessor() | |
65 | { | |
66 | /// dtor | |
7e59ccd2 | 67 | |
68 | delete fPedestalSubprocessor; | |
69 | delete fGMSSubprocessor; | |
70 | delete fHVSubprocessor; | |
505bc496 | 71 | delete fGainSubprocessor; |
7eafe398 | 72 | delete fOccupancySubprocessor; |
a6882d5b | 73 | } |
74 | ||
75 | //_____________________________________________________________________________ | |
76 | void | |
77 | AliMUONTrackerPreprocessor::Initialize(Int_t run, UInt_t startTime, UInt_t endTime) | |
78 | { | |
52f6e34b | 79 | /// Re-register the subprocessor(s) depending on the actual runType |
ddec2e53 | 80 | |
7e59ccd2 | 81 | ClearSubprocessors(); |
a6882d5b | 82 | |
83 | TString runType = GetRunType(); | |
7e59ccd2 | 84 | |
2ab3623b | 85 | fIsValid = kTRUE; |
581ece00 | 86 | fIsApplicable = kTRUE; |
2ab3623b | 87 | |
7103cd04 | 88 | if ( runType == "PEDESTAL" ) |
a6882d5b | 89 | { |
7e59ccd2 | 90 | Add(fPedestalSubprocessor); // to be called only for pedestal runs |
a6882d5b | 91 | Log("INFO-Will run Pedestal subprocessor"); |
92 | } | |
fcd6be20 | 93 | else if ( runType == "CALIBRATION" ) |
a6882d5b | 94 | { |
fcd6be20 | 95 | Add(fGainSubprocessor); // to be called only for gain runs |
505bc496 | 96 | Log("INFO-Will run Gain subprocessor"); |
a6882d5b | 97 | } |
fcd6be20 | 98 | else if ( runType == "GMS" ) |
a6882d5b | 99 | { |
7e59ccd2 | 100 | Add(fGMSSubprocessor); |
a6882d5b | 101 | Log("INFO-Will run GMS subprocessor"); |
102 | } | |
fcd6be20 | 103 | else if ( runType == "PHYSICS" ) |
a6882d5b | 104 | { |
d489129d | 105 | Bool_t useDCS(kTRUE); |
106 | Add(fHVSubprocessor,useDCS); // to be called only for physics runs | |
7eafe398 | 107 | Add(fOccupancySubprocessor); |
a6882d5b | 108 | Log("INFO-Will run HV subprocessor"); |
7eafe398 | 109 | Log("INFO-Will run Occupancy subprocessor"); |
a6882d5b | 110 | } |
111 | else | |
112 | { | |
581ece00 | 113 | fIsApplicable = kFALSE; |
a6882d5b | 114 | } |
115 | ||
116 | AliMUONPreprocessor::Initialize(run,startTime,endTime); | |
117 | ||
118 | } |