3 * @file publish-rawreader-data.C
4 * @brief Publish data from the the RawReader provided by the AliReconstruction.
8 * aliroot -b -q 'publish-rawreader-data.C("raw.root", 768, 769)' | tee publish-rawreader-data.log
11 * This macro runs shows a use case of the AliHLTRawReaderPublisherComponent
12 * An HLT chain is run inside the AliReconstruction and the DDL payload is
13 * extracted from the AliRawReader in a given equipment range.
14 * Input can be either a root file or the path to the directory containing
15 * the 'rawx' sub folders.
17 * @author Matthias.Richter@ift.uib.no
20 const char* defaultInput="./";
21 const int defaultMinId=768;
22 const int defaultMaxId=769;
24 void publish_rawreader_data(const char* input, int iMinDDLno, int iMaxDDLno)
26 /////////////////////////////////////////////////////////////////////////
27 /////////////////////////////////////////////////////////////////////////
30 const char* baseName="RAW.ddl";
32 /////////////////////////////////////////////////////////////////////////
33 /////////////////////////////////////////////////////////////////////////
35 // setup of the reconstruction
37 cerr << "invalid path" << endl;
38 cerr << "usage: aliroot -b -q 'publish-rawreader-data.C(\"raw.root\", 768, 769)'" << endl;
42 AliReconstruction rec;
44 rec.SetOption("HLT", "libAliHLTUtil.so loglevel=0x7c chains=sink1");
46 /////////////////////////////////////////////////////////////////////////
47 /////////////////////////////////////////////////////////////////////////
49 // setup of the HLT system
50 AliHLTSystem* pHLT=AliHLTPluginBase::GetInstance();
52 cerr << "fatal error: can not get HLT instance" << endl;
55 /////////////////////////////////////////////////////////////////////////
56 /////////////////////////////////////////////////////////////////////////
58 // the configuration chain
62 arg.Form("-minid %d -maxid %d -skipempty -verbose", iMinDDLno, iMaxDDLno);
63 AliHLTConfiguration pubconf("publisher", "AliRawReaderPublisher", NULL , arg.Data());
64 if (!writerInput.IsNull()) writerInput+=" ";
65 writerInput+="publisher";
67 // the writer configuration
68 arg.Form("-specfmt=_%%d -subdir=out%%d -blocknofmt= -idfmt= -datafile %s", baseName);
69 AliHLTConfiguration fwconf("sink1", "FileWriter" , writerInput.Data(), arg.Data());
72 /////////////////////////////////////////////////////////////////////////
73 /////////////////////////////////////////////////////////////////////////
75 // the reconstruction loop
76 rec.SetRunLocalReconstruction("HLT");
77 rec.SetRunReconstruction("HLT");
78 rec.SetRunTracking("");
79 rec.SetFillESD("HLT");
80 rec.SetFillTriggerESD(kFALSE);
82 rec.SetRunVertexFinder(kFALSE);
83 rec.SetLoadAlignFromCDB(0);
84 rec.SetFillTriggerESD(kFALSE);
88 void publish_rawreader_data()
90 cout << "runnig from defaults: input " << defaultInput << " " << defaultMinId << "-" << defaultMaxId << endl;
91 publish_rawreader_data(defaultInput, defaultMinId, defaultMaxId);