Line data Source code
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 12 : ClassImp(AliMUONTriggerPreprocessor)
37 : /// \endcond
38 :
39 : //_____________________________________________________________________________
40 : AliMUONTriggerPreprocessor::AliMUONTriggerPreprocessor(AliShuttleInterface* shuttle)
41 0 : : AliMUONPreprocessor("MTR",shuttle),
42 0 : fTriggerSubprocessor(new AliMUONTriggerSubprocessor(this)),
43 0 : fTriggerDCSSubprocessor(new AliMUONTriggerDCSSubprocessor(this))
44 0 : {
45 : /// ctor.
46 0 : AddRunType("PHYSICS");
47 0 : AddRunType("CALIBRATION");
48 0 : }
49 :
50 : //_____________________________________________________________________________
51 : AliMUONTriggerPreprocessor::~AliMUONTriggerPreprocessor()
52 0 : {
53 : /// dtor
54 0 : delete fTriggerSubprocessor;
55 0 : delete fTriggerDCSSubprocessor;
56 0 : }
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 0 : ClearSubprocessors();
65 :
66 0 : fIsValid = kTRUE;
67 0 : fIsApplicable = kTRUE;
68 :
69 0 : TString runType = GetRunType();
70 :
71 0 : if ( runType == "PHYSICS" || runType == "CALIBRATION" )
72 : {
73 0 : Add(fTriggerSubprocessor);
74 0 : Add(fTriggerDCSSubprocessor,kTRUE); // uses DCS
75 : }
76 : else
77 : {
78 0 : fIsApplicable = kFALSE;
79 : }
80 :
81 0 : AliMUONPreprocessor::Initialize(run,startTime,endTime);
82 0 : }
|