]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/benchmark/macros/format-statistics.C
Forgotten commit
[u/mrichter/AliRoot.git] / HLT / benchmark / macros / format-statistics.C
CommitLineData
fce51f62 1// $Id$
2/**
3 * Helper macro to format a block of AliHLTComponentStatistics entries.
4 * The block is usually created by attaching a file writer to a chain,
5 * writing only COMPSTAT:PRIV data blocks.
6 *
7 * The macro translates the block into HLTruns a stand-alone chain
8 * Usage:
9 * <pre>
10 * aliroot -b -q format-statistics.C | tee format-statistics.log
11 * </pre>
12 *
13 *
14 * @ingroup alihlt_benchmark
15 * @author Matthias.Richter@ift.uib.no
16 */
17void format_statistics(const char* infile, const char* outfile="HLT.statistics.root")
18{
19 AliHLTSystem gHLT;
20 gHLT.LoadComponentLibraries("libAliHLTUtil.so");
21 AliHLTConfiguration publisher("publisher", "FilePublisher", NULL, "-datatype 'COMPSTAT' 'PRIV' -datafile HLT.statistics.raw");
22
23 AliHLTConfiguration sink1("sink1", "StatisticsCollector", "publisher", "-file out.root -publish 0 -arraysize 200000");
24
25 gHLT.BuildTaskList("sink1");
26 gHLT.Run();
27}
28
29void format_statistics()
30{
31 cerr << "===============================================================" << endl;
32 cerr << "usage:" << endl;
33 cerr << " aliroot -b -q -l format-statistics.C'(\"infile\", \"outfile\")'" << endl << endl;
34 cerr << "please provide input, e.g. \"HLT.statistics.raw\"" << endl;
35 cerr << "default output file is \"HLT.statistics.root\"" << endl;
36 cerr << "===============================================================" << endl;
37}