]>
Commit | Line | Data |
---|---|---|
b69ccd54 | 1 | |
2 | //************************************************************************** | |
3 | //* This file is property of and copyright by the ALICE HLT Project * | |
4 | //* ALICE Experiment at CERN, All rights reserved. * | |
5 | //* * | |
6 | //* Primary Authors Kalliopi Kanaki <Kalliopi.Kanaki@ift.uib.no> * | |
7 | //* for The ALICE HLT Project. * | |
8 | //* * | |
9 | //* Permission to use, copy, modify and distribute this software and its * | |
10 | //* documentation strictly for non-commercial purposes is hereby granted * | |
11 | //* without fee, provided that the above copyright notice appears in all * | |
12 | //* copies and that both the copyright notice and this permission notice * | |
13 | //* appear in the supporting documentation. The authors make no claims * | |
14 | //* about the suitability of this software for any purpose. It is * | |
15 | //* provided "as is" without express or implied warranty. * | |
16 | //************************************************************************** | |
17 | ||
18 | /** | |
19 | * @file noiseMapTest.C | |
20 | * @author Kalliopi.Kanaki@ift.uib.no | |
21 | * @date | |
22 | * @brief Test macro for noise map component in combination with histogram handler | |
23 | ||
24 | * Usage: | |
25 | * <pre> | |
26 | * aliroot -b -q noiseMapTest.C | tee noiseMapTest.log | |
27 | * aliroot -b -q noiseMapTest.C'("./")' | tee noiseMapTest.log | |
28 | * </pre> | |
29 | * | |
30 | * The macro assumes raw data to be available in the rawx folders, either | |
31 | * simulated or real data. A different input can be specified as parameter | |
32 | * <pre> | |
33 | * aliroot -b -q noiseMapTest.C'("input.root")' | |
34 | * </pre> | |
35 | * | |
36 | * In the first section an analysis chain is defined. The scale of the | |
37 | * chain can be defined by choosing the range of sectors and partitions. | |
38 | * | |
39 | * The reconstruction is steered by the AliReconstruction object in the | |
40 | * usual way. | |
41 | * | |
42 | * @ingroup alihlt_tpc | |
43 | */ | |
44 | ||
45 | void noiseMapHistoHandler(const char* input="./"){ | |
46 | ||
47 | if (!input) { | |
48 | cerr << "please specify input or run without arguments" << endl; | |
49 | return; | |
50 | } | |
51 | ||
52 | ||
53 | ///////////////////////////////////////////////////////////////////////////////////////////////// | |
54 | // | |
55 | // init the HLT system in order to define the analysis chain below | |
56 | // | |
7bf6c76d | 57 | AliHLTSystem* gHLT=AliHLTPluginBase::GetInstance(); |
b69ccd54 | 58 | |
59 | /////////////////////////////////////////////////////////////////////////////////////////////////// | |
60 | // | |
61 | // define the analysis chain to be run | |
62 | // | |
63 | ||
64 | int iMinSlice = 35; | |
65 | int iMaxSlice = 35; | |
66 | int iMinPart = 0; | |
67 | int iMaxPart = 5; | |
68 | ||
69 | TString rootFileWriter, histoInput; | |
70 | ||
71 | for (int slice=iMinSlice; slice<=iMaxSlice; slice++) { | |
72 | for (int part=iMinPart; part<=iMaxPart; part++) { | |
73 | ||
74 | TString argument, publisher, noise; | |
75 | ||
76 | // raw data publisher components | |
77 | int ddlno=768; | |
78 | if (part>1) ddlno+=72+4*slice+(part-2); | |
79 | else ddlno+=2*slice+part; | |
80 | argument.Form("-minid %d -datatype 'DDL_RAW ' 'TPC ' -dataspec 0x%02x%02x%02x%02x", ddlno, slice, slice, part, part); | |
81 | publisher.Form("DP_%02d_%d", slice, part); | |
82 | AliHLTConfiguration pubconf(publisher.Data(), "AliRawReaderPublisher", NULL, argument.Data()); | |
83 | ||
84 | // noise filling | |
85 | noise.Form("NM_%02d_%d", slice, part); | |
86 | AliHLTConfiguration noiseconf(noise.Data(), "TPCNoiseMap", publisher.Data(), ""); | |
87 | ||
88 | ||
89 | if (histoInput.Length()>0) histoInput+=" "; | |
90 | histoInput+=noise; | |
91 | ||
92 | } | |
93 | } | |
94 | ||
95 | //cout << "histogram handler input: " << histoInput.Data() << endl; | |
96 | ||
97 | AliHLTConfiguration histconf("hist", "TPCHistogramHandler", histoInput.Data(),"-use-general -ignore-specification"); | |
98 | //AliHLTConfiguration histconf("hist", "TPCHistogramHandler", histoInput.Data(),"-sum-noise-histograms"); | |
99 | ||
100 | //root file writer component | |
101 | ||
102 | //AliHLTConfiguration rootFileconf("sink1", "ROOTFileWriter", noise.Data(), "-datafile partition"); | |
103 | AliHLTConfiguration rootFileconf("sink1", "ROOTFileWriter", "hist", "-datafile TPC -concatenate-events -concatenate-blocks"); | |
104 | ||
105 | ||
106 | /////////////////////////////////////////////////////////////////////////////////////////////////// | |
107 | // | |
108 | // Init and run the reconstruction | |
109 | // All but HLT reconstruction is switched off | |
110 | // | |
111 | AliReconstruction rec; | |
112 | rec.SetInput(input); | |
113 | rec.SetRunVertexFinder(kFALSE); | |
114 | rec.SetRunLocalReconstruction("HLT"); | |
115 | rec.SetRunTracking(""); | |
116 | rec.SetLoadAlignFromCDB(0); | |
117 | rec.SetRunQA(":"); | |
118 | //rec.SetFillESD("HLT"); | |
119 | rec.SetFillESD(""); | |
120 | rec.SetFillTriggerESD(false); | |
121 | rec.SetOption("HLT", "libAliHLTTPC.so loglevel=0x7c chains=sink1"); | |
122 | rec.Run(); | |
123 | } |