Adding more bins in QA (Alis)
[u/mrichter/AliRoot.git] / MUON / AliMUONTriggerPreprocessor.cxx
CommitLineData
2ab3623b 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"
49e110ec 22#include "AliMUONTriggerDCSSubprocessor.h"
2ab3623b 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
36ClassImp(AliMUONTriggerPreprocessor)
37/// \endcond
38
39//_____________________________________________________________________________
40AliMUONTriggerPreprocessor::AliMUONTriggerPreprocessor(AliShuttleInterface* shuttle)
41: AliMUONPreprocessor("MTR",shuttle),
49e110ec 42 fTriggerSubprocessor(new AliMUONTriggerSubprocessor(this)),
43 fTriggerDCSSubprocessor(new AliMUONTriggerDCSSubprocessor(this))
2ab3623b 44{
45 /// ctor.
fcd6be20 46 AddRunType("PHYSICS");
47 AddRunType("CALIBRATION");
2ab3623b 48}
49
50//_____________________________________________________________________________
51AliMUONTriggerPreprocessor::~AliMUONTriggerPreprocessor()
52{
53 /// dtor
54 delete fTriggerSubprocessor;
49e110ec 55 delete fTriggerDCSSubprocessor;
2ab3623b 56}
57
58//_____________________________________________________________________________
59void
60AliMUONTriggerPreprocessor::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;
581ece00 67 fIsApplicable = kTRUE;
2ab3623b 68
69 TString runType = GetRunType();
70
49e110ec 71 if ( runType == "PHYSICS" )
72 {
73 Add(fTriggerSubprocessor);
74 Add(fTriggerDCSSubprocessor,kTRUE); // uses DCS
75 }
76 else if (runType == "CALIBRATION")
2ab3623b 77 {
78 Add(fTriggerSubprocessor);
79 }
80 else
81 {
581ece00 82 fIsApplicable = kFALSE;
2ab3623b 83 }
84
85 AliMUONPreprocessor::Initialize(run,startTime,endTime);
86}