]>
Commit | Line | Data |
---|---|---|
cc76079a | 1 | /************************************************************************** |
1b3806c8 | 2 | * This file is property of and copyright by the ALICE HLT Project * |
cc76079a | 3 | * All rights reserved. * |
4 | * * | |
5 | * Primary Authors: * | |
6 | * Artur Szostak <artursz@iafrica.com> * | |
7 | * * | |
8 | * Permission to use, copy, modify and distribute this software and its * | |
9 | * documentation strictly for non-commercial purposes is hereby granted * | |
10 | * without fee, provided that the above copyright notice appears in all * | |
11 | * copies and that both the copyright notice and this permission notice * | |
12 | * appear in the supporting documentation. The authors make no claims * | |
13 | * about the suitability of this software for any purpose. It is * | |
14 | * provided "as is" without express or implied warranty. * | |
15 | **************************************************************************/ | |
16 | ||
1b3806c8 | 17 | /* $Id$ */ |
18 | ||
19 | /** | |
20 | * \ingroup macros | |
21 | * \file RunChain.C | |
22 | * \brief Macro for running the dHLT chain in a standalone mode. | |
23 | * | |
24 | * This macro is used to run the dHLT component chain within the AliHLTSystem | |
cc76079a | 25 | * framework, which is a simulation of the dHLT online system's output. |
26 | * To run this macro you must be in the same directory as the galice.root | |
27 | * files or in the directory containing the rawXX/ directories produced from | |
28 | * AliRoot simulations. | |
1b3806c8 | 29 | * Also make sure you specify CDB as for the lutDir (lookup table directory) |
30 | * or that the appropriate LUTs are in the same directory as your working | |
31 | * directory, or you can specify the directory with the lutDir parameter option. | |
32 | * | |
33 | * The simplest way to run this macro with defaults is to copy "rootlogon.C" from | |
34 | * $ALICE_ROOT/HLT/MUON/macros into your current working directory, then from | |
35 | * the shell command prompt run the following command: | |
36 | * \code | |
37 | * > aliroot -b -q -l $ALICE_ROOT/HLT/MUON/macros/RunChain.C+ | |
38 | * \endcode | |
39 | * | |
40 | * \author Artur Szostak <artursz@iafrica.com> | |
cc76079a | 41 | */ |
42 | ||
43 | #if !defined(__CINT__) || defined(__MAKECINT__) | |
846e6f41 | 44 | #include "AliCDBManager.h" |
45 | #include "AliHLTSystem.h" | |
46 | #include "AliHLTConfiguration.h" | |
cc76079a | 47 | #include "AliLog.h" |
48 | #include "TString.h" | |
846e6f41 | 49 | #include "TClassTable.h" |
cc76079a | 50 | #include <iostream> |
51 | using std::cerr; | |
52 | using std::endl; | |
53 | #endif | |
54 | ||
1b3806c8 | 55 | /** |
56 | * Used to run the dimuon HLT (dHLT) chain in various configuration in a standalone | |
57 | * configuration. This is normally used for debugging, testing and can also be used | |
58 | * as an example of how to build chains for dHLT by hand. | |
59 | * | |
60 | * @param chainType Specifies the type of chain to run. This can be one of the | |
cc76079a | 61 | * following: |
62 | * "full" - Run the full dHLT chain. (default) | |
63 | * "ddlreco" - Run only the reconstruction of the DDL raw data up to hits | |
64 | * and trigger records. | |
65 | * "tracker" - Run the tracker only using hits and trigger records from | |
66 | * AliRoot simulation or offline reconstruction. | |
67 | * @param firstEvent The event number of the first event to process. (default = 0) | |
68 | * @param lastEvent The event number of the last event to process. If this is | |
69 | * less than firstEvent then it is set to firstEvent automatically. (default = -1) | |
1f50d9b1 | 70 | * @param output Specifies the kind of output to generate. The options can be one |
71 | * of the following: | |
72 | * "bin" - Generates all possible output and dumps it to binary files | |
73 | * using the FileWriter component. | |
74 | * "root" - Generates all possible output and writes it to a ROOT file | |
75 | * using the ROOTFileWriter component. | |
76 | * "tracks_bin" - Generates only track data and dumps it to binary files | |
77 | * using the FileWriter component. This option is equivalent to | |
78 | * 'bin' if the chain type is 'ddlreco'. | |
79 | * "tracks_root" - Generates only track data and writes it to a ROOT file | |
80 | * using the ROOTFileWriter component. This option is equivalent | |
81 | * to 'bin' if the chain type is 'ddlreco'. | |
cc76079a | 82 | * @param dataSource This is the data source from which to use hits and trigger |
83 | * records when we are running the tracker only chain. Note this parameter | |
84 | * only makes sense if chainType = "tracker". The possible options are: | |
85 | * "sim" - Take data from GEANT hits. (default) | |
86 | * "rec" - Take data from offline reconstructed hits and local trigger | |
87 | * objects. | |
88 | * @param logLevel Specifies the amount of logging messages produced by the HLT | |
89 | * system. The possible options are: | |
90 | * "normal" - Shows warnings, errors and information. | |
24f12607 | 91 | * "debug" - Shows all messages up to the debug level only for HLT and the |
92 | * same as normal for all other modules. | |
cc76079a | 93 | * "max" - Shows everything including debug messages if they were compiled in. |
94 | * "min" - Shows only error messages. | |
1f50d9b1 | 95 | * @param lutDir This is the directory in which the LUTs can be found. |
1b3806c8 | 96 | * If it is set to "CDB" (case sensitive) then the LUTs will be loaded from |
97 | * CDB instead. The default behaviour is to read from the local CDB store. | |
dba14d7d | 98 | * @param checkData A flag for indicating if the event data should be checked |
99 | * for consistency with the AliHLTMUONDataCheckerComponent. | |
cc76079a | 100 | */ |
101 | void RunChain( | |
102 | const char* chainType = "full", | |
103 | Int_t firstEvent = 0, | |
104 | Int_t lastEvent = -1, | |
1f50d9b1 | 105 | const char* output = "bin", |
cc76079a | 106 | const char* dataSource = "sim", |
1f50d9b1 | 107 | const char* logLevel = "normal", |
dba14d7d | 108 | const char* lutDir = "CDB", |
109 | bool checkData = false | |
cc76079a | 110 | ) |
111 | { | |
846e6f41 | 112 | // Setup the CDB default storage and run number if nothing was set. |
113 | AliCDBManager* cdbManager = AliCDBManager::Instance(); | |
114 | if (cdbManager == NULL) | |
115 | { | |
116 | cerr << "ERROR: Global CDB manager object does not exist." << endl; | |
117 | return; | |
118 | } | |
119 | if (cdbManager->GetDefaultStorage() == NULL) | |
120 | { | |
121 | cdbManager->SetDefaultStorage("local://$ALICE_ROOT"); | |
122 | } | |
123 | if (cdbManager->GetRun() == -1) | |
124 | { | |
125 | cdbManager->SetRun(0); | |
126 | } | |
127 | ||
cc76079a | 128 | // Make sure that the lastEvent is greater than firstEvent. |
129 | if (lastEvent < firstEvent) | |
130 | lastEvent = firstEvent; | |
131 | int eventCount = lastEvent - firstEvent + 1; | |
132 | ||
133 | bool buildDDLFilePubs = false; | |
134 | bool buildDDLRecoComps = false; | |
135 | bool buildSimDataPubs = false; | |
136 | bool buildRecDataPubs = false; | |
cc76079a | 137 | bool buildTrackerComp = false; |
cc76079a | 138 | bool maxLogging = false; |
24f12607 | 139 | bool debugLogging = false; |
cc76079a | 140 | bool minLogging = false; |
1f50d9b1 | 141 | bool useRootWriter = false; |
142 | bool makeTracksOnly = false; | |
c9537879 | 143 | bool buildDecisionComp = true; |
1f50d9b1 | 144 | |
145 | // Parse the chainType, output, dataSource and logLevel option strings: | |
146 | TString outOpt = output; | |
147 | if (outOpt.CompareTo("bin", TString::kIgnoreCase) == 0) | |
148 | { | |
149 | useRootWriter = false; | |
150 | } | |
151 | else if (outOpt.CompareTo("root", TString::kIgnoreCase) == 0) | |
152 | { | |
153 | useRootWriter = true; | |
154 | } | |
155 | else if (outOpt.CompareTo("tracks_bin", TString::kIgnoreCase) == 0) | |
156 | { | |
157 | useRootWriter = false; | |
158 | makeTracksOnly = true; | |
159 | } | |
160 | else if (outOpt.CompareTo("tracks_root", TString::kIgnoreCase) == 0) | |
161 | { | |
162 | useRootWriter = true; | |
163 | makeTracksOnly = true; | |
164 | } | |
165 | else | |
166 | { | |
167 | cerr << "ERROR: Unknown option for output: " << output << endl; | |
168 | return; | |
169 | } | |
cc76079a | 170 | |
cc76079a | 171 | TString chainOpt = chainType; |
172 | if (chainOpt.CompareTo("full", TString::kIgnoreCase) == 0) | |
173 | { | |
174 | buildDDLFilePubs = true; | |
175 | buildDDLRecoComps = true; | |
176 | buildTrackerComp = true; | |
cc76079a | 177 | } |
1f50d9b1 | 178 | else if (chainOpt.CompareTo("ddlreco", TString::kIgnoreCase) == 0) |
cc76079a | 179 | { |
180 | buildDDLFilePubs = true; | |
181 | buildDDLRecoComps = true; | |
c9537879 | 182 | buildDecisionComp = false; |
cc76079a | 183 | } |
184 | else if (chainOpt.CompareTo("tracker", TString::kIgnoreCase) == 0) | |
185 | { | |
cc76079a | 186 | buildTrackerComp = true; |
1f50d9b1 | 187 | |
cc76079a | 188 | TString dataOpt = dataSource; |
189 | if (dataOpt.CompareTo("sim", TString::kIgnoreCase) == 0) | |
190 | { | |
191 | buildSimDataPubs = true; | |
192 | } | |
193 | else if (dataOpt.CompareTo("rec", TString::kIgnoreCase) == 0) | |
194 | { | |
195 | buildRecDataPubs = true; | |
196 | } | |
197 | else | |
198 | { | |
199 | cerr << "ERROR: Unknown option for dataSource: " << dataSource << endl; | |
200 | return; | |
201 | } | |
202 | } | |
1f50d9b1 | 203 | else |
204 | { | |
205 | cerr << "ERROR: Unknown option for chainType: " << chainType << endl; | |
206 | return; | |
207 | } | |
cc76079a | 208 | |
209 | TString logOpt = logLevel; | |
a563b588 | 210 | if (logOpt.CompareTo("normal", TString::kIgnoreCase) == 0) |
cc76079a | 211 | { |
212 | // nothing to do. | |
213 | } | |
24f12607 | 214 | else if (logOpt.CompareTo("debug", TString::kIgnoreCase) == 0) |
215 | { | |
216 | debugLogging = true; | |
217 | } | |
a563b588 | 218 | else if (logOpt.CompareTo("max", TString::kIgnoreCase) == 0) |
cc76079a | 219 | { |
220 | maxLogging = true; | |
221 | } | |
a563b588 | 222 | else if (logOpt.CompareTo("min", TString::kIgnoreCase) == 0) |
cc76079a | 223 | { |
224 | minLogging = true; | |
225 | } | |
226 | else | |
227 | { | |
228 | cerr << "ERROR: Unknown option for logLevel: " << logLevel << endl; | |
229 | return; | |
230 | } | |
231 | ||
1f50d9b1 | 232 | // If we are supposed to make tracks only but are in a ddlreco chain |
233 | // then we clearly can only generate the DDL reconstructed data, so do that. | |
234 | if (makeTracksOnly && ! buildTrackerComp) | |
235 | { | |
236 | makeTracksOnly = false; | |
237 | } | |
238 | ||
cc76079a | 239 | // Now we can initialise the AliHLTSystem... |
240 | AliHLTSystem sys; | |
cc76079a | 241 | |
242 | // Start by setting up the logging. | |
243 | if (maxLogging) | |
244 | { | |
245 | AliLog::SetGlobalLogLevel(AliLog::kMaxType); | |
246 | sys.SetGlobalLoggingLevel(kHLTLogAll); | |
247 | } | |
24f12607 | 248 | if (debugLogging) |
249 | { | |
250 | AliLog::SetModuleDebugLevel("HLT", AliLog::kMaxType); | |
251 | sys.SetGlobalLoggingLevel(kHLTLogAll); | |
252 | } | |
cc76079a | 253 | if (minLogging) |
254 | { | |
1b3806c8 | 255 | sys.SetGlobalLoggingLevel(AliHLTComponentLogSeverity( |
256 | kHLTLogFatal | kHLTLogError | |
257 | )); | |
cc76079a | 258 | } |
a563b588 | 259 | |
846e6f41 | 260 | if (gClassTable->GetID("AliHLTAgentUtil") < 0) |
261 | { | |
262 | sys.LoadComponentLibraries("libAliHLTUtil.so"); | |
263 | } | |
264 | if (gClassTable->GetID("AliHLTMUONAgent") < 0) | |
265 | { | |
266 | sys.LoadComponentLibraries("libAliHLTMUON.so"); | |
267 | } | |
cc76079a | 268 | |
269 | // The DDL file publishers are only needed if we create the ddlreco or | |
270 | // full chains. The filename lists are built assuming the aliroot rawXX/ | |
271 | // directory structure. | |
272 | if (buildDDLFilePubs) | |
273 | { | |
668eee9f | 274 | string cmd13 = "-datatype 'DDL_RAW ' 'MUON' -dataspec 0x001000"; |
275 | string cmd14 = "-datatype 'DDL_RAW ' 'MUON' -dataspec 0x002000"; | |
276 | string cmd15 = "-datatype 'DDL_RAW ' 'MUON' -dataspec 0x004000"; | |
277 | string cmd16 = "-datatype 'DDL_RAW ' 'MUON' -dataspec 0x008000"; | |
278 | string cmd17 = "-datatype 'DDL_RAW ' 'MUON' -dataspec 0x010000"; | |
279 | string cmd18 = "-datatype 'DDL_RAW ' 'MUON' -dataspec 0x020000"; | |
280 | string cmd19 = "-datatype 'DDL_RAW ' 'MUON' -dataspec 0x040000"; | |
281 | string cmd20 = "-datatype 'DDL_RAW ' 'MUON' -dataspec 0x080000"; | |
282 | string cmd21 = "-datatype 'DDL_RAW ' 'MUON' -dataspec 0x100000"; | |
283 | string cmd22 = "-datatype 'DDL_RAW ' 'MUON' -dataspec 0x200000"; | |
cc76079a | 284 | for (int i = firstEvent; i < lastEvent+1; i++) |
285 | { | |
286 | if (i != 0) | |
287 | { | |
288 | cmd13 += " -nextevent"; | |
289 | cmd14 += " -nextevent"; | |
290 | cmd15 += " -nextevent"; | |
291 | cmd16 += " -nextevent"; | |
292 | cmd17 += " -nextevent"; | |
293 | cmd18 += " -nextevent"; | |
294 | cmd19 += " -nextevent"; | |
295 | cmd20 += " -nextevent"; | |
296 | cmd21 += " -nextevent"; | |
297 | cmd22 += " -nextevent"; | |
298 | } | |
299 | char buf[16]; | |
300 | sprintf(buf, "%d", i); | |
301 | cmd13 += " -datafile raw"; cmd13 += buf; cmd13 += "/MUONTRK_2572.ddl"; | |
302 | cmd14 += " -datafile raw"; cmd14 += buf; cmd14 += "/MUONTRK_2573.ddl"; | |
303 | cmd15 += " -datafile raw"; cmd15 += buf; cmd15 += "/MUONTRK_2574.ddl"; | |
304 | cmd16 += " -datafile raw"; cmd16 += buf; cmd16 += "/MUONTRK_2575.ddl"; | |
305 | cmd17 += " -datafile raw"; cmd17 += buf; cmd17 += "/MUONTRK_2576.ddl"; | |
306 | cmd18 += " -datafile raw"; cmd18 += buf; cmd18 += "/MUONTRK_2577.ddl"; | |
307 | cmd19 += " -datafile raw"; cmd19 += buf; cmd19 += "/MUONTRK_2578.ddl"; | |
308 | cmd20 += " -datafile raw"; cmd20 += buf; cmd20 += "/MUONTRK_2579.ddl"; | |
309 | cmd21 += " -datafile raw"; cmd21 += buf; cmd21 += "/MUONTRG_2816.ddl"; | |
310 | cmd22 += " -datafile raw"; cmd22 += buf; cmd22 += "/MUONTRG_2817.ddl"; | |
311 | } | |
312 | ||
313 | AliHLTConfiguration pubDDL13("pubDDL13", "FilePublisher", NULL, cmd13.c_str()); | |
314 | AliHLTConfiguration pubDDL14("pubDDL14", "FilePublisher", NULL, cmd14.c_str()); | |
315 | AliHLTConfiguration pubDDL15("pubDDL15", "FilePublisher", NULL, cmd15.c_str()); | |
316 | AliHLTConfiguration pubDDL16("pubDDL16", "FilePublisher", NULL, cmd16.c_str()); | |
317 | AliHLTConfiguration pubDDL17("pubDDL17", "FilePublisher", NULL, cmd17.c_str()); | |
318 | AliHLTConfiguration pubDDL18("pubDDL18", "FilePublisher", NULL, cmd18.c_str()); | |
319 | AliHLTConfiguration pubDDL19("pubDDL19", "FilePublisher", NULL, cmd19.c_str()); | |
320 | AliHLTConfiguration pubDDL20("pubDDL20", "FilePublisher", NULL, cmd20.c_str()); | |
321 | AliHLTConfiguration pubDDL21("pubDDL21", "FilePublisher", NULL, cmd21.c_str()); | |
322 | AliHLTConfiguration pubDDL22("pubDDL22", "FilePublisher", NULL, cmd22.c_str()); | |
323 | } | |
324 | ||
325 | // Build the DDL reconstructor components for all the DDLs 13 to 22, that | |
326 | // is for chambers 7 to 10 and trigger stations. We only need to build | |
327 | // these components if we are are building the ddlreco or full chains. | |
328 | if (buildDDLRecoComps) | |
329 | { | |
1b3806c8 | 330 | if (TString(lutDir) == "CDB") |
331 | { | |
332 | AliHLTConfiguration recDDL13("recDDL13", "MUONHitReconstructor", "pubDDL13", TString("-ddl 13 -cdbpath local://$ALICE_ROOT -run 0")); | |
333 | AliHLTConfiguration recDDL14("recDDL14", "MUONHitReconstructor", "pubDDL14", TString("-ddl 14 -cdbpath local://$ALICE_ROOT -run 0")); | |
334 | AliHLTConfiguration recDDL15("recDDL15", "MUONHitReconstructor", "pubDDL15", TString("-ddl 15 -cdbpath local://$ALICE_ROOT -run 0")); | |
335 | AliHLTConfiguration recDDL16("recDDL16", "MUONHitReconstructor", "pubDDL16", TString("-ddl 16 -cdbpath local://$ALICE_ROOT -run 0")); | |
336 | AliHLTConfiguration recDDL17("recDDL17", "MUONHitReconstructor", "pubDDL17", TString("-ddl 17 -cdbpath local://$ALICE_ROOT -run 0")); | |
337 | AliHLTConfiguration recDDL18("recDDL18", "MUONHitReconstructor", "pubDDL18", TString("-ddl 18 -cdbpath local://$ALICE_ROOT -run 0")); | |
338 | AliHLTConfiguration recDDL19("recDDL19", "MUONHitReconstructor", "pubDDL19", TString("-ddl 19 -cdbpath local://$ALICE_ROOT -run 0")); | |
339 | AliHLTConfiguration recDDL20("recDDL20", "MUONHitReconstructor", "pubDDL20", TString("-ddl 20 -cdbpath local://$ALICE_ROOT -run 0")); | |
340 | AliHLTConfiguration recDDL21("recDDL21", "MUONTriggerReconstructor", "pubDDL21", TString("-ddl 21 -cdbpath local://$ALICE_ROOT -run 0 -suppress_partial_triggers")); | |
341 | AliHLTConfiguration recDDL22("recDDL22", "MUONTriggerReconstructor", "pubDDL22", TString("-ddl 22 -cdbpath local://$ALICE_ROOT -run 0 -suppress_partial_triggers")); | |
342 | } | |
343 | else | |
344 | { | |
345 | AliHLTConfiguration recDDL13("recDDL13", "MUONHitReconstructor", "pubDDL13", TString("-ddl 13 -lut ") + lutDir + TString("/Lut13.dat")); | |
346 | AliHLTConfiguration recDDL14("recDDL14", "MUONHitReconstructor", "pubDDL14", TString("-ddl 14 -lut ") + lutDir + TString("/Lut14.dat")); | |
347 | AliHLTConfiguration recDDL15("recDDL15", "MUONHitReconstructor", "pubDDL15", TString("-ddl 15 -lut ") + lutDir + TString("/Lut15.dat")); | |
348 | AliHLTConfiguration recDDL16("recDDL16", "MUONHitReconstructor", "pubDDL16", TString("-ddl 16 -lut ") + lutDir + TString("/Lut16.dat")); | |
349 | AliHLTConfiguration recDDL17("recDDL17", "MUONHitReconstructor", "pubDDL17", TString("-ddl 17 -lut ") + lutDir + TString("/Lut17.dat")); | |
350 | AliHLTConfiguration recDDL18("recDDL18", "MUONHitReconstructor", "pubDDL18", TString("-ddl 18 -lut ") + lutDir + TString("/Lut18.dat")); | |
351 | AliHLTConfiguration recDDL19("recDDL19", "MUONHitReconstructor", "pubDDL19", TString("-ddl 19 -lut ") + lutDir + TString("/Lut19.dat")); | |
352 | AliHLTConfiguration recDDL20("recDDL20", "MUONHitReconstructor", "pubDDL20", TString("-ddl 20 -lut ") + lutDir + TString("/Lut20.dat")); | |
353 | AliHLTConfiguration recDDL21("recDDL21", "MUONTriggerReconstructor", "pubDDL21", TString("-ddl 21 -lut ") + lutDir + TString("/Lut21.dat -suppress_partial_triggers")); | |
354 | AliHLTConfiguration recDDL22("recDDL22", "MUONTriggerReconstructor", "pubDDL22", TString("-ddl 22 -lut ") + lutDir + TString("/Lut22.dat -suppress_partial_triggers")); | |
355 | } | |
1f50d9b1 | 356 | } |
357 | ||
358 | TString startEventStr = "-firstevent "; | |
359 | startEventStr += firstEvent; | |
ee3678d3 | 360 | |
1f50d9b1 | 361 | // Build the data source components to take data from simulated hits if |
362 | // we are building the tracker only chain with the 'sim' data source. | |
cc76079a | 363 | if (buildSimDataPubs) |
364 | { | |
1f50d9b1 | 365 | AliHLTConfiguration recDDL13("recDDL13", "MUONRecHitsSource", NULL, startEventStr + " -simdata -plane left -chamber 7"); |
366 | AliHLTConfiguration recDDL14("recDDL14", "MUONRecHitsSource", NULL, startEventStr + " -simdata -plane right -chamber 7"); | |
367 | AliHLTConfiguration recDDL15("recDDL15", "MUONRecHitsSource", NULL, startEventStr + " -simdata -plane left -chamber 8"); | |
368 | AliHLTConfiguration recDDL16("recDDL16", "MUONRecHitsSource", NULL, startEventStr + " -simdata -plane right -chamber 8"); | |
369 | AliHLTConfiguration recDDL17("recDDL17", "MUONRecHitsSource", NULL, startEventStr + " -simdata -plane left -chamber 9"); | |
370 | AliHLTConfiguration recDDL18("recDDL18", "MUONRecHitsSource", NULL, startEventStr + " -simdata -plane right -chamber 9"); | |
371 | AliHLTConfiguration recDDL19("recDDL19", "MUONRecHitsSource", NULL, startEventStr + " -simdata -plane left -chamber 10"); | |
372 | AliHLTConfiguration recDDL20("recDDL20", "MUONRecHitsSource", NULL, startEventStr + " -simdata -plane right -chamber 10"); | |
373 | AliHLTConfiguration recDDL21("recDDL21", "MUONTriggerRecordsSource", NULL, startEventStr + " -hitdata -plane left"); | |
374 | AliHLTConfiguration recDDL22("recDDL22", "MUONTriggerRecordsSource", NULL, startEventStr + " -hitdata -plane right"); | |
cc76079a | 375 | } |
376 | ||
377 | // Build the data source components to take data from offline reconstructed | |
378 | // objects if we are building the tracker only chain with the 'rec' data source. | |
379 | if (buildRecDataPubs) | |
380 | { | |
1f50d9b1 | 381 | AliHLTConfiguration recDDL13("recDDL13", "MUONRecHitsSource", NULL, startEventStr + " -recdata -plane left -chamber 7"); |
382 | AliHLTConfiguration recDDL14("recDDL14", "MUONRecHitsSource", NULL, startEventStr + " -recdata -plane right -chamber 7"); | |
383 | AliHLTConfiguration recDDL15("recDDL15", "MUONRecHitsSource", NULL, startEventStr + " -recdata -plane left -chamber 8"); | |
384 | AliHLTConfiguration recDDL16("recDDL16", "MUONRecHitsSource", NULL, startEventStr + " -recdata -plane right -chamber 8"); | |
385 | AliHLTConfiguration recDDL17("recDDL17", "MUONRecHitsSource", NULL, startEventStr + " -recdata -plane left -chamber 9"); | |
386 | AliHLTConfiguration recDDL18("recDDL18", "MUONRecHitsSource", NULL, startEventStr + " -recdata -plane right -chamber 9"); | |
387 | AliHLTConfiguration recDDL19("recDDL19", "MUONRecHitsSource", NULL, startEventStr + " -recdata -plane left -chamber 10"); | |
388 | AliHLTConfiguration recDDL20("recDDL20", "MUONRecHitsSource", NULL, startEventStr + " -recdata -plane right -chamber 10"); | |
389 | AliHLTConfiguration recDDL21("recDDL21", "MUONTriggerRecordsSource", NULL, startEventStr + " -recdata -plane left"); | |
390 | AliHLTConfiguration recDDL22("recDDL22", "MUONTriggerRecordsSource", NULL, startEventStr + " -recdata -plane right"); | |
cc76079a | 391 | } |
392 | ||
393 | // Build the tracker component if we are building the tracker only or | |
394 | // full chains. | |
395 | if (buildTrackerComp) | |
396 | { | |
397 | AliHLTConfiguration tracker("tracker", "MUONMansoTrackerFSM", "recDDL13 recDDL14 recDDL15 recDDL16 recDDL17 recDDL18 recDDL19 recDDL20 recDDL21 recDDL22", ""); | |
398 | } | |
c9537879 | 399 | |
400 | // Build the dHLT trigger decision component if enabled. | |
401 | if (buildDecisionComp) | |
402 | { | |
403 | AliHLTConfiguration decision("decision", "MUONDecisionComponent", "tracker", ""); | |
404 | } | |
cc76079a | 405 | |
1f50d9b1 | 406 | // Build the data sink to subscribe only to what has been created and |
407 | // to the data source we actaully want. | |
408 | TString sources = ""; | |
409 | if (makeTracksOnly) | |
cc76079a | 410 | { |
1f50d9b1 | 411 | sources += "tracker "; |
cc76079a | 412 | } |
1f50d9b1 | 413 | else |
414 | { | |
415 | if (buildTrackerComp) | |
416 | sources += "tracker "; | |
417 | sources += "recDDL13 recDDL14 recDDL15 recDDL16 recDDL17 recDDL18 recDDL19 recDDL20 recDDL21 recDDL22"; | |
418 | } | |
c9537879 | 419 | if (buildDecisionComp) |
420 | { | |
421 | // Add the trigger decision component if it was enabled. | |
422 | sources += " decision"; | |
423 | } | |
dba14d7d | 424 | |
425 | // Build the data checker component if so requested. | |
426 | if (checkData) | |
427 | { | |
428 | AliHLTConfiguration checker("checker", "MUONDataChecker", sources, "-warn_on_unexpected_block"); | |
429 | sources = "checker"; | |
430 | } | |
431 | ||
1f50d9b1 | 432 | if (useRootWriter) |
433 | { | |
434 | AliHLTConfiguration convert("convert", "MUONRootifier", sources, ""); | |
d8cf7391 | 435 | AliHLTConfiguration sink("sink", "ROOTFileWriter", "convert", "-concatenate-events -datafile output.root -specfmt"); |
1f50d9b1 | 436 | } |
437 | else | |
cc76079a | 438 | { |
1f50d9b1 | 439 | AliHLTConfiguration sink("sink", "FileWriter", sources, "-datafile output.dat -specfmt"); |
cc76079a | 440 | } |
441 | ||
1f50d9b1 | 442 | // Build and run the chain's tasks. |
443 | sys.BuildTaskList("sink"); | |
cc76079a | 444 | sys.Run(eventCount); |
445 | } |