]>
Commit | Line | Data |
---|---|---|
81d62bb4 | 1 | // $Id: $ |
2 | /************************************************************************** | |
3 | * This file is property of and copyright by the ALICE HLT Project * | |
4 | * ALICE Experiment at CERN, All rights reserved. * | |
5 | * * | |
6 | * Primary Authors: Artur Szostak <artursz@iafrica.com> * | |
7 | * for The ALICE HLT Project. * | |
8 | * * | |
9 | * Permission to use, copy, modify and distribute this software and its * | |
10 | * documentation strictly for non-commercial purposes is hereby granted * | |
11 | * without fee, provided that the above copyright notice appears in all * | |
12 | * copies and that both the copyright notice and this permission notice * | |
13 | * appear in the supporting documentation. The authors make no claims * | |
14 | * about the suitability of this software for any purpose. It is * | |
15 | * provided "as is" without express or implied warranty. * | |
16 | **************************************************************************/ | |
52f67e50 | 17 | |
81d62bb4 | 18 | /// @file TriggerConfig.C |
19 | /// @author Artur Szostak <artursz@iafrica.com> | |
20 | /// @date 28 Oct 2009 | |
21 | /// @brief Implementation of the global trigger menu configuration routines. | |
22 | /// | |
23 | /// The TriggerConfig routine generates a global trigger menu configuration used | |
24 | /// to test the AliHLTGlobalTriggerComponent class. | |
25 | ||
26 | /** | |
27 | * Initialise a trigger menu to test a configuration where all trigger menu entries | |
28 | * have different priority values. Thus only the first trigger menu item that | |
29 | * matches is activated. | |
30 | */ | |
31 | void PriorityGroupTestConfig() | |
32 | { | |
33 | AliHLTGlobalTriggerConfig config("Priority group test config"); | |
34 | config.AddItem(3, "triggerTPC && triggerSSD", "triggerSSD", "Fast SSD trigger"); | |
35 | config.AddItem(2, "triggerMUON || triggerSSD", "triggerMUON | triggerSSD", "MUON trigger"); | |
36 | config.AddItem(1, "triggerTPC", "triggerTPC | triggerMUON | triggerSSD", "TPC trigger"); | |
37 | config.SetDefaultTriggerDescription("No trigger"); | |
38 | } | |
39 | ||
40 | /** | |
41 | * Initialise a trigger menu to test a configuration where all trigger menu entries | |
42 | * have the same priority values. Thus all entries form a single priority group and | |
43 | * multiple items can be matched with the trigger input. | |
44 | */ | |
45 | void SingleGroupTestConfig() | |
52f67e50 | 46 | { |
81d62bb4 | 47 | AliHLTGlobalTriggerConfig config("Single group test config"); |
48 | config.AddItem("triggerTPC", "triggerTPC", "TPC trigger"); | |
49 | config.AddItem("triggerMUON", "triggerMUON", "MUON trigger"); | |
50 | config.AddItem("triggerSSD", "triggerSSD", "SSD trigger"); | |
51 | config.SetDefaultConditionOperator("||"); | |
52 | config.SetDefaultDomainOperator("|"); | |
52f67e50 | 53 | } |
54 | ||
81d62bb4 | 55 | /** |
56 | * Create a trigger menu configuration to test the prescalar mechanism. | |
57 | */ | |
58 | void PrescalarTestConfig() | |
59 | { | |
60 | AliHLTGlobalTriggerConfig config("Prescalar test config"); | |
325e5e42 | 61 | config.AddItem(2, "triggerTPC", "triggerTPC", 3, "TPC trigger"); |
81d62bb4 | 62 | config.AddItem(1, "triggerMUON", "triggerMUON", "MUON trigger"); |
63 | config.SetDefaultConditionOperator("||"); | |
325e5e42 | 64 | config.SetDefaultTriggerDescription("No trigger"); |
65 | config.SetDefaultTriggerDomain(AliHLTTriggerDomain("*******:HLT ")); | |
81d62bb4 | 66 | } |
67 | ||
68 | /** | |
69 | * Create a trigger menu configuration to test the trigger menu symbol mechanism. | |
70 | */ | |
71 | void SymbolTestConfig() | |
72 | { | |
73 | AliHLTGlobalTriggerConfig config("Symbol test config"); | |
74 | config.AddSymbol("domain-All", "AliHLTTriggerDomain", "", "AliHLTTriggerDomain(\"*******:***,-DAQRDOUT:TST\")"); | |
325e5e42 | 75 | config.AddSymbol("PHOSclusters", "AliHLTTriggerDomain", "", "AliHLTTriggerDomain(\"CLUSTERS:PHOS\")"); |
76 | config.AddSymbol("PHOStracks", "AliHLTTriggerDomain", "", "AliHLTTriggerDomain(\"TRACKS:PHOS\")"); | |
77 | config.AddSymbol("domainPHOS", "AliHLTTriggerDomain", "", "PHOSclusters | PHOStracks"); | |
78 | config.AddSymbol("triggerTPC", "bool", "this->Result()", "false", "AliHLTTriggerDecision"); | |
81d62bb4 | 79 | config.AddSymbol("trigClasses", "AliHLTUInt64_t", "this->GetTriggerClasses()", "0x0", "AliHLTEventSummary"); |
325e5e42 | 80 | config.AddItem(2, "true", "domain-All", 4, "Pass through"); |
81 | config.AddItem(1, "trigClasses == 0x2", "triggerTPC | domainPHOS", "Trigger class 2"); | |
81d62bb4 | 82 | } |
83 | ||
84 | /** | |
85 | * This will make a complex configuration that uses multiple features of the | |
86 | * trigger menu configuration system. | |
87 | */ | |
88 | void ComplexTestConfig() | |
89 | { | |
90 | AliHLTGlobalTriggerConfig config("Complex test config"); | |
91 | config.AddSymbol("domain-All", "AliHLTTriggerDomain", "", "AliHLTTriggerDomain(\"*******:***,-DAQRDOUT:TST\")"); | |
325e5e42 | 92 | config.AddSymbol("PHOSclusters", "AliHLTTriggerDomain", "", "AliHLTTriggerDomain(\"CLUSTERS:PHOS\")"); |
93 | config.AddSymbol("PHOStracks", "AliHLTTriggerDomain", "", "AliHLTTriggerDomain(\"TRACKS:PHOS\")"); | |
94 | config.AddSymbol("domainPHOS", "AliHLTTriggerDomain", "", "PHOSclusters | PHOStracks"); | |
95 | config.AddItem(4, "true", "domain-All", 7, "Pass through"); | |
96 | config.AddItem(3, "triggerSSD", "triggerSSD |", "SSD trigger 1"); | |
97 | config.AddItem(3, "triggerMUON", "triggerMUON", "MUON trigger 1"); | |
98 | config.AddItem(2, "triggerSSD ||", "triggerSSD | domainPHOS", "SSD trigger 2"); | |
99 | config.AddItem(2, "triggerMUON ||", "triggerMUON", "MUON trigger 2"); | |
81d62bb4 | 100 | config.AddItem(1, "triggerTPC", "triggerTPC | triggerSSD | triggerMUON", "Slow trigger"); |
325e5e42 | 101 | config.SetDefaultTriggerDomain(AliHLTTriggerDomain("*******:MUON")); |
102 | config.SetDefaultConditionOperator("&&"); | |
81d62bb4 | 103 | } |
104 | ||
105 | /** | |
106 | * Top level configuration routine for the global trigger component tests. | |
107 | */ | |
108 | void TriggerConfig(int version = 0) | |
109 | { | |
110 | switch (version) | |
111 | { | |
112 | case 0: PriorityGroupTestConfig(); break; | |
113 | case 1: SingleGroupTestConfig(); break; | |
114 | case 2: PrescalarTestConfig(); break; | |
115 | case 3: SymbolTestConfig(); break; | |
116 | case 4: ComplexTestConfig(); break; | |
117 | default: AliHLTGlobalTriggerConfig config("Empty test config"); | |
118 | } | |
119 | } |