]>
Commit | Line | Data |
---|---|---|
5aebebf7 | 1 | // $Id$ |
2 | /** | |
3 | * @file publish-rawreader-data.C | |
4 | * @brief Publish data from the the RawReader provided by the AliReconstruction. | |
5 | * | |
6 | * Usage: | |
7 | * <pre> | |
8 | * aliroot -b -q 'publish-rawreader-data.C("raw.root", 768, 769)' | tee publish-rawreader-data.log | |
9 | * </pre> | |
10 | * | |
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. | |
16 | * | |
17 | * @author Matthias.Richter@ift.uib.no | |
18 | */ | |
19 | ||
20 | const char* defaultInput="./"; | |
21 | const int defaultMinId=768; | |
22 | const int defaultMaxId=769; | |
23 | ||
24 | void publish_rawreader_data(const char* input, int iMinDDLno, int iMaxDDLno) | |
25 | { | |
26 | ///////////////////////////////////////////////////////////////////////// | |
27 | ///////////////////////////////////////////////////////////////////////// | |
28 | // | |
29 | // some defaults | |
30 | const char* baseName="RAW.ddl"; | |
31 | ||
32 | ///////////////////////////////////////////////////////////////////////// | |
33 | ///////////////////////////////////////////////////////////////////////// | |
34 | // | |
35 | // setup of the reconstruction | |
36 | if (!input) { | |
37 | cerr << "invalid path" << endl; | |
38 | cerr << "usage: aliroot -b -q 'publish-rawreader-data.C(\"raw.root\", 768, 769)'" << endl; | |
39 | return; | |
40 | } | |
41 | ||
42 | AliReconstruction rec; | |
43 | rec.SetInput(input); | |
44 | rec.SetOption("HLT", "libAliHLTUtil.so loglevel=0x7c chains=sink1"); | |
45 | ||
46 | ///////////////////////////////////////////////////////////////////////// | |
47 | ///////////////////////////////////////////////////////////////////////// | |
48 | // | |
49 | // setup of the HLT system | |
7bf6c76d | 50 | AliHLTSystem* pHLT=AliHLTPluginBase::GetInstance(); |
5aebebf7 | 51 | if (!pHLT) { |
52 | cerr << "fatal error: can not get HLT instance" << endl; | |
53 | } | |
54 | ||
55 | ///////////////////////////////////////////////////////////////////////// | |
56 | ///////////////////////////////////////////////////////////////////////// | |
57 | // | |
58 | // the configuration chain | |
59 | TString writerInput; | |
60 | TString arg; | |
61 | ||
03df9065 | 62 | arg.Form("-minid %d -maxid %d -skipempty -verbose", iMinDDLno, iMaxDDLno); |
5aebebf7 | 63 | AliHLTConfiguration pubconf("publisher", "AliRawReaderPublisher", NULL , arg.Data()); |
64 | if (!writerInput.IsNull()) writerInput+=" "; | |
65 | writerInput+="publisher"; | |
66 | ||
67 | // the writer configuration | |
833b3167 | 68 | arg.Form("-specfmt=_%%d -subdir=out%%d -blocknofmt= -idfmt= -datafile %s", baseName); |
5aebebf7 | 69 | AliHLTConfiguration fwconf("sink1", "FileWriter" , writerInput.Data(), arg.Data()); |
70 | ||
71 | ||
72 | ///////////////////////////////////////////////////////////////////////// | |
73 | ///////////////////////////////////////////////////////////////////////// | |
74 | // | |
75 | // the reconstruction loop | |
76 | rec.SetRunLocalReconstruction("HLT"); | |
77 | rec.SetRunReconstruction("HLT"); | |
78 | rec.SetRunTracking(""); | |
79 | rec.SetFillESD("HLT"); | |
5c3525c1 | 80 | rec.SetFillTriggerESD(kFALSE); |
5a78a6e3 | 81 | rec.SetRunQA(":"); |
5aebebf7 | 82 | rec.SetRunVertexFinder(kFALSE); |
83 | rec.SetLoadAlignFromCDB(0); | |
833b3167 | 84 | rec.SetFillTriggerESD(kFALSE); |
5aebebf7 | 85 | rec.Run(); |
86 | } | |
87 | ||
88 | void publish_rawreader_data() | |
89 | { | |
90 | cout << "runnig from defaults: input " << defaultInput << " " << defaultMinId << "-" << defaultMaxId << endl; | |
91 | publish_rawreader_data(defaultInput, defaultMinId, defaultMaxId); | |
92 | } |