1 // This macro is used to make performace studies with MC info
2 // usage: aliroot rec-hlt-trd-digits.cxx("/data/run/raw.root") reconstruct local digits file
3 // or copy into folder and aliroot rec-hlt-trd.cxx reconstruct local digits file in pwd
5 #if !defined (__CINT__) || defined (__MAKECINT__)
14 #include "AliHLTSystem.h"
16 #include "AliHLTDataTypes.h"
17 #include "AliHLTConfiguration.h"
19 #include <valgrind/callgrind.h>
22 #include "AliHLTOfflineInterface.h"
23 #include "AliRunLoader.h"
24 #include "AliReconstructor.h"
29 int rec_hlt_trd_digits(const TString input = gSystem->pwd());
30 int main(int argc, char** argv)
32 if(argc==2) return rec_hlt_trd_digits(argv[1]);
33 else return rec_hlt_trd_digits();
36 int rec_hlt_trd_digits(const TString input){
38 // Use custom arguments for components? i.e.: not reading OCDB arguments
39 Bool_t customArgs=kTRUE;
42 Bool_t disableHLTflag=kTRUE;
46 ////////////////////////////////
48 gSystem->ChangeDirectory(input.Data());
50 InitGRP("local://$ALICE_ROOT/OCDB",gSystem->pwd());
52 AliRunLoader* runLoader = AliRunLoader::Open("galice.root");
53 AliHLTOfflineInterface::SetParamsToComponents(runLoader, NULL);
56 AliLog::SetGlobalDebugLevel(1);
57 //AliLog::SetClassDebugLevel("AliTRDrawStream", 11);
58 /* enum ETpye {kFatal=0, kError, kWarning, kInfo, kDebug, kMaxType}; */
59 gHLT.SetGlobalLoggingLevel((AliHLTComponentLogSeverity)0x7f);
60 /* enum AliHLTComponentLogSeverity {
62 kHLTLogBenchmark = 0x1,
68 few important messages not to be filtered out.
69 redirected to kHLTLogInfo in AliRoot
70 kHLTLogImportant = 0x40,
71 special value to enable all messages
73 the default logging filter
78 gHLT.LoadComponentLibraries("libAliHLTUtil.so libAliHLTTRD.so libAliHLTMUON.so libAliHLTGlobal.so libAliHLTTrigger.so");
81 AliHLTConfiguration pubDigiConf("TRD-DigiP", "AliLoaderPublisher", NULL , "-loader TRDLoader -tree digits -datatype 'ALITREED' 'TRD '");
84 if(customArgs || disableHLTflag){
85 arg="output_percentage 700 -lowflux -experiment -tailcancellation -faststreamer -yPosMethod LUT -highLevelOutput yes -emulateHLTClusters yes";
89 // clusterizer which processes digits
90 AliHLTConfiguration cfDigiConf("TRD-DigiCF", "TRDOfflineClusterizer", "TRD-DigiP", arg.Data());
93 if(customArgs || disableHLTflag){
94 arg="output_percentage 100 -lowflux -PIDmethod NN -highLevelOutput yes -emulateHLTTracks yes";
98 // tracker reading the output from the clusterizer which processes the digits
99 AliHLTConfiguration trDigiConf("TRD-DigiTR", "TRDOfflineTrackerV1", "TRD-DigiCF", arg.Data());
101 // root file writer (with esd friends and MC)
102 AliHLTConfiguration writerDigiConf("TRD-DigiEsdFile", "TRDEsdWriter", "TRD-DigiTR", "-concatenate-events -concatenate-blocks");
104 gHLT.BuildTaskList(&writerDigiConf);
105 gHLT.Run(runLoader->GetNumberOfEvents());