Implementation of IsSelected(TList*)
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 15 May 2008 11:47:31 +0000 (11:47 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 15 May 2008 11:47:31 +0000 (11:47 +0000)
ANALYSIS/AliAnalysisFilter.cxx

index 59a3359..fd364fc 100644 (file)
@@ -83,6 +83,25 @@ UInt_t AliAnalysisFilter::IsSelected(TObject* obj)
     return result;
 }
 
+UInt_t AliAnalysisFilter::IsSelected(TList* list)
+{
+    //
+    // Loop over all set of cuts
+    // and store the decision
+    UInt_t result = 0;
+    TIter next(fCuts);
+    AliAnalysisCuts *cuts;
+    Int_t iCutB = 1;
+       
+    while((cuts = (AliAnalysisCuts*)next())) {
+       Bool_t acc = cuts->IsSelected(list);
+       if (acc) {result |= iCutB & 0x00ffffff;}
+       iCutB *= 2;
+    }  
+
+    return result;
+}
+
 void AliAnalysisFilter::Init()
 {
     //