]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDTrigger.cxx
restore threshold getters after parameter dynamics update (fw v. >= A012)
[u/mrichter/AliRoot.git] / TRD / AliTRDTrigger.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: AliTRDTrigger.cxx 31904 2009-04-08 16:42:03Z cblume $ */
17
18 ///////////////////////////////////////////////////////////////////////////////
19 //                                                                           //
20 // TRD trigger interface class to CTP                                        //
21 // from here the trigger simulation for L0 (pretrigger) and L1 (GTU) are     //
22 // called                                                                    //
23 //                                                                           //
24 ///////////////////////////////////////////////////////////////////////////////
25
26 #include "TClonesArray.h"
27
28 #include "AliLog.h"
29 #include "AliTriggerInput.h"
30 #include "AliTriggerDetector.h"
31
32 #include "AliTRDTrigger.h"
33 #include "AliTRDTriggerL0.h"
34 #include "AliTRDTriggerL1.h"
35
36 AliTRDTrigger::AliTRDTrigger() :
37   AliTriggerDetector(),
38   fTriggers()
39 {
40   // default constructor
41
42   fTriggers.AddLast(new AliTRDTriggerL0());
43   fTriggers.AddLast(new AliTRDTriggerL1());
44
45   SetName("TRD");
46 }
47
48 AliTRDTrigger::~AliTRDTrigger()
49 {
50   // destructor
51   TIter trigger(&fTriggers);
52   while (AliTriggerDetector *trgDet = (AliTriggerDetector*) trigger())
53     delete trgDet;
54
55   fInputs.Clear(); // inputs are deleted either by CTP or submodule
56 }
57
58 void AliTRDTrigger::AssignInputs(const TObjArray& inputs)
59 {
60   // Create inputs for all registered trigger modules.
61   if( fInputs.GetEntriesFast() > 0 ) return;
62
63   TIter trigger(&fTriggers);
64   while (AliTriggerDetector *trgDet = (AliTriggerDetector*) trigger()) {
65     trgDet->AssignInputs(inputs);
66     fInputs.AddAll(trgDet->GetInputs());
67   }
68 }
69
70 void AliTRDTrigger::CreateInputs()
71 {
72
73 }
74
75 void AliTRDTrigger::Trigger()
76 {
77   // TRD trigger steering
78   // all registered TRD trigger mechanism are
79   // run from here
80
81   TIter trigger(&fTriggers);
82   while (AliTriggerDetector *trgDet = (AliTriggerDetector*) trigger()) {
83     trgDet->Trigger();
84   }
85 }