]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
add wrapper to TESTBIT macro to select TRD tasks
authorabercuci <abercuci@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 15 Sep 2010 12:31:50 +0000 (12:31 +0000)
committerabercuci <abercuci@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 15 Sep 2010 12:31:50 +0000 (12:31 +0000)
PWG1/TRD/AliTRDpwg1Helper.cxx
PWG1/TRD/AliTRDpwg1Helper.h
PWG1/macros/AddTrainPerformanceTRD.C

index 11e7a49db0868e1a752a58cd719fe52d56962ed8..21e9796263d89f3f42a9afa344bc54d62f155026 100644 (file)
@@ -53,6 +53,12 @@ const Char_t * AliTRDpwg1Helper::fgkTRDtaskOpt[AliTRDpwg1Helper::kNTRDTASKS+1] =
   ,"ALL"
 };
 
+//______________________________________________________
+Bool_t AliTRDpwg1Helper::DoTask(Int_t idx, Int_t map)
+{
+  return TESTBIT(map, idx);
+}
+
 //______________________________________________________
 Int_t AliTRDpwg1Helper::ParseOptions(Char_t *trd)
 {
index d38b58fb815e425e87b632f395c51f4ed1a18b45..c5527234ebffaf465803ffaed343dd8ea2de9e74 100644 (file)
@@ -47,6 +47,7 @@ public:
   AliTRDpwg1Helper();
   ~AliTRDpwg1Helper();
 
+  static Bool_t DoTask(Int_t idx, Int_t map);
   static Int_t  GetTaskIndex(const Char_t *name);
   static Bool_t HasReadMCData(Char_t *opt);
   static Bool_t HasReadFriendData(Char_t *opt);
index 0e70d1c864574c7140552e8995deb9cef68cffb6..3b31caf17d8c8f2e7d191da14120cab4f6fb0f42 100644 (file)
@@ -90,11 +90,11 @@ Bool_t AddTrainPerformanceTRD(Char_t *trd="ALL", const Char_t *addMacroPath = "$
   Info("AddTrainPerformanceTRD", Form("TRD wagons \"%s\"", trd));
   Int_t bitmap = AliTRDpwg1Helper::ParseOptions(trd);
   for(Int_t it=0; it<AliTRDpwg1Helper::kNTRDQATASKS; it++){
-    //if(!TESTBIT(bitmap, it)) continue;
     if(gROOT->LoadMacro(Form("%s/Add%s.C+", addMacroPath, TString(AliTRDpwg1Helper::TaskClassName(it))(3,20).Data()))) {
       Error("AddTrainPerformanceTRD()", Form("Error loading %s task.", AliTRDpwg1Helper::TaskClassName(it)));
       return kFALSE;
     } 
+    if(!AliTRDpwg1Helper::DoTask(it, bitmap)) continue;
 
     switch(it){
     case AliTRDpwg1Helper::kCheckESD: