]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/exa/hltout-collect-esd.C
bugfix: taking into account commit 26599 in AliHLTReconstructor
[u/mrichter/AliRoot.git] / HLT / exa / hltout-collect-esd.C
1 // $Id$
2 /**
3  * @file hltout-collect-esd.C
4  * @brief Example for the AliHLTEsdCollectorComponent
5  *
6  * Example macro to run a small chain with the AliHLTOUTPublisherComponent
7  * and the AliHLTEsdCollectorComponent. The AliHLTOUTPublisherComponent
8  * is configured to publish all ESD objects from the HLTOUT data, the
9  * AliHLTEsdCollectorComponent writes the files using the AliHLTEsdManager.
10  *
11  * Usage: aliroot -b -q hltout-collect-esd.C | tee hltout-collect-esd.log
12  *
13  * The macro asumes HLTOUT raw data ddl files in order to open an
14  * AliRawReaderFile, e.g. simulated using the default AliSimulation with
15  * at least SetWriteRawData("HLT") enabled.
16  *
17  * \b Note: The example disables a few steps in the AliReconstruction,
18  * mainly because of crashes in various parts of AliRoot. This does not
19  * have any impact to the HLT features to be presented.
20  *
21  * @author Matthias.Richter@ift.uib.no
22  * @ingroup alihlt_tutorial
23  */
24 void hltout_collect_esd()
25 {
26   /////////////////////////////////////////////////////////////////////////
27   /////////////////////////////////////////////////////////////////////////
28   //
29   // setup of the HLT system
30   gSystem->Load("libHLTrec");
31   AliHLTSystem* pHLT=AliHLTReconstructorBase::GetInstance();
32   if (!pHLT) {
33     cerr << "fatal error: can not get HLT instance" << endl;
34   }
35
36   /////////////////////////////////////////////////////////////////////////
37   /////////////////////////////////////////////////////////////////////////
38   //
39   // the configuration chain
40   TString arg;
41
42   // the publisher configuration
43   arg.Form("-typeid ESD_TREE -typeid ALIESDV0");
44   AliHLTConfiguration publisher("hltout-publisher", "AliHLTOUTPublisher" , NULL, arg.Data());
45
46   // the writer configuration
47   arg.Form("");
48   AliHLTConfiguration collector("sink1", "EsdCollector"   , "hltout-publisher", arg.Data());
49
50   /////////////////////////////////////////////////////////////////////////
51   /////////////////////////////////////////////////////////////////////////
52   //
53   // setup of the reconstruction
54   AliReconstruction rec;
55   rec.SetInput("./");
56   rec.SetRunLocalReconstruction("HLT");
57   rec.SetRunTracking("");
58   rec.SetFillESD("");
59   rec.SetRunQA(kFALSE);
60   rec.SetFillTriggerESD(kFALSE);
61   rec.SetRunVertexFinder(kFALSE);
62   rec.SetOption("HLT", "libAliHLTUtil.so loglevel=0x7c chains=sink1");
63   rec.Run();
64 }