1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
19 // Manager class for filter decisions based on cuts
20 // The filter contains a list of sets of cuts.
21 // A bit field is filled in order to store the decision of each cut-set.
22 // Author: Andreas Morsch
23 // andreas.morsch@cern.ch
27 #include "AliAnalysisFilter.h"
28 #include "AliAnalysisCuts.h"
31 ClassImp(AliAnalysisFilter)
34 ////////////////////////////////////////////////////////////////////////
36 AliAnalysisFilter::AliAnalysisFilter():
40 // Default constructor
43 AliAnalysisFilter::AliAnalysisFilter(const char* name, const char* title):
50 AliAnalysisFilter::AliAnalysisFilter(const AliAnalysisFilter& obj):
57 UInt_t AliAnalysisFilter::IsSelected(TObject* obj)
60 // Loop over all set of cuts
61 // and store the decision
64 AliAnalysisCuts *cuts;
67 while((cuts = (AliAnalysisCuts*)next())) {
68 Bool_t acc = cuts->IsSelected(obj);
69 if (acc) {result |= iCutB & 0x00ffffff;}
76 void AliAnalysisFilter::Init()
79 // Loop over all set of cuts and call Init
81 AliAnalysisCuts *cuts;
82 while((cuts = (AliAnalysisCuts*)next())) cuts->Init();
85 void AliAnalysisFilter::AddCuts(AliAnalysisCuts* cuts)