]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
update HLT of TRD macros (Ttheo)
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 15 Feb 2010 06:37:38 +0000 (06:37 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 15 Feb 2010 06:37:38 +0000 (06:37 +0000)
- read custom parameters from CDB entry first, in order to not hard code
strings that should be read from OCDB
- use standard parameters as default

HLT/TRD/macros/aliHLTTRDrun.cxx
HLT/TRD/macros/initGRP.h
HLT/TRD/macros/readCDBentry.h [new file with mode: 0644]
HLT/TRD/macros/rec-hlt-trd-digits.cxx
HLT/TRD/macros/rec-hlt-trd.cxx

index ebe19dc78c31d2d0d3ffbd53675a510ce9a0fcaf..07e88a21a47adf5e47eaeef259f03e60299c77ab 100644 (file)
@@ -21,6 +21,7 @@
 #endif
 
 #include "initGRP.h"
+#include "readCDBentry.h"
 
 void aliHLTTRDrun(const TString inDir = gSystem->pwd());
 int main(int argc, char** argv)
@@ -39,7 +40,7 @@ void aliHLTTRDrun(const TString inDir)
   Int_t TRDmodules[18] = {0,1,7,8,9,10,17,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1};
 
   // Use custom arguments for components? i.e.: not reading OCDB arguments
-  Bool_t customArgs=kTRUE;
+  Bool_t customArgs=kFALSE;
 
   // Disable HLT flag?
   Bool_t disableHLTflag=kFALSE;
@@ -86,11 +87,12 @@ void aliHLTTRDrun(const TString inDir)
 
   gHLT.LoadComponentLibraries("libAliHLTUtil.so libAliHLTTRD.so libAliHLTMUON.so libAliHLTGlobal.so libAliHLTTrigger.so");
 
-  InitGRP("local://$ALICE_ROOT/OCDB",inDir.Data());
+  InitGRP("local://$ALICE_ROOT/OCDB","local:///software/data/ppbench"/*inDir.Data()*/);
+  //TString sGeomPath = " -geometry "+inDir+"/geometry.root";
   TString inFolder = inDir+"/raw", inFile = "/TRD_", inExt = ".ddl";
   TString sinput = " -datatype 'DDL_RAW ' 'TRD '";
   TString temp1, temp2;
-  Int_t spec, startEvent=10, nEvents=30, ddl;  //KR: start=10, nEvents=20;
+  Int_t spec, startEvent=0, nEvents=240, ddl;  //KR: start=10, nEvents=30;
   for(Int_t Event=startEvent; Event<(nEvents+startEvent); Event++){
     temp1=inFolder;
     temp1+=Event;
@@ -109,12 +111,14 @@ void aliHLTTRDrun(const TString inDir)
     sinput+=" -nextevent";
   }
   printf("%s\n",sinput.Data());
-  TString sCFArgs = "";//"output_percentage 700 -lowflux -simulation -tailcancellation -yPosMethod LUT"; //-processTracklets
-  TString sTrackerArgs = "";//"output_percentage 100 -lowflux -NTimeBins 24";
+  TString sCFArgs = "";
+  TString sTrackerArgs = "";
 
   if(customArgs || disableHLTflag){
-    sCFArgs = "output_percentage 700 -lowflux -experiment -tailcancellation -faststreamer -yPosMethod LUT";
-    sTrackerArgs = "output_percentage 100 -lowflux -PIDmethod NN"; // -highLevelOutput yes -emulateHLTTracks yes
+    sCFArgs = readCDBentry("HLT/ConfigTRD/ClusterizerComponent"); //output_percentage 100 -lowflux -experiment -tailcancellation -faststreamer -yPosMethod LUT
+    sTrackerArgs = readCDBentry("HLT/ConfigTRD/TrackerV1Component"); //"output_percentage 100 -lowflux -NTimeBins 24";
+    sCFArgs += ""; // -processTracklets
+    sTrackerArgs += ""; // -highLevelOutput yes -emulateHLToutput no
     if(disableHLTflag){
       sCFArgs +=" -HLTflag no";
       sTrackerArgs +=" -HLTflag no";
@@ -129,19 +133,22 @@ void aliHLTTRDrun(const TString inDir)
   AliHLTConfiguration HClustMultTrig("HClustMultTrig", "TrdClusterMultiplicityTrigger", "HClusterizer", "-MultiplicityThresh 400");
 
   AliHLTConfiguration HTracker("HTracker", "TRDTrackerV1", "HClusterizer", sTrackerArgs);
-  AliHLTConfiguration HCalib("HCalib", "TRDCalibration", "HTracker", "-TrgStr hi -rejectTrgStr");
-  AliHLTConfiguration HWriterCalib("HWriterCalib", "ROOTFileWriter", "HCalib", "-directory output/ -datafile calib.root -concatenate-events -concatenate-blocks  -write-all-events");
+  AliHLTConfiguration HCalib("HCalib", "TRDCalibration", "HTracker", "-pushback-period=10 -TrgStr hi -rejectTrgStr");
+  AliHLTConfiguration HWriterCalib("HWriterCalib", "ROOTFileWriter", "HCalib", "-directory output/ -datafile calib.root -concatenate-events -concatenate-blocks -write-all-events");
 
   AliHLTConfiguration HESDMaker("HESDMaker", "GlobalEsdConverter", "HTracker", "-notree");
   AliHLTConfiguration HTrackMerger("HTrackMerger", "GlobalTrackMerger", "HTracker", "");
 
   AliHLTConfiguration HClHisto("HClHisto", "TRDClusterHisto", "HClusterizer", "-pushback-period=10");
-  AliHLTConfiguration HWriterHisto("HWriterHisto", "ROOTFileWriter", "HClHisto", "-directory output/ -datafile histo.root -concatenate-events -concatenate-blocks");
+  AliHLTConfiguration HClWriterHisto("HClWriterHisto", "ROOTFileWriter", "HClHisto", "-directory output/ -datafile clHisto.root -concatenate-events -concatenate-blocks");
+
+  AliHLTConfiguration HTrHisto("HTrHisto", "TRDTrackHisto", "HTracker", "-pushback-period=10");
+  AliHLTConfiguration HTrWriterHisto("HTrWriterHisto", "ROOTFileWriter", "HTrHisto", "-directory output/ -datafile trHisto.root -concatenate-events -concatenate-blocks");
 
   AliHLTConfiguration writerOffConf("esdWriter", "TRDEsdWriter", "HTracker", "-datafile AliHLTTRDESDs.root -concatenate-events -concatenate-blocks");
 
   gHLT.BuildTaskList(&HTracker); 
-  //gHLT.BuildTaskList(&HClHisto);
+  //gHLT.BuildTaskList(&HESDMaker);
   //gHLT.BuildTaskList(&writerOffConf);
   //gHLT.BuildTaskList(&HCalib);
 
index 61b30336115ca30758a77b43f6c9f46ca1b29c52..a51586c819a5bb2ced8cf7a982bf4b439ba49f66 100644 (file)
@@ -14,7 +14,7 @@ Bool_t InitGRP(TString OCDBpath, TString GRPpath="") {
   //------------------------------------
 
   AliCDBManager::Instance()->SetDefaultStorage(OCDBpath.Data());
-  AliCDBManager::Instance()->SetSpecificStorage("GRP/GRP/Data", Form("local://%s",GRPpath.Data()));
+  AliCDBManager::Instance()->SetSpecificStorage("GRP/GRP/Data", GRPpath.Data());
   AliCDBManager::Instance()->SetRun(0);
 
   AliCDBEntry* entry = AliCDBManager::Instance()->Get("GRP/GRP/Data");
diff --git a/HLT/TRD/macros/readCDBentry.h b/HLT/TRD/macros/readCDBentry.h
new file mode 100644 (file)
index 0000000..200b3b9
--- /dev/null
@@ -0,0 +1,14 @@
+#if !defined (__CINT__) || defined (__MAKECINT__)
+
+#include "AliCDBManager.h"
+#include "AliCDBPath.h"
+#include "AliCDBEntry.h"
+#include "TObjString.h"
+#endif
+
+TString readCDBentry(TString arg){
+  AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
+  AliCDBEntry* entry = AliCDBManager::Instance()->Get(arg.Data());
+  TObjString* objstr = dynamic_cast<TObjString*>(entry->GetObject());
+  return objstr->GetString();
+}
index a04b945155d269d9acedae3bce35689a2fcf3721..1ec7bc15dcd639b59755fa0a2ee0ebe40adc3aa8 100644 (file)
@@ -1,6 +1,6 @@
 // This macro is used to make performace studies with MC info
 // usage: aliroot rec-hlt-trd-digits.cxx("/data/run/")    reconstruct local digits file
-//    or copy into folder and aliroot rec-hlt-trd.cxx             reconstruct local digits file in pwd
+//    or copy into folder and aliroot rec-hlt-trd.cxx     reconstruct local digits file in pwd
 
 #if !defined (__CINT__) || defined (__MAKECINT__)
 
@@ -25,6 +25,7 @@
 #endif
 
 #include "initGRP.h"
+#include "readCDBentry.h"
 
 int rec_hlt_trd_digits(const TString input = gSystem->pwd());
 int main(int argc, char** argv)
@@ -36,7 +37,7 @@ int main(int argc, char** argv)
 int rec_hlt_trd_digits(const TString input){
 
   // Use custom arguments for components? i.e.: not reading OCDB arguments
-  Bool_t customArgs=kTRUE;
+  Bool_t customArgs=kFALSE;
 
   // Disable HLT flag?
   Bool_t disableHLTflag=kFALSE;
@@ -47,7 +48,7 @@ int rec_hlt_trd_digits(const TString input){
 
   gSystem->ChangeDirectory(input.Data());
 
-  InitGRP("local://$ALICE_ROOT/OCDB",gSystem->pwd());
+  InitGRP("local://$ALICE_ROOT/OCDB",Form("local://",gSystem->pwd()));
   
   AliRunLoader* runLoader = AliRunLoader::Open("galice.root");
   AliHLTOfflineInterface::SetParamsToComponents(runLoader, NULL);
@@ -82,16 +83,18 @@ int rec_hlt_trd_digits(const TString input){
 
   TString arg="";
   if(customArgs || disableHLTflag){
-    arg="output_percentage 700 -lowflux -experiment -tailcancellation -faststreamer -yPosMethod LUT -highLevelOutput yes -emulateHLTClusters yes";
+    arg = readCDBentry("HLT/ConfigTRD/ClusterizerComponent"); //output_percentage 100 -lowflux -experiment -tailcancellation -faststreamer -yPosMethod LUT
+    arg += " -highLevelOutput yes -emulateHLToutput no";
     if(disableHLTflag)
-      arg+=" -HLTflag no";
+      arg += " -HLTflag no";
   }
   // clusterizer which processes digits
   AliHLTConfiguration cfDigiConf("TRD-DigiCF", "TRDOfflineClusterizer", "TRD-DigiP", arg.Data());
 
   arg="";
   if(customArgs || disableHLTflag){
-    arg="output_percentage 100 -lowflux -PIDmethod NN -highLevelOutput yes -emulateHLTTracks yes";
+    arg = readCDBentry("HLT/ConfigTRD/TrackerV1Component"); //"output_percentage 100 -lowflux -NTimeBins 24";
+    arg += " -highLevelOutput yes -emulateHLToutput no";
     if(disableHLTflag)
       arg+=" -HLTflag no";
   }
index 1641458e2644266e375bc050d2c11aef9dc680eb..f1a1f8afe2f76b84347595dae4d91dd2c4071c3b 100644 (file)
@@ -1,4 +1,4 @@
-// This macro is used to simulate the HLT reconstruction
+// This macro is used to simulate the HLT::TRD reconstruction
 // usage: aliroot rec-hlt-trd.cxx("/data/run/raw.root")    reconstruct local raw root file (you might add "alien://" to reconstruct remotely)
 //    or: aliroot rec-hlt-trd.cxx("/data/run/")            reconstruct local raw ddls *1
 //    or copy into folder and aliroot rec-hlt-trd.cxx      reconstruct raw.root in pwd
@@ -36,6 +36,7 @@
 #include "AliExternalTrackParam.h"
 #endif
 
+#include "readCDBentry.h"
 
 int rec_hlt_trd(const TString input ="raw.root", TString outPath=gSystem->pwd());
 Int_t ExtractRunNumber(const TString str);
@@ -55,7 +56,7 @@ int rec_hlt_trd(const TString filename, TString outPath)
   //
   
   // What chains should be run? (usually would be: TRD-OffEsdFile)
-  TString chains="TRD-CalibFile";
+  TString chains="TRD-OffEsdFile";
 
   // cosmics or not
   Bool_t bCosmics=kFALSE;
@@ -70,7 +71,7 @@ int rec_hlt_trd(const TString filename, TString outPath)
   Int_t TRDmodules[18] = {0,1,7,8,9,10,17,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1};
 
   // Use custom arguments for components? i.e.: not reading OCDB arguments
-  Bool_t customArgs=kTRUE;
+  Bool_t customArgs=kFALSE;
 
   // Disable HLT flag?
   Bool_t disableHLTflag=kFALSE;
@@ -153,9 +154,10 @@ int rec_hlt_trd(const TString filename, TString outPath)
       // Clusterizer
       arg = "";
       if(customArgs || disableHLTflag){
-       arg="output_percentage 700 -lowflux -experiment -tailcancellation -faststreamer -yPosMethod LUT";
+       arg = readCDBentry("HLT/ConfigTRD/ClusterizerComponent"); //output_percentage 100 -lowflux -experiment -tailcancellation -faststreamer -yPosMethod LUT
+       arg += "";
        if(disableHLTflag)
-         arg+=" -HLTflag no";
+         arg += " -HLTflag no";
       }
 
       cf.Form("TRD-CF_%02d", TRDmodules[module]);
@@ -167,9 +169,10 @@ int rec_hlt_trd(const TString filename, TString outPath)
       // Tracker
       arg="";
       if(customArgs || disableHLTflag){
-       arg="output_percentage 100 -lowflux -PIDmethod NN";
+       arg = readCDBentry("HLT/ConfigTRD/TrackerV1Component"); //"output_percentage 100 -lowflux -NTimeBins 24";
+       arg += "";   
        if(disableHLTflag)
-         arg+=" -HLTflag no";
+         arg += " -HLTflag no";
       }
 
       tr.Form("TRD-TR_%02d", TRDmodules[module]);
@@ -179,12 +182,10 @@ int rec_hlt_trd(const TString filename, TString outPath)
       afterTr+=tr;
 
       // Offline Tracker (for debug purposes only)
-      arg="";
-      if(customArgs || disableHLTflag){
-       arg="output_percentage 100 -lowflux -PIDmethod NN -highLevelOutput yes -emulateHLTTracks yes";
-       if(disableHLTflag)
-         arg+=" -HLTflag no";
-      }
+      arg = readCDBentry("HLT/ConfigTRD/TrackerV1Component"); //"output_percentage 100 -lowflux -NTimeBins 24";
+      arg += " -highLevelOutput yes -emulateHLToutput no";
+      if(disableHLTflag)
+       arg+=" -HLTflag no";
 
       trOff.Form("TRD-TROFF_%02d", TRDmodules[module]);
       AliHLTConfiguration trOffConf(trOff.Data(), "TRDOfflineTrackerV1", cf.Data(), arg.Data());