Line data Source code
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 "AliMUONLVSubprocessor.h"
23 : #include "AliMUONGMSSubprocessor.h"
24 : #include "AliMUONOccupancySubprocessor.h"
25 : #include "AliLog.h"
26 : #include "AliMUONBusPatchEvolutionSubprocessor.h"
27 : #include "AliShuttleInterface.h"
28 : #include "Riostream.h"
29 : #include "TObjArray.h"
30 : #include "AliMUONConfigSubprocessor.h"
31 :
32 : //-----------------------------------------------------------------------------
33 : /// \class AliMUONTrackerPreprocessor
34 : ///
35 : /// Shuttle preprocessor for MUON tracker
36 : ///
37 : /// It's simply a manager class that deals with a list of sub-tasks
38 : /// (of type AliMUONVSubprocessor).
39 : ///
40 : /// \author Laurent Aphecetche
41 : //-----------------------------------------------------------------------------
42 :
43 : /// \cond CLASSIMP
44 12 : ClassImp(AliMUONTrackerPreprocessor)
45 : /// \endcond
46 :
47 : //_____________________________________________________________________________
48 : AliMUONTrackerPreprocessor::AliMUONTrackerPreprocessor(AliShuttleInterface* shuttle)
49 0 : : AliMUONPreprocessor("MCH",shuttle),
50 0 : fPedestalSubprocessor(new AliMUONPedestalSubprocessor(this)),
51 0 : fGMSSubprocessor(new AliMUONGMSSubprocessor(this)),
52 0 : fHVSubprocessor(new AliMUONHVSubprocessor(this,kTRUE)),
53 0 : fOccupancySubprocessor(new AliMUONOccupancySubprocessor(this)),
54 0 : fBusPatchEvolutionSubprocessor(new AliMUONBusPatchEvolutionSubprocessor(this)),
55 0 : fConfigSubprocessor(new AliMUONConfigSubprocessor(this)),
56 0 : fLVSubprocessor(new AliMUONLVSubprocessor(this))
57 0 : {
58 : /// ctor.
59 :
60 0 : AddRunType("PEDESTAL");
61 0 : AddRunType("CALIBRATION");
62 0 : AddRunType("GMS");
63 0 : AddRunType("PHYSICS");
64 0 : }
65 :
66 : //_____________________________________________________________________________
67 : AliMUONTrackerPreprocessor::~AliMUONTrackerPreprocessor()
68 0 : {
69 : /// dtor
70 :
71 0 : delete fPedestalSubprocessor;
72 0 : delete fGMSSubprocessor;
73 0 : delete fHVSubprocessor;
74 0 : delete fOccupancySubprocessor;
75 0 : delete fBusPatchEvolutionSubprocessor;
76 0 : delete fConfigSubprocessor;
77 0 : delete fLVSubprocessor;
78 0 : }
79 :
80 : //_____________________________________________________________________________
81 : void
82 : AliMUONTrackerPreprocessor::Initialize(Int_t run, UInt_t startTime, UInt_t endTime)
83 : {
84 : /// Re-register the subprocessor(s) depending on the actual runType
85 :
86 0 : ClearSubprocessors();
87 :
88 0 : TString runType = GetRunType();
89 :
90 0 : fIsValid = kTRUE;
91 0 : fIsApplicable = kTRUE;
92 :
93 0 : if ( runType == "PEDESTAL" )
94 : {
95 0 : Add(fPedestalSubprocessor); // to be called only for pedestal runs
96 0 : Log("INFO-Will run Pedestal subprocessor");
97 : }
98 0 : else if ( runType == "GMS" )
99 : {
100 0 : Add(fGMSSubprocessor);
101 0 : Log("INFO-Will run GMS subprocessor");
102 : }
103 0 : else if ( runType == "PHYSICS" )
104 : {
105 : Bool_t useDCS(kTRUE);
106 :
107 0 : Add(fHVSubprocessor,useDCS); // to be called only for physics runs
108 0 : Add(fLVSubprocessor,useDCS);
109 0 : Add(fOccupancySubprocessor);
110 0 : Add(fBusPatchEvolutionSubprocessor);
111 0 : Add(fConfigSubprocessor);
112 :
113 0 : Log("INFO-Will run LV subprocessor");
114 0 : Log("INFO-Will run HV subprocessor");
115 0 : if ( static_cast<AliMUONHVSubprocessor*>(fHVSubprocessor)->IncludeHVCurrent() )
116 : {
117 0 : Log("INFO-HV subprocessor will store HV currents in addition to the voltages");
118 : }
119 0 : Log("INFO-Will run Occupancy subprocessor");
120 0 : Log("INFO-Will run Bus Patch Evolution subprocessor");
121 0 : Log("INFO-Will run Config subprocessor");
122 :
123 0 : }
124 : else
125 : {
126 0 : fIsApplicable = kFALSE;
127 : }
128 :
129 0 : AliMUONPreprocessor::Initialize(run,startTime,endTime);
130 :
131 0 : }
|