]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/TRD/macros/rec-hlt-trd-digits.cxx
update HLT of TRD macros (Ttheo)
[u/mrichter/AliRoot.git] / HLT / TRD / macros / rec-hlt-trd-digits.cxx
CommitLineData
9d0c6289 1// This macro is used to make performace studies with MC info
c93b2136 2// usage: aliroot rec-hlt-trd-digits.cxx("/data/run/") reconstruct local digits file
b04a8120 3// or copy into folder and aliroot rec-hlt-trd.cxx reconstruct local digits file in pwd
9d0c6289 4
5#if !defined (__CINT__) || defined (__MAKECINT__)
6
7#include <iostream>
8#include <stdlib.h>
9#include <fstream>
10
11#include "TString.h"
12#include "TMath.h"
13
14#include "AliHLTSystem.h"
15#include "AliLog.h"
16#include "AliHLTDataTypes.h"
17#include "AliHLTConfiguration.h"
18
19#include <valgrind/callgrind.h>
20#include <sys/time.h>
21#include "TSystem.h"
22#include "AliHLTOfflineInterface.h"
23#include "AliRunLoader.h"
24#include "AliReconstructor.h"
25#endif
26
27#include "initGRP.h"
b04a8120 28#include "readCDBentry.h"
9d0c6289 29
30int rec_hlt_trd_digits(const TString input = gSystem->pwd());
31int main(int argc, char** argv)
32{
33 if(argc==2) return rec_hlt_trd_digits(argv[1]);
34 else return rec_hlt_trd_digits();
35}
36
37int rec_hlt_trd_digits(const TString input){
38
39 // Use custom arguments for components? i.e.: not reading OCDB arguments
b04a8120 40 Bool_t customArgs=kFALSE;
9d0c6289 41
42 // Disable HLT flag?
c93b2136 43 Bool_t disableHLTflag=kFALSE;
9d0c6289 44
45
46
47 ////////////////////////////////
48
49 gSystem->ChangeDirectory(input.Data());
50
b04a8120 51 InitGRP("local://$ALICE_ROOT/OCDB",Form("local://",gSystem->pwd()));
9d0c6289 52
53 AliRunLoader* runLoader = AliRunLoader::Open("galice.root");
54 AliHLTOfflineInterface::SetParamsToComponents(runLoader, NULL);
55
56 AliHLTSystem gHLT;
57 AliLog::SetGlobalDebugLevel(1);
58 //AliLog::SetClassDebugLevel("AliTRDrawStream", 11);
59 /* enum ETpye {kFatal=0, kError, kWarning, kInfo, kDebug, kMaxType}; */
60 gHLT.SetGlobalLoggingLevel((AliHLTComponentLogSeverity)0x7f);
61 /* enum AliHLTComponentLogSeverity {
62 kHLTLogNone = 0,
63 kHLTLogBenchmark = 0x1,
64 kHLTLogDebug = 0x2,
65 kHLTLogInfo = 0x4,
66 kHLTLogWarning = 0x8,
67 kHLTLogError = 0x10,
68 kHLTLogFatal = 0x20,
69 few important messages not to be filtered out.
70 redirected to kHLTLogInfo in AliRoot
71 kHLTLogImportant = 0x40,
72 special value to enable all messages
73 kHLTLogAll = 0x7f,
74 the default logging filter
75 kHLTLogDefault = 0x79
76 useful = 0x45
77 */
78
79 gHLT.LoadComponentLibraries("libAliHLTUtil.so libAliHLTTRD.so libAliHLTMUON.so libAliHLTGlobal.so libAliHLTTrigger.so");
80
81 // digits publisher
82 AliHLTConfiguration pubDigiConf("TRD-DigiP", "AliLoaderPublisher", NULL , "-loader TRDLoader -tree digits -datatype 'ALITREED' 'TRD '");
83
84 TString arg="";
85 if(customArgs || disableHLTflag){
b04a8120 86 arg = readCDBentry("HLT/ConfigTRD/ClusterizerComponent"); //output_percentage 100 -lowflux -experiment -tailcancellation -faststreamer -yPosMethod LUT
87 arg += " -highLevelOutput yes -emulateHLToutput no";
9d0c6289 88 if(disableHLTflag)
b04a8120 89 arg += " -HLTflag no";
9d0c6289 90 }
91 // clusterizer which processes digits
92 AliHLTConfiguration cfDigiConf("TRD-DigiCF", "TRDOfflineClusterizer", "TRD-DigiP", arg.Data());
93
94 arg="";
95 if(customArgs || disableHLTflag){
b04a8120 96 arg = readCDBentry("HLT/ConfigTRD/TrackerV1Component"); //"output_percentage 100 -lowflux -NTimeBins 24";
97 arg += " -highLevelOutput yes -emulateHLToutput no";
9d0c6289 98 if(disableHLTflag)
99 arg+=" -HLTflag no";
100 }
101 // tracker reading the output from the clusterizer which processes the digits
102 AliHLTConfiguration trDigiConf("TRD-DigiTR", "TRDOfflineTrackerV1", "TRD-DigiCF", arg.Data());
103
104 // root file writer (with esd friends and MC)
105 AliHLTConfiguration writerDigiConf("TRD-DigiEsdFile", "TRDEsdWriter", "TRD-DigiTR", "-concatenate-events -concatenate-blocks");
106
107 gHLT.BuildTaskList(&writerDigiConf);
108 gHLT.Run(runLoader->GetNumberOfEvents());
109}
110