]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/benchmark/macros/bench-externaltrackparam-sequence.C
cleaned indents
[u/mrichter/AliRoot.git] / HLT / benchmark / macros / bench-externaltrackparam-sequence.C
1 // $Id$
2 /*
3  * Benchmark macro for transportation of AliExternalTrackParam arrays.
4  *
5  * Usage:
6  * <pre>
7  *   aliroot -b -q bench-externaltrackparam.C | tee bench-externaltrackparam.log
8  * </pre>
9  *
10  *
11  * @ingroup alihlt_benchmark
12  * @author Matthias.Richter@ift.uib.no
13  */
14 void bench_externaltrackparam_sequence(int events=100)
15 {
16   ///////////////////////////////////////////////////////////////////////////////////////////////////
17   //
18   // init the HLT system in order to define the analysis chain below
19   //
20   AliHLTSystem* gHLT=AliHLTPluginBase::GetInstance();
21   gHLT->SetGlobalLoggingLevel(0x7c);
22
23   ///////////////////////////////////////////////////////////////////////////////////////////////////
24   //
25   // define the analysis chain to be run
26   //
27   int verbosity=0;
28   int levels=11;
29   TString lastPublisher;
30   TString arg;
31   for (int pub=0; pub<levels; pub++) {
32     TString publisher;
33     // publishers of AliExternalTrackParam arrays
34     publisher.Form("PUB_%02d", pub);
35     arg="-minsize 9000 -maxsize 10000";
36     //arg="-minsize 1 -maxsize 2";
37     if (pub<10) {
38       // first 10 ones are TClonesArrays with the corresponding compression
39       arg+=" -tclonesarray";
40       //arg+=" -tobjarray";
41       arg+=" -object-compression="; arg+=pub;
42     } else {
43       // last one is a c-array without compression
44       arg+=" -carray";
45     }
46
47     arg+=" -rangeoffset -1000 -rangemodulo "; arg+=events/10;
48     arg+=" -verbosity "; arg+=verbosity;
49     AliHLTConfiguration publisherconf(publisher.Data(), "BenchmarkAliExternalTrackParam", lastPublisher.Data(), arg.Data());
50     lastPublisher=publisher;
51   }
52
53   arg=" -verbosity "; arg+=verbosity;
54   AliHLTConfiguration dumpconf("sink1", "BenchmarkAliExternalTrackParam"   , lastPublisher.Data(), "-verbosity 1");
55
56   AliHLTConfiguration statconf("stat", "StatisticsCollector", /*dumpInput.Data()*/"sink1", "");
57
58   AliHLTConfiguration writer("statwriter", "ROOTFileWriter"   , "stat", "-datafile HLT.statistics.root -concatenate-events -overwrite");
59
60   ///////////////////////////////////////////////////////////////////////////////////////////////////
61   //
62   // Init and run the chain
63   //
64   gHLT->LoadComponentLibraries("libAliHLTBenchmark.so libAliHLTUtil.so");
65   gHLT->BuildTaskList("statwriter");
66   gHLT->Run(events);
67 }