FindFASTJET
[u/mrichter/AliRoot.git] / HLT / exa / sim-hlt-rawddl.C
CommitLineData
833b3167 1// $Id$
2/**
3 * @file sim-hlt-rawddl.C
4 * @brief Publishing of RAW DDL data into the HLTOUT.
5 *
6 * Example macro to produce ddl raw data blocks in the HLTOUT. The HLT
7 * chain is run embedded into AliRoot simulation.
8 *
9 * The example publishes the ITSSDD data into the HLTOUT according to
10 * the configuration in the conf-hlt-rawddl.C macro. The normal digit
11 * to raw conversion is used to have the raw data available.
12 * \b Note: if you want to change this example for another detector,
13 * you need to change the detector in both this macro and the
14 * configuration.
15 *
16 * Usage: aliroot -b -q sim-hlt-rawddl.C | tee sim-hlt-rawddl.log
17 *
18 * The chain to be run is defined by the macro given to the parameter
19 * 'config='
20 *
b9a2add6 21 * The macro assumes the data to be already simulated. If it should run
833b3167 22 * within the initial simulation, comment the corresponding functions
23 * below (SetRunGeneration etc.)
24 *
25 * @author Matthias.Richter@ift.uib.no
26 * @ingroup alihlt_tutorial
27 */
b9a2add6 28void sim_hlt_rawddl() {
29
833b3167 30 AliSimulation sim;
31
32 // switch of simulation and data generation
33 // comment all that stuff to also simulate the events and data
34 sim.SetRunGeneration(kFALSE);
35 sim.SetMakeDigits("");
36 sim.SetMakeSDigits("");
37 sim.SetMakeDigitsFromHits("");
38 sim.SetMakeTrigger("");
39
40 // write the raw data for the ITS since we want to publish those
b9a2add6 41 // write HLT raw data since we want to replace the original
833b3167 42 // detector data from the HLTOUT
43 sim.SetWriteRawData("HLT");
b9a2add6 44
45 // the normal simulation sets the specific storage for the GRP entry
46 if (gSystem->AccessPathName("GRP/GRP/Data")) {
47 cerr << "*********************************************************" << endl;
48 cerr << "error: no GRP entry found in the currect directory, simulation might be incomplete. Skip setting specific storage for GRP entry" << endl;
49 cerr << "*********************************************************" << endl << endl;
50 } else {
51 sim.SetSpecificStorage("GRP/GRP/Data", Form("local://%s",gSystem->pwd()));
52 }
53
833b3167 54 // set the options for the HLT simulation:
55 // libAliHLTUtil.so libAliHLTSample.so
56 // loads the specified libraries since the HLT chain will use components
57 // from those two
58 // loglevel=
59 // the internal logging level in the HLT, use 0x7c for higher verbosity
60 // config=<file>
61 // the configuration to be run
62 // chains=<chain>
63 // run the specified chains, defined in the configuration macro
64 // rawfile=<path>
65 // in this case we want to just forward the DDL data blocks
66 // to the HLTOUT. We need to set the location of the formerly generated
67 // rawfiles with the rawfile
b9a2add6 68
69 sim.SetRunHLT("libAliHLTUtil.so libAliHLTSample.so loglevel=0x7c rawfile=./ config=$ALICE_ROOT/HLT/exa/conf-hlt-rawddl.C chains=publisher");
833b3167 70 sim.Run();
71}