]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/exa/split-hltout.C
Roll back
[u/mrichter/AliRoot.git] / HLT / exa / split-hltout.C
1 // $Id$
2 /**
3  * @file split-hltout.C
4  * @brief Example for the AliHLTOUTPublisherComponent
5  *
6  * Example macro to run a small chain with the AliHLTOUTPublisherComponent.
7  * The AliHLTOUTPublisherComponent is a tool to publish data blocks from
8  * the HLTOUT data stream into an AliHLT reconstruction chain.
9  *
10  * Usage: aliroot -b -q split-hltout.C | tee split-hltout.log
11  *
12  * The macro asumes HLTOUT raw data ddl files in order to open an
13  * AliRawReaderFile, e.g. simulated by sim-hlt-rawddl.C. A small chain with
14  * just a FileWriter connected is run embedded into AliReconstruction.
15  *
16  * \b Note: The example disables a few steps in the AliReconstruction,
17  * mainly because of crashes in various parts of AliRoot. This does not
18  * have any impact to the HLT features to be presented.
19  *
20  * @author Matthias.Richter@ift.uib.no
21  * @ingroup alihlt_tutorial
22  */
23 void split_hltout()
24 {
25   /////////////////////////////////////////////////////////////////////////
26   /////////////////////////////////////////////////////////////////////////
27   //
28   // setup of the HLT system
29   AliHLTSystem* pHLT=AliHLTPluginBase::GetInstance();
30   if (!pHLT) {
31     cerr << "fatal error: can not get HLT instance" << endl;
32   }
33
34   /////////////////////////////////////////////////////////////////////////
35   /////////////////////////////////////////////////////////////////////////
36   //
37   // the configuration chain
38   TString arg;
39
40   // the publisher configuration
41   arg.Form("");
42   AliHLTConfiguration publisher("hltout-publisher", "AliHLTOUTPublisher" , NULL, arg.Data());
43
44   // the writer configuration
45   arg.Form("-subdir=out%%d -datafile hltout.dat -specfmt=_0x%%x");
46   // see AliHLTFileWriter
47   AliHLTConfiguration fwconf("sink1", "FileWriter"   , "hltout-publisher", arg.Data());
48
49   /////////////////////////////////////////////////////////////////////////
50   /////////////////////////////////////////////////////////////////////////
51   //
52   // setup of the reconstruction
53   AliReconstruction rec;
54   rec.SetInput("./");
55   rec.SetRunLocalReconstruction("HLT");
56   rec.SetRunTracking("");
57   rec.SetFillESD("");
58   rec.SetRunQA(":");
59   rec.SetFillTriggerESD(kFALSE);
60   rec.SetRunVertexFinder(kFALSE);
61   rec.SetOption("HLT", "libAliHLTUtil.so loglevel=0x7c chains=sink1");
62   rec.Run();
63 }