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