]>
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" | |
23 | ||
24 | #include "AliLog.h" | |
25 | #include "AliShuttleInterface.h" | |
26 | #include "Riostream.h" | |
27 | #include "TObjArray.h" | |
28 | ||
29 | /// \class AliMUONTrackerPreprocessor | |
30 | /// | |
31 | /// Shuttle preprocessor for MUON tracker | |
32 | /// | |
33 | /// It's simply a manager class that deals with a list of sub-tasks | |
34 | /// (of type AliMUONVSubprocessor). | |
35 | /// | |
36 | /// \author Laurent Aphecetche | |
37 | ||
38 | /// \cond CLASSIMP | |
39 | ClassImp(AliMUONTrackerPreprocessor) | |
40 | /// \endcond | |
41 | ||
42 | //_____________________________________________________________________________ | |
43 | AliMUONTrackerPreprocessor::AliMUONTrackerPreprocessor(AliShuttleInterface* shuttle) | |
7e59ccd2 | 44 | : AliMUONPreprocessor("MCH",shuttle), |
45 | fPedestalSubprocessor(new AliMUONPedestalSubprocessor(this)), | |
46 | fGMSSubprocessor(new AliMUONGMSSubprocessor(this)), | |
47 | fHVSubprocessor(new AliMUONHVSubprocessor(this)) | |
a6882d5b | 48 | { |
49 | /// ctor. | |
50 | } | |
51 | ||
52 | //_____________________________________________________________________________ | |
53 | AliMUONTrackerPreprocessor::~AliMUONTrackerPreprocessor() | |
54 | { | |
55 | /// dtor | |
7e59ccd2 | 56 | |
57 | delete fPedestalSubprocessor; | |
58 | delete fGMSSubprocessor; | |
59 | delete fHVSubprocessor; | |
a6882d5b | 60 | } |
61 | ||
62 | //_____________________________________________________________________________ | |
63 | void | |
64 | AliMUONTrackerPreprocessor::Initialize(Int_t run, UInt_t startTime, UInt_t endTime) | |
65 | { | |
ddec2e53 | 66 | /// Re-register the subprocessor(s) depnding on the actual runTYpe |
67 | ||
7e59ccd2 | 68 | ClearSubprocessors(); |
a6882d5b | 69 | |
70 | TString runType = GetRunType(); | |
7e59ccd2 | 71 | |
a6882d5b | 72 | if ( runType == "PEDESTAL_RUN" ) // FIXME : check the name |
73 | { | |
7e59ccd2 | 74 | Add(fPedestalSubprocessor); // to be called only for pedestal runs |
a6882d5b | 75 | Log("INFO-Will run Pedestal subprocessor"); |
76 | } | |
77 | else if ( runType == "ELECTRONICS_CALIBRATION_RUN" ) // FIXME : check the name | |
78 | { | |
79 | Log("WARNING-Subprocessor for gains not yet implemented"); | |
80 | //fSubprocessors->Add(new AliMUONGainSubprocessor(this)); // to be called only for gain runs | |
81 | } | |
82 | else if ( runType == "GMS" ) // FIXME : check the name | |
83 | { | |
7e59ccd2 | 84 | Add(fGMSSubprocessor); |
a6882d5b | 85 | Log("INFO-Will run GMS subprocessor"); |
86 | } | |
87 | else if ( runType == "PHYSICS" ) // FIXME : check the name | |
88 | { | |
7e59ccd2 | 89 | Add(fHVSubprocessor); // to be called only for physics runs |
a6882d5b | 90 | Log("INFO-Will run HV subprocessor"); |
91 | } | |
92 | else | |
93 | { | |
94 | Log(Form("ERROR-Unknown RunType=%",runType.Data())); | |
95 | } | |
96 | ||
97 | AliMUONPreprocessor::Initialize(run,startTime,endTime); | |
98 | ||
99 | } |