1 // This macro is used to profile the HLT::TRD code
2 // usage: aliroot aliHLTTRDrun.cxx("/data/sim/") reconstruct raw ddls, /data/run/ must contain subfolders rawX
4 #if !defined (__CINT__) || defined (__MAKECINT__)
14 #include "AliHLTSystem.h"
16 #include "AliHLTDataTypes.h"
17 #include "AliHLTConfiguration.h"
19 #include <valgrind/callgrind.h>
24 #include "readCDBentry.h"
26 void aliHLTTRDrun(const TString inDir = gSystem->pwd());
27 int main(int argc, char** argv)
29 if(argc==2) aliHLTTRDrun(argv[1]);
33 void aliHLTTRDrun(const TString inDir)
37 Bool_t fullTRD=kFALSE;
39 // If not use these SMs:
40 Int_t TRDmodules[18] = {0,1,7,8,9,10,17,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1};
42 // Use custom arguments for components? i.e.: not reading OCDB arguments
43 Bool_t customArgs=kFALSE;
46 Bool_t disableHLTflag=kFALSE;
50 /////////////////////////////////////
55 for(int i=0; i<18; i++)
58 #if !defined (__CINT__) || defined (__MAKECINT__)
59 std::sort((UInt_t*)TRDmodules, ((UInt_t*)TRDmodules) + 18);
61 for(int i=0; i<18; i++)
62 if(TRDmodules[i]>-1)usedModules++;
66 AliLog::SetGlobalDebugLevel(1);
67 //AliLog::SetClassDebugLevel("AliTRDrawStream", 11);
68 /* enum ETpye {kFatal=0, kError, kWarning, kInfo, kDebug, kMaxType}; */
69 gHLT.SetGlobalLoggingLevel((AliHLTComponentLogSeverity)0x7f);
70 /* enum AliHLTComponentLogSeverity {
72 kHLTLogBenchmark = 0x1,
78 few important messages not to be filtered out.
79 redirected to kHLTLogInfo in AliRoot
80 kHLTLogImportant = 0x40,
81 special value to enable all messages
83 the default logging filter
88 gHLT.LoadComponentLibraries("libAliHLTUtil.so libAliHLTTRD.so libAliHLTMUON.so libAliHLTGlobal.so libAliHLTTrigger.so");
90 InitGRP("local://$ALICE_ROOT/OCDB","local:///software/data/ppbench"/*inDir.Data()*/);
91 //TString sGeomPath = " -geometry "+inDir+"/geometry.root";
92 TString inFolder = inDir+"/raw", inFile = "/TRD_", inExt = ".ddl";
93 TString sinput = " -datatype 'DDL_RAW ' 'TRD '";
95 Int_t spec, startEvent=0, nEvents=240, ddl; //KR: start=10, nEvents=30;
96 for(Int_t Event=startEvent; Event<(nEvents+startEvent); Event++){
100 for(int module=0; module<usedModules; module++){
101 spec=TMath::Power(2,TRDmodules[module]);
102 ddl=TRDmodules[module]+1024;
106 sinput+=" -dataspec ";
108 sinput+=" -datafile ";
111 sinput+=" -nextevent";
113 printf("%s\n",sinput.Data());
114 TString sCFArgs = "";
115 TString sTrackerArgs = "";
117 if(customArgs || disableHLTflag){
118 sCFArgs = readCDBentry("HLT/ConfigTRD/ClusterizerComponent"); //output_percentage 100 -lowflux -experiment -tailcancellation -faststreamer -yPosMethod LUT
119 sTrackerArgs = readCDBentry("HLT/ConfigTRD/TrackerV1Component"); //"output_percentage 100 -lowflux -NTimeBins 24";
120 sCFArgs += ""; // -processTracklets
121 sTrackerArgs += ""; // -highLevelOutput yes -emulateHLToutput no
123 sCFArgs +=" -HLTflag no";
124 sTrackerArgs +=" -HLTflag no";
128 // ======== Configuring chain
130 AliHLTConfiguration Hsource("Hsource", "FilePublisher", 0, sinput);
131 AliHLTConfiguration HClusterizer("HClusterizer", "TRDClusterizer", "Hsource", sCFArgs);
132 AliHLTConfiguration HWriterCF("HWriterCF", "FileWriter", "HClusterizer", "-directory output/ -datafile cf.out");
133 AliHLTConfiguration HClustMultTrig("HClustMultTrig", "TrdClusterMultiplicityTrigger", "HClusterizer", "-MultiplicityThresh 400");
135 AliHLTConfiguration HTracker("HTracker", "TRDTrackerV1", "HClusterizer", sTrackerArgs);
136 AliHLTConfiguration HCalib("HCalib", "TRDCalibration", "HTracker", "-pushback-period=10 -TrgStr hi -rejectTrgStr");
137 AliHLTConfiguration HWriterCalib("HWriterCalib", "ROOTFileWriter", "HCalib", "-directory output/ -datafile calib.root -concatenate-events -concatenate-blocks -write-all-events");
139 AliHLTConfiguration HESDMaker("HESDMaker", "GlobalEsdConverter", "HTracker", "-notree");
140 AliHLTConfiguration HTrackMerger("HTrackMerger", "GlobalTrackMerger", "HTracker", "");
142 AliHLTConfiguration HClHisto("HClHisto", "TRDClusterHisto", "HClusterizer", "-pushback-period=10");
143 AliHLTConfiguration HClWriterHisto("HClWriterHisto", "ROOTFileWriter", "HClHisto", "-directory output/ -datafile clHisto.root -concatenate-events -concatenate-blocks");
145 AliHLTConfiguration HTrHisto("HTrHisto", "TRDTrackHisto", "HTracker", "-pushback-period=10");
146 AliHLTConfiguration HTrWriterHisto("HTrWriterHisto", "ROOTFileWriter", "HTrHisto", "-directory output/ -datafile trHisto.root -concatenate-events -concatenate-blocks");
148 AliHLTConfiguration writerOffConf("esdWriter", "TRDEsdWriter", "HTracker", "-datafile AliHLTTRDESDs.root -concatenate-events -concatenate-blocks");
150 gHLT.BuildTaskList(&HTracker);
151 //gHLT.BuildTaskList(&HESDMaker);
152 //gHLT.BuildTaskList(&writerOffConf);
153 //gHLT.BuildTaskList(&HCalib);