2 * @file ESDMCEventPublisher.C
3 * @brief Macro for testing AliESDEvent and AliMCEvent publishing and writing
5 * This macro is a testing/example macro of how to use the ESDMCEventPublisher
6 * (AliHLTESDMCEventPublisherComponent) and RootFileWriter (AliHLTRootFileWriter).
7 * It defines only two component in the chain, the publisher, which
8 * publishes the content of the root files according to the selection.
9 * Be aware there can be several root objects in one root file.
11 * The file datapath has to be changed with an actual one. It must contain
14 * - Kinematics.root<br>
16 * - TrackRefs.root<br>
18 * Entry type can be one, all or some of :<br>
23 * For more descriptions, especially the used datatypes and specification:
24 * @see AliHLTESDMCEventPublisherComponent
26 * @author thaeder@kip.uni-heidelberg.de
27 * @ingroup alihlt_tutorial
30 /** ESDMCEventPublisher test macro
31 * @param nEvents Number of events which should be processed
33 void ESDMCEventPublisher(Int_t nEvents=1) {
39 gHLT.LoadComponentLibraries("libAliHLTUtil.so");
41 // -- Root publisher configuration
42 // !!! myDataPath has to be exchanged with an existing one.
43 arg.Form("-entrytype ESD -entrytype HLTESD -entrytype MC -dataspec 0x0000001F -datapath /opt/HLT/analysis/HLT-HEAD_2008-09-24/exa -datapath /home/jthaeder/jet/data/test");
44 // arg.Form("-entrytype ESD -entrytype HLTESD -entrytype MC -dataspec 0x0000001F -datapath mydatapath0 -datapath mydatapath1");
46 // -- The AliHLTESDMCEventPublisher (Id 'ESDMCEventPublisher') is a data source.
47 // It provides AliESDEvents and AliMCEvents out of the given datapaths to
48 // the subsequent components in the chain.
49 // see AliHLTESDMCEventPublisherComponent for more options
50 AliHLTConfiguration ESDMCEventPublisher("ESDMCEventPublisher", "ESDMCEventPublisher", NULL, arg.Data() );
51 if (!writerInput.IsNull()) writerInput+=" ";
52 writerInput+="ESDMCEventPublisher";
55 // -- Processing Components can be put in here
58 // -- The AliHLTRootFileWriter (Id 'ROOTFileWriter') is a data sink. It writes
59 // all incoming data blocks to files. Several options available.
60 AliHLTConfiguration rootWriter("RootWriter", "ROOTFileWriter", writerInput.Data(),"-datafile event");
62 // -- Here you specify the top most configuration of the chain. The
63 // configuration depends on all the parents. The task lisy is build
65 gHLT.BuildTaskList("RootWriter");