ALIROOT-5488 Remove build/include from the include directories
[u/mrichter/AliRoot.git] / TRD / AliTRDTrigger.cxx
CommitLineData
c8b1590d 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 //
e58e15dc 21// from here the trigger simulation for L0 (pretrigger) and L1 (GTU) are //
22// called //
c8b1590d 23// //
24///////////////////////////////////////////////////////////////////////////////
25
26#include "TClonesArray.h"
27
28#include "AliLog.h"
29#include "AliTriggerInput.h"
e58e15dc 30#include "AliTriggerDetector.h"
c8b1590d 31
c8b1590d 32#include "AliTRDTrigger.h"
e58e15dc 33#include "AliTRDTriggerL0.h"
34#include "AliTRDTriggerL1.h"
c8b1590d 35
e58e15dc 36AliTRDTrigger::AliTRDTrigger() :
37 AliTriggerDetector(),
38 fTriggers()
c8b1590d 39{
e58e15dc 40 // default constructor
41
42 fTriggers.AddLast(new AliTRDTriggerL0());
43 fTriggers.AddLast(new AliTRDTriggerL1());
c8b1590d 44
45 SetName("TRD");
46}
47
48AliTRDTrigger::~AliTRDTrigger()
49{
50 // destructor
e58e15dc 51 TIter trigger(&fTriggers);
5f006bd7 52 while (AliTriggerDetector *trgDet = (AliTriggerDetector*) trigger())
e58e15dc 53 delete trgDet;
54
55 fInputs.Clear(); // inputs are deleted either by CTP or submodule
c8b1590d 56}
57
64a2c4b1 58void AliTRDTrigger::AssignInputs(const TObjArray& inputs)
c8b1590d 59{
e58e15dc 60 // Create inputs for all registered trigger modules.
a4d25339 61 if( fInputs.GetEntriesFast() > 0 ) return;
c8b1590d 62
e58e15dc 63 TIter trigger(&fTriggers);
64 while (AliTriggerDetector *trgDet = (AliTriggerDetector*) trigger()) {
64a2c4b1 65 trgDet->AssignInputs(inputs);
e58e15dc 66 fInputs.AddAll(trgDet->GetInputs());
67 }
68}
69
64a2c4b1 70void AliTRDTrigger::CreateInputs()
71{
72
73}
74
c8b1590d 75void AliTRDTrigger::Trigger()
76{
77 // TRD trigger steering
5f006bd7 78 // all registered TRD trigger mechanism are
e58e15dc 79 // run from here
c8b1590d 80
e58e15dc 81 TIter trigger(&fTriggers);
82 while (AliTriggerDetector *trgDet = (AliTriggerDetector*) trigger()) {
83 trgDet->Trigger();
c8b1590d 84 }
c8b1590d 85}