Method ReadFile() returns now Int_t (Laurent)
[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"
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
39ClassImp(AliMUONTrackerPreprocessor)
40/// \endcond
41
42//_____________________________________________________________________________
43AliMUONTrackerPreprocessor::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//_____________________________________________________________________________
53AliMUONTrackerPreprocessor::~AliMUONTrackerPreprocessor()
54{
55 /// dtor
7e59ccd2 56
57 delete fPedestalSubprocessor;
58 delete fGMSSubprocessor;
59 delete fHVSubprocessor;
a6882d5b 60}
61
62//_____________________________________________________________________________
63void
64AliMUONTrackerPreprocessor::Initialize(Int_t run, UInt_t startTime, UInt_t endTime)
65{
7e59ccd2 66 ClearSubprocessors();
a6882d5b 67
68 TString runType = GetRunType();
7e59ccd2 69
a6882d5b 70 if ( runType == "PEDESTAL_RUN" ) // FIXME : check the name
71 {
7e59ccd2 72 Add(fPedestalSubprocessor); // to be called only for pedestal runs
a6882d5b 73 Log("INFO-Will run Pedestal subprocessor");
74 }
75 else if ( runType == "ELECTRONICS_CALIBRATION_RUN" ) // FIXME : check the name
76 {
77 Log("WARNING-Subprocessor for gains not yet implemented");
78 //fSubprocessors->Add(new AliMUONGainSubprocessor(this)); // to be called only for gain runs
79 }
80 else if ( runType == "GMS" ) // FIXME : check the name
81 {
7e59ccd2 82 Add(fGMSSubprocessor);
a6882d5b 83 Log("INFO-Will run GMS subprocessor");
84 }
85 else if ( runType == "PHYSICS" ) // FIXME : check the name
86 {
7e59ccd2 87 Add(fHVSubprocessor); // to be called only for physics runs
a6882d5b 88 Log("INFO-Will run HV subprocessor");
89 }
90 else
91 {
92 Log(Form("ERROR-Unknown RunType=%",runType.Data()));
93 }
94
95 AliMUONPreprocessor::Initialize(run,startTime,endTime);
96
97}