1 void hlt_rec(const char* input="./") {
4 // AliCDBManager::Instance()->SetDefaultStorage("raw://");
8 if(!gSystem->AccessPathName("galice.root")){
9 cerr << "please delete the galice.root or run at different place." << endl;
14 cerr << "please specify input or run without arguments" << endl;
18 //////////////////////////////////////////////////////////////////////////////////////////////////
20 // init the HLT system in order to define the analysis chain below
23 AliHLTSystem* gHLT=AliHLTPluginBase::GetInstance();
25 gHLT->LoadComponentLibraries("libAliHLTUtil.so");
26 gHLT->LoadComponentLibraries("libAliHLTRCU.so");
27 gHLT->LoadComponentLibraries("libAliHLTCalo.so");
28 gHLT->LoadComponentLibraries("libAliHLTEMCAL.so");
29 gHLT->LoadComponentLibraries("libAliHLTPHOS.so");
30 gHLT->LoadComponentLibraries("libAliHLTGlobal.so");
32 //////////////////////////////////////////////////////////////////////////////////////////////////
34 // define the analysis chain to be run
37 // Define which modules and RCUs to use
43 // The number of RCUs per module in EMCAL (used for calculating data specification)
45 Int_t rcusPerModule = 2;
46 Int_t ddlOffset = 4608; // The DDL offset for EMCAL (for PHOS the number is 1792)
48 TString arg, fwInput, ecInput, dm;
50 // Loop over the modules/RCUs
51 for (int module = moduleStart; module <= moduleEnd; module++)
55 for(int rcu = rcuStart; rcu <= rcuEnd; rcu++)
57 TString publisher, rawanalyzer, dm;
60 publisher.Form("EMC-RP_%02d_%d", module, rcu);
62 arg.Form("-verbose -minid %d -datatype 'DDL_RAW ' 'EMCA' -dataspec 0x%x ", ddlOffset + module*(rcusPerModule) + rcu, 0x1 << (module*rcusPerModule + rcu));
63 AliHLTConfiguration pubConf(publisher.Data(), "AliRawReaderPublisher", NULL , arg.Data());
64 cout << arg.Data() << endl;
68 rawanalyzer.Form("EMC-RA_%02d_%d", module, rcu);
69 AliHLTConfiguration rawConf(rawanalyzer.Data(), "EmcalRawCrude", publisher.Data(), arg.Data());
71 // If you want to have a component subscribing to all the raw analyzers this will be it's input
72 if(fwInput.Length() > 0) fwInput += " ";
74 cout << ">>>>>>>>>> fwInput:" << fwInput << endl;
76 // digit maker components
77 dm.Form("EMC-DM_%02d_%d", module, rcu);
79 // HI-GAIN ~ 15/256 ------ CHECK LOW GAIN FACTOR
80 arg.Form("-highgainfactor 0.0167 -lowgainfactor 0.08");
81 AliHLTConfiguration dmConf(dm.Data(), "EmcalDigitMaker", rawanalyzer.Data(), arg.Data());
82 if(clInput.Length() > 0) clInput += " ";
84 cout << ">>>>>>>>>> clInput:" << clInput << endl;
90 cl.Form("EMC-CL_%02d", module);
92 // digitthreshold was 0.005
93 arg.Form("-digitthreshold 0.0167 -recpointthreshold 0.1");
94 AliHLTConfiguration clConf(cl.Data(), "EmcalClusterizer", clInput.Data(), arg.Data());
95 if(ecInput.Length() > 0) ecInput += " ";
98 } // end of module loop
102 // The call the histo maker
104 arg.Form("-pushfraction 5 -beverbose 1");
105 test = ecInput + " " + fwInput + " ";
106 AliHLTConfiguration hfConf("emcalHisto","EmcalRawHistoMaker",test.Data(), arg.Data());
107 ecInput += " emcalHisto";
108 cout << ">>>>>>>>>> test:" << test << endl;
110 ec.Form("ESD-CONVERTER");
112 AliHLTConfiguration esdcconf(ec.Data(), "GlobalEsdConverter" , ecInput.Data(), "");
116 // arg.Form("-datatype 'CHANNELT' 'EMCA' -datafile RAout.root -concatenate-blocks -concatenate-events");
117 // AliHLTConfiguration fwConf("filewriter", "FileWriter", fwInput.Data(), arg.Data());
119 // The call the histo maker
121 // arg.Form("-pushfraction 5 -beverbose 1");
122 // AliHLTConfiguration hfConf("emcalHisto","EmcalRawHistoMaker",fwInput.Data(), arg.Data());
124 // Write the root file
125 //AliHLTConfiguration rwConf("rootFileHisto","ROOTFileWriter", "emcalHisto ESD-CONVERTER","-datafile roothisto.root -concatenate-events -overwrite");
130 //////////////////////////////////////////////////////////////////////
132 // Init and run the reconstruction
133 // All but HLT reconstruction is switched off
135 /////////////////////////////////////////////////////////////////////
137 TString option="libAliHLTUtil.so libAliHLTRCU.so libAliHLTCalo.so libAliHLTEMCAL.so libAliHLTGlobal.so chains=";
138 option+="ESD-CONVERTER";
139 //option+="rootFileHisto loglevel=0x5f";
141 AliReconstruction rec;
144 // uncomment for simulation
145 rec.SetDefaultStorage("local://$ALICE_ROOT/OCDB");
146 rec.SetSpecificStorage("GRP/GRP/Data", Form("local://%s",gSystem->pwd()));
148 rec.SetRunReconstruction(":");
149 rec.SetEventRange(0,10);
152 //rec.SetInput("raw.root");
153 rec.SetRunVertexFinder(kFALSE);
155 rec.SetRunReconstruction("HLT");
156 //rec.SetRunTracking(":");
157 rec.SetLoadAlignFromCDB(0);
160 rec.SetOption("HLT", option);