]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
reverting r43169, to be committed with corrected log message
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 27 Aug 2010 12:14:55 +0000 (12:14 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 27 Aug 2010 12:14:55 +0000 (12:14 +0000)
HLT/TRD/macros/rec-hlt-trd-digits.cxx
HLT/TRD/macros/rec-hlt-trd.cxx

index 31767f447cf86e6bae27527538d6ef7e5ca974ae..d2ffe1b59ee6d04b97ceee6e237d9ca4448cb03d 100644 (file)
 #include "initGRP.h"
 #include "readCDBentry.h"
 
-int rec_hlt_trd_digits(const TString input = gSystem->pwd(), const TString extra="");
+int rec_hlt_trd_digits(const TString input = gSystem->pwd());
 int main(int argc, char** argv)
 {
-  switch(argc){
-  case 1: return rec_hlt_trd_digits(); break;
-  case 2: return rec_hlt_trd_digits(argv[1]); break;
-  case 3: return rec_hlt_trd_digits(argv[1],argv[2]); break;
-  default: printf("error\n"); return 1; break;
-  }
+  if(argc==2) return rec_hlt_trd_digits(argv[1]);
+  else return rec_hlt_trd_digits();
 }
 
-int rec_hlt_trd_digits(const TString input, const TString extra){
+int rec_hlt_trd_digits(const TString input){
 
-  // Use custom arguments for components? i.e.: not reading OCDB arguments
-  Bool_t customArgs=kTRUE;
+  // Use custom arguments for components?
+  Bool_t customArgs=kFALSE;
 
   // Disable HLT flag?
   Bool_t disableHLTflag=kFALSE;
 
-  ////////////////////////////////
 
-  printf("customArgs: %i\n",customArgs);
-  printf("disableHLTflag: %i\n",disableHLTflag);
-  printf("extra: %s\n",extra.Data());
+
+  ////////////////////////////////
 
   gSystem->ChangeDirectory(input.Data());
 
@@ -88,31 +82,23 @@ int rec_hlt_trd_digits(const TString input, const TString extra){
   AliHLTConfiguration pubDigiConf("TRD-DigiP", "AliLoaderPublisher", NULL , "-loader TRDLoader -tree digits -datatype 'ALITREED' 'TRD '");
 
   TString arg="";
-  if(customArgs || disableHLTflag || extra.Length()){
+  if(customArgs || disableHLTflag){
     arg = readCDBentry("HLT/ConfigTRD/ClusterizerComponent"); //output_percentage 100 -lowflux -experiment -tailcancellation -faststreamer -yPosMethod LUT
     if(customArgs)
       arg += " -highLevelOutput yes -emulateHLToutput no";
     if(disableHLTflag)
       arg += " -HLTflag no";
-    if(extra.Length()>0){
-      arg += " ";
-      arg += extra.Data();
-    }
   }
   // clusterizer which processes digits
   AliHLTConfiguration cfDigiConf("TRD-DigiCF", "TRDOfflineClusterizer", "TRD-DigiP", arg.Data());
 
   arg="";
-  if(customArgs || disableHLTflag || extra.Length()){
+  if(customArgs || disableHLTflag){
     arg = readCDBentry("HLT/ConfigTRD/TrackerV1Component"); //"output_percentage 100 -lowflux -NTimeBins 24";
     if(customArgs)
       arg += " -highLevelOutput yes -emulateHLToutput no";
     if(disableHLTflag)
       arg+=" -HLTflag no";
-    if(extra.Length()>0){
-      arg += " ";
-      arg += extra.Data();
-    }
   }
   // tracker reading the output from the clusterizer which processes the digits
   AliHLTConfiguration trDigiConf("TRD-DigiTR", "TRDOfflineTrackerV1", "TRD-DigiCF", arg.Data());
@@ -123,3 +109,4 @@ int rec_hlt_trd_digits(const TString input, const TString extra){
   gHLT.BuildTaskList("TRD-DigiEsdFile");
   gHLT.Run(runLoader->GetNumberOfEvents());
 }
+
index ef90e44e87ccb96ccaf5de3116330feea17db1bf..a93fbf474facf1b6542873a89fd5f7677708edaf 100644 (file)
 
 #include "readCDBentry.h"
 
-int rec_hlt_trd(const TString input ="raw.root", TString outPath=gSystem->pwd(), const TString extra="");
+int rec_hlt_trd(const TString input ="raw.root", TString outPath=gSystem->pwd());
 Int_t ExtractRunNumber(const TString str);
-Int_t ExtractYear(const TString str);
 int main(int argc, char** argv)
 {
   if(argc==2) return rec_hlt_trd(argv[1]);
   else if(argc==3) return rec_hlt_trd(argv[1],argv[2]);
-  else if(argc==4) return rec_hlt_trd(argv[1],argv[2],argv[3]);
   else return rec_hlt_trd();
 }
 
-int rec_hlt_trd(const TString filename, TString outPath, const TString extra)
+int rec_hlt_trd(const TString filename, TString outPath)
 {
   
   ///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -101,7 +99,6 @@ int rec_hlt_trd(const TString filename, TString outPath, const TString extra)
   printf("File path %s\n",dataPath.Data());
   printf("Processing file %s\n",extInput.Data());
   printf("Output to %s\n",outPath.Data());
-  printf("extra: %s\n",extra.Data());
 
   if(!gSystem->AccessPathName("galice.root")){
     cerr << "please delete the galice.root or run at different place." << endl;
@@ -145,7 +142,7 @@ int rec_hlt_trd(const TString filename, TString outPath, const TString extra)
       if(TRDmodules[i]>-1)usedModules++;
   }
 
-  TString option="libAliHLTUtil.so libAliHLTTRD.so libAliHLTGlobal.so libAliHLTTrigger.so loglevel=0x7f chains=";
+  TString option="libAliHLTUtil.so libAliHLTTRD.so libAliHLTMUON.so libAliHLTGlobal.so libAliHLTTrigger.so loglevel=0x7f chains=";
   option+=chains;
   TString afterTr, afterTrOff, afterCf, afterCal;
 
@@ -159,16 +156,12 @@ int rec_hlt_trd(const TString filename, TString outPath, const TString extra)
       
       // Clusterizer
       arg = "";
-      if(customArgs || disableHLTflag || extra.Length()){
+      if(customArgs || disableHLTflag){
        arg = readCDBentry("HLT/ConfigTRD/ClusterizerComponent"); //output_percentage 100 -lowflux -experiment -tailcancellation -faststreamer -yPosMethod LUT
        if(customArgs)
          arg += "";
        if(disableHLTflag)
          arg += " -HLTflag no";
-       if(extra.Length()>0){
-         arg += " ";
-         arg += extra.Data();
-       }
       }
 
       cf.Form("TRD-CF_%02d", TRDmodules[module]);
@@ -179,16 +172,12 @@ int rec_hlt_trd(const TString filename, TString outPath, const TString extra)
 
       // Tracker
       arg="";
-      if(customArgs || disableHLTflag || extra.Length()){
+      if(customArgs || disableHLTflag){
        arg = readCDBentry("HLT/ConfigTRD/TrackerV1Component"); //"output_percentage 100 -lowflux -NTimeBins 24";
        if(customArgs)
          arg += "";
        if(disableHLTflag)
          arg += " -HLTflag no";
-       if(extra.Length()>0){
-         arg += " ";
-         arg += extra.Data();
-       }
       }
 
       tr.Form("TRD-TR_%02d", TRDmodules[module]);
@@ -200,13 +189,9 @@ int rec_hlt_trd(const TString filename, TString outPath, const TString extra)
       // Offline Tracker (for debug purposes only)
       arg = readCDBentry("HLT/ConfigTRD/TrackerV1Component"); //"output_percentage 100 -lowflux -NTimeBins 24";
       if(customArgs)
-       arg += " -highLevelOutput yes -emulateHLToutput no"; 
+       arg += " -highLevelOutput yes -emulateHLToutput no";
       if(disableHLTflag)
        arg+=" -HLTflag no";
-      if(extra.Length()>0){
-       arg += " ";
-       arg += extra.Data();
-      }
 
       trOff.Form("TRD-TROFF_%02d", TRDmodules[module]);
       AliHLTConfiguration trOffConf(trOff.Data(), "TRDOfflineTrackerV1", cf.Data(), arg.Data());
@@ -226,34 +211,16 @@ int rec_hlt_trd(const TString filename, TString outPath, const TString extra)
     }
 
   // cluster histogramm
-  AliHLTConfiguration clHistoConf("TRD-ClHisto", "TRDClusterHisto", afterCf.Data(), "");
-  AliHLTConfiguration writerClHistoConf( "TRD-ClHistoFile", "ROOTFileWriter", "TRD-ClHisto", "-directory hlt-trd-histo/ -datafile clHisto.root -concatenate-events -concatenate-blocks -overwrite");
-
-  AliHLTConfiguration clHistoMerg("TRD-ClHistoMerg", "TRDHistoMerger", "TRD-ClHisto", "");
-  AliHLTConfiguration writerClHistoMerg("TRD-ClHistoMergFile", "ROOTFileWriter", "TRD-ClHistoMerg", "-directory hlt-trd-histo/ -datafile clMergeHisto.root -concatenate-events -concatenate-blocks -overwrite");
-
-  // track histogramm
-  AliHLTConfiguration trHistoConf("TRD-TrHisto", "TRDTrackHisto", afterTr.Data(), "");
-  AliHLTConfiguration writerTrHistoConf( "TRD-TrHistoFile", "ROOTFileWriter", "TRD-TrHisto", "-directory hlt-trd-histo/ -datafile trHisto.root -concatenate-events -concatenate-blocks -overwrite");
-
-  AliHLTConfiguration trHistoMerg("TRD-TrHistoMerg", "TRDHistoMerger", "TRD-TrHisto", "");
-  AliHLTConfiguration writerTrHistoMerg("TRD-TrHistoMergFile", "ROOTFileWriter", "TRD-TrHistoMerg", "-directory hlt-trd-histo/ -datafile trMergeHisto.root -concatenate-events -concatenate-blocks -overwrite");
-
-  // // calibration histo (you may use tr or trOff here)
-  // AliHLTConfiguration calibHistoConf("TRD-CalibHisto", "TRDCalibHisto", afterTr.Data(), "-takeAllEvents");
-  // AliHLTConfiguration writerCalibHistoConf( "TRD-CalibHistoFile", "ROOTFileWriter", "TRD-CalibHisto", "-directory hlt-trd-calib/ -datafile calibHisto.root -concatenate-events -concatenate-blocks -write-all-events");
-
-  // // new calibration
-  // AliHLTConfiguration calibFitConf("TRD-CalibFit", "TRDCalibFit", "TRD-CalibHisto", "");
-  // AliHLTConfiguration writerCalibFitConf( "TRD-CalibFitFile", "ROOTFileWriter", "TRD-CalibFit", "-directory hlt-trd-calib/ -datafile calibFit.root -concatenate-events -concatenate-blocks -write-all-events");
+  AliHLTConfiguration histoConf("TRD-ClHisto", "TRDClusterHisto", afterCf.Data(), "");
+  AliHLTConfiguration writerHistoConf( "TRD-ClHistoFile", "ROOTFileWriter", "TRD-ClHisto", "-directory hlt-trd-histo/ -datafile histo.root -concatenate-events -concatenate-blocks");
 
   // new calibration (SM wise)
   AliHLTConfiguration calibFitConf("TRD-CalibFit", "TRDCalibFit", afterCal.Data(), "");
-  AliHLTConfiguration writerCalibFitConf( "TRD-CalibFitFile", "ROOTFileWriter", "TRD-CalibFit", "-directory hlt-trd-calib/ -datafile calibFit.root -concatenate-events -concatenate-blocks -write-all-events -overwrite");
+  AliHLTConfiguration writerCalibFitConf( "TRD-CalibFitFile", "ROOTFileWriter", "TRD-CalibFit", "-directory hlt-trd-calib/ -datafile calibFit.root -concatenate-events -concatenate-blocks -write-all-events");
 
   // old calibration (you may use tr or trOff here)
   AliHLTConfiguration calibConf("TRD-Calib", "TRDCalibration", afterTr.Data(), "-takeAllEvents");
-  AliHLTConfiguration writerCalibConf( "TRD-CalibFile", "ROOTFileWriter", "TRD-Calib", "-directory hlt-trd-calib/ -datafile calib.root -concatenate-events -concatenate-blocks -write-all-events -overwrite");
+  AliHLTConfiguration writerCalibConf( "TRD-CalibFile", "ROOTFileWriter", "TRD-Calib", "-directory hlt-trd-calib/ -datafile calib.root -concatenate-events -concatenate-blocks -write-all-events");
 
   // esd converter
   AliHLTConfiguration esdConf("TRD-Esd", "GlobalEsdConverter", afterTr.Data(), "-notree");
@@ -270,18 +237,19 @@ int rec_hlt_trd(const TString filename, TString outPath, const TString extra)
   //
   AliCDBManager * man = AliCDBManager::Instance();
   Int_t run = 0;
-  man->SetRun(run);
   if(bRealData){
-    run = ExtractRunNumber(filename);    
-    Int_t year = ExtractYear(filename);
     //alien://folder=/alice/data/2010/OCDB?user=username?cacheF=yourDirectory?cacheS=yourSize
-    man->SetDefaultStorage(Form("alien://folder=/alice/data/20%02i/OCDB",year));
-    man->SetSpecificStorage("GRP/GRP/Data",Form("alien://folder=/alice/data/20%02i/OCDB",year));
-    man->SetSpecificStorage("HLT/*","local://$ALICE_ROOT/OCDB");
+    man->SetDefaultStorage("alien://folder=/alice/data/2009/OCDB?cacheFolder=/tmp/alice/data/2010/OCDB");
+    //man->SetDefaultStorage("alien://folder=/alice/data/2009/OCDB?cacheFold=/lustre/alice/local/alice/data/2009/OCDB"); 
+    man->SetSpecificStorage("GRP/GRP/Data","alien://folder=/alice/data/2010/OCDB?cacheFolder=/tmp/alice/data/2010/OCDB");
+    //man->SetSpecificStorage("GRP/GRP/Data","alien://folder=/alice/data/2009/OCDB?cacheFold=/lustre/alice/local/alice/data/2009/OCDB");
+    man->SetSpecificStorage("HLT/*","local://$ALICE_ROOT/OCDB?cacheFolder=/tmp/alice/data/2010/OCDB");
+    run = ExtractRunNumber(filename);
   }else{
     man->SetDefaultStorage("local://$ALICE_ROOT/OCDB"); 
     man->SetSpecificStorage("GRP/GRP/Data", Form("local://%s",dataPath.Data()));
   }
+  man->SetRun(run);
 
   if(bCosmics){
     // no magnetic field
@@ -291,7 +259,7 @@ int rec_hlt_trd(const TString filename, TString outPath, const TString extra)
   // Find TRD triggers
   TString filestring = filename;
   if(useOnlyTRDtrigger){
-    AliCDBEntry *grp_ctp = man->Get("GRP/CTP/Config",run);
+    AliCDBEntry *grp_ctp = man->Get("GRP/CTP/Config");
     AliTriggerConfiguration *trg_conf = (AliTriggerConfiguration *)grp_ctp->GetObject();
     trg_conf->Print();
     TObjArray trg_masks = trg_conf->GetClasses(); // Reference!!!
@@ -308,13 +276,8 @@ int rec_hlt_trd(const TString filename, TString outPath, const TString extra)
       //        triggerconfs.push_back(trg_class->GetMask());
       // }
 
-      // pp run 2009 and first half 2010
-      // if(TString(trg_class->GetName()).Contains("CINT1B-ABCE-NOPF-ALL")){
-      //   triggerconfs.push_back(trg_class->GetMask());
-      // }
-
-      // second half 2010
-      if(TString(trg_class->GetName()).Contains("CINT1WU-B-NOPF-ALL")){
+      // pp run 2009
+      if(TString(trg_class->GetName()).Contains("CINT1B-ABCE-NOPF-ALL")){
         triggerconfs.push_back(trg_class->GetMask());
       }
 
@@ -362,12 +325,3 @@ Int_t ExtractRunNumber(const TString str){
   TString rstr = fname(2,9);
   return rstr.Atoi();
 }
-
-Int_t ExtractYear(const TString str){
-  TObjArray *ptoks = (TObjArray *)str.Tokenize("?");
-  TString path = ((TObjString *)ptoks->UncheckedAt(0))->String();
-  TObjArray *toks = (TObjArray *)path.Tokenize("/");
-  TString fname = ((TObjString *)(toks->UncheckedAt(toks->GetEntriesFast() - 1)))->String();
-  TString rstr = fname(0,2);
-  return rstr.Atoi();
-}