]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONTrackerPreprocessor.cxx
Added subprocessor as data members;
[u/mrichter/AliRoot.git] / MUON / AliMUONTrackerPreprocessor.cxx
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)
44 : AliMUONPreprocessor("MCH",shuttle),
45   fPedestalSubprocessor(new AliMUONPedestalSubprocessor(this)),
46   fGMSSubprocessor(new AliMUONGMSSubprocessor(this)),    
47   fHVSubprocessor(new AliMUONHVSubprocessor(this))    
48 {
49   /// ctor. 
50 }
51
52 //_____________________________________________________________________________
53 AliMUONTrackerPreprocessor::~AliMUONTrackerPreprocessor()
54 {
55   /// dtor
56
57   delete fPedestalSubprocessor;
58   delete fGMSSubprocessor;
59   delete fHVSubprocessor;
60 }
61
62 //_____________________________________________________________________________
63 void
64 AliMUONTrackerPreprocessor::Initialize(Int_t run, UInt_t startTime, UInt_t endTime)
65 {
66   ClearSubprocessors();
67   
68   TString runType = GetRunType();
69   
70   if ( runType == "PEDESTAL_RUN" ) // FIXME : check the name
71   {
72     Add(fPedestalSubprocessor); // to be called only for pedestal runs
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   {
82     Add(fGMSSubprocessor);
83     Log("INFO-Will run GMS subprocessor");
84   }
85   else if ( runType == "PHYSICS" ) // FIXME : check the name
86   {
87     Add(fHVSubprocessor); // to be called only for physics runs
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 }