1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
16 /* $Id: AliTRDTrigger.cxx 31904 2009-04-08 16:42:03Z cblume $ */
18 ///////////////////////////////////////////////////////////////////////////////
20 // TRD trigger interface class to CTP //
21 // from here the trigger simulation for L0 (pretrigger) and L1 (GTU) are //
24 ///////////////////////////////////////////////////////////////////////////////
26 #include "TClonesArray.h"
29 #include "AliTriggerInput.h"
30 #include "AliTriggerDetector.h"
32 #include "AliTRDTrigger.h"
33 #include "AliTRDTriggerL0.h"
34 #include "AliTRDTriggerL1.h"
36 AliTRDTrigger::AliTRDTrigger() :
40 // default constructor
42 fTriggers.AddLast(new AliTRDTriggerL0());
43 fTriggers.AddLast(new AliTRDTriggerL1());
48 AliTRDTrigger::~AliTRDTrigger()
51 TIter trigger(&fTriggers);
52 while (AliTriggerDetector *trgDet = (AliTriggerDetector*) trigger())
55 fInputs.Clear(); // inputs are deleted either by CTP or submodule
58 void AliTRDTrigger::CreateInputs(const TObjArray& inputs)
60 // Create inputs for all registered trigger modules.
62 fInputs.SetOwner(kFALSE);
64 TIter trigger(&fTriggers);
65 while (AliTriggerDetector *trgDet = (AliTriggerDetector*) trigger()) {
66 trgDet->CreateInputs(inputs);
67 fInputs.AddAll(trgDet->GetInputs());
71 void AliTRDTrigger::CreateInputs()
73 // Here no inputs are created.
74 // This is done in the submodules called from
75 // CreateInputs(const TObjArray& inputs).
80 void AliTRDTrigger::Trigger()
82 // TRD trigger steering
83 // all registered TRD trigger mechanism are
86 TIter trigger(&fTriggers);
87 while (AliTriggerDetector *trgDet = (AliTriggerDetector*) trigger()) {