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