]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONTrackerPreprocessor.cxx
Adding classes forgotten in previous commit
[u/mrichter/AliRoot.git] / MUON / AliMUONTrackerPreprocessor.cxx
CommitLineData
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"
a6882d5b 24
25#include "AliLog.h"
26#include "AliShuttleInterface.h"
27#include "Riostream.h"
28#include "TObjArray.h"
29
3d1463c8 30//-----------------------------------------------------------------------------
a6882d5b 31/// \class AliMUONTrackerPreprocessor
32///
33/// Shuttle preprocessor for MUON tracker
34///
35/// It's simply a manager class that deals with a list of sub-tasks
36/// (of type AliMUONVSubprocessor).
37///
38/// \author Laurent Aphecetche
3d1463c8 39//-----------------------------------------------------------------------------
a6882d5b 40
41/// \cond CLASSIMP
42ClassImp(AliMUONTrackerPreprocessor)
43/// \endcond
44
45//_____________________________________________________________________________
46AliMUONTrackerPreprocessor::AliMUONTrackerPreprocessor(AliShuttleInterface* shuttle)
7e59ccd2 47: AliMUONPreprocessor("MCH",shuttle),
48 fPedestalSubprocessor(new AliMUONPedestalSubprocessor(this)),
49 fGMSSubprocessor(new AliMUONGMSSubprocessor(this)),
505bc496 50 fHVSubprocessor(new AliMUONHVSubprocessor(this)),
51 fGainSubprocessor(new AliMUONGainSubprocessor(this))
a6882d5b 52{
53 /// ctor.
fcd6be20 54
55 AddRunType("PEDESTAL");
56 AddRunType("CALIBRATION");
57 AddRunType("GMS");
58 AddRunType("PHYSICS");
a6882d5b 59}
60
61//_____________________________________________________________________________
62AliMUONTrackerPreprocessor::~AliMUONTrackerPreprocessor()
63{
64 /// dtor
7e59ccd2 65
66 delete fPedestalSubprocessor;
67 delete fGMSSubprocessor;
68 delete fHVSubprocessor;
505bc496 69 delete fGainSubprocessor;
a6882d5b 70}
71
72//_____________________________________________________________________________
73void
74AliMUONTrackerPreprocessor::Initialize(Int_t run, UInt_t startTime, UInt_t endTime)
75{
52f6e34b 76 /// Re-register the subprocessor(s) depending on the actual runType
ddec2e53 77
7e59ccd2 78 ClearSubprocessors();
a6882d5b 79
80 TString runType = GetRunType();
7e59ccd2 81
2ab3623b 82 fIsValid = kTRUE;
581ece00 83 fIsApplicable = kTRUE;
2ab3623b 84
7103cd04 85 if ( runType == "PEDESTAL" )
a6882d5b 86 {
7e59ccd2 87 Add(fPedestalSubprocessor); // to be called only for pedestal runs
a6882d5b 88 Log("INFO-Will run Pedestal subprocessor");
89 }
fcd6be20 90 else if ( runType == "CALIBRATION" )
a6882d5b 91 {
fcd6be20 92 Add(fGainSubprocessor); // to be called only for gain runs
505bc496 93 Log("INFO-Will run Gain subprocessor");
a6882d5b 94 }
fcd6be20 95 else if ( runType == "GMS" )
a6882d5b 96 {
7e59ccd2 97 Add(fGMSSubprocessor);
a6882d5b 98 Log("INFO-Will run GMS subprocessor");
99 }
fcd6be20 100 else if ( runType == "PHYSICS" )
a6882d5b 101 {
d489129d 102 Bool_t useDCS(kTRUE);
103 Add(fHVSubprocessor,useDCS); // to be called only for physics runs
a6882d5b 104 Log("INFO-Will run HV subprocessor");
105 }
106 else
107 {
581ece00 108 fIsApplicable = kFALSE;
a6882d5b 109 }
110
111 AliMUONPreprocessor::Initialize(run,startTime,endTime);
112
113}