Update of ACORDE-QA-Raw data histograms (now they go from -0.5 to 59.5)
[u/mrichter/AliRoot.git] / MUON / AliMUONTriggerPreprocessor.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 "AliMUONTriggerPreprocessor.h"
19
20 #include "AliLog.h"
21 #include "AliMUONTriggerSubprocessor.h"
22 #include "AliMUONTriggerDCSSubprocessor.h"
23 #include "AliShuttleInterface.h"
24 #include "Riostream.h"
25
26 //-----------------------------------------------------------------------------
27 /// \class AliMUONTriggerPreprocessor
28 ///
29 /// Shuttle preprocessor for MUON trigger. The real worker
30 /// class is AliMUONTriggerSubprocessor
31 /// 
32 /// \author Laurent Aphecetche
33 //-----------------------------------------------------------------------------
34
35 /// \cond CLASSIMP
36 ClassImp(AliMUONTriggerPreprocessor)
37 /// \endcond
38
39 //_____________________________________________________________________________
40 AliMUONTriggerPreprocessor::AliMUONTriggerPreprocessor(AliShuttleInterface* shuttle)
41 : AliMUONPreprocessor("MTR",shuttle),
42   fTriggerSubprocessor(new AliMUONTriggerSubprocessor(this)),
43   fTriggerDCSSubprocessor(new AliMUONTriggerDCSSubprocessor(this))
44 {
45   /// ctor. 
46   AddRunType("PHYSICS");
47   AddRunType("CALIBRATION");
48 }
49
50 //_____________________________________________________________________________
51 AliMUONTriggerPreprocessor::~AliMUONTriggerPreprocessor()
52 {
53   /// dtor
54   delete fTriggerSubprocessor;
55   delete fTriggerDCSSubprocessor;
56 }
57
58 //_____________________________________________________________________________
59 void
60 AliMUONTriggerPreprocessor::Initialize(Int_t run, UInt_t startTime, UInt_t endTime)
61 {
62   /// Re-register the subprocessor(s) depending on the actual runType
63
64   ClearSubprocessors();
65   
66   fIsValid = kTRUE;
67   fIsApplicable = kTRUE;
68   
69   TString runType = GetRunType();
70   
71   if ( runType == "PHYSICS" ) 
72   {
73     Add(fTriggerSubprocessor);
74     Add(fTriggerDCSSubprocessor,kTRUE); // uses DCS
75   }
76   else if (runType == "CALIBRATION")
77   {
78     Add(fTriggerSubprocessor);
79   }
80   else
81   {
82     fIsApplicable = kFALSE;
83   }
84   
85   AliMUONPreprocessor::Initialize(run,startTime,endTime);  
86 }