#pragma link C++ class AliAnalysisTask+;
#pragma link C++ class AliAnalysisDataSlot+;
#pragma link C++ class AliAnalysisManager+;
-
#pragma link C++ class AliAnalysisSelector+;
-
+#pragma link C++ class AliAnalysisFilter+;
+#pragma link C++ class AliAnalysisCuts+;
#ifdef WITHXML
#pragma link C++ class AliAnalysisGoodies+;
#pragma link C++ class AliTagAnalysis+;
--- /dev/null
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+// Base class for analysis cuts
+// Author Andreas Morsch
+// andreas.morsch@cern.ch
+
+#include <TObject.h>
+#include "AliAnalysisCuts.h"
+
+
+ClassImp(AliAnalysisCuts)
+
+
+////////////////////////////////////////////////////////////////////////
+
+AliAnalysisCuts::AliAnalysisCuts():
+ TNamed()
+{
+ // Default constructor
+}
+
+AliAnalysisCuts::AliAnalysisCuts(const char* name, const char* title):
+ TNamed(name, title)
+{
+ // Constructor
+}
+
+AliAnalysisCuts::AliAnalysisCuts(const AliAnalysisCuts& obj):
+ TNamed(obj)
+{
+}
--- /dev/null
+#ifndef ALIANALYSISCUTS_H
+#define ALIANALYSISCUTS_H
+
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+// Base class for analysis cuts
+// Author Andreas Morsch
+// andreas.morsch@cern.ch
+
+#include <TNamed.h>
+
+class AliAnalysisCuts : public TNamed
+{
+ public:
+ AliAnalysisCuts();
+ AliAnalysisCuts(const char* name, const char* title);
+ AliAnalysisCuts(const AliAnalysisCuts& obj);
+ virtual ~AliAnalysisCuts() {;}
+ virtual Bool_t IsSelected(TObject* obj) = 0;
+ private:
+ ClassDef(AliAnalysisCuts, 1); // Base class for filter decisions on ESD objects
+};
+
+#endif
--- /dev/null
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+//
+// Manager class for filter decisions based on cuts
+// The filter contains a list of sets of cuts.
+// A bit field is filled in order to store the decision of each cut-set.
+// Author: Andreas Morsch
+// andreas.morsch@cern.ch
+
+#include <TObject.h>
+#include <TList.h>
+#include "AliAnalysisFilter.h"
+#include "AliAnalysisCuts.h"
+
+
+ClassImp(AliAnalysisFilter)
+
+
+////////////////////////////////////////////////////////////////////////
+
+AliAnalysisFilter::AliAnalysisFilter():
+ TNamed(),
+ fCuts(0)
+{
+ // Default constructor
+}
+
+AliAnalysisFilter::AliAnalysisFilter(const char* name, const char* title):
+ TNamed(name, title),
+ fCuts(new TList())
+{
+ // Constructor
+}
+
+AliAnalysisFilter::AliAnalysisFilter(const AliAnalysisFilter& obj):
+ TNamed(obj)
+{
+// Copy constructor
+}
+
+
+UInt_t AliAnalysisFilter::IsSelected(TObject* obj)
+{
+ //
+ // 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(obj);
+ if (acc) {result |= iCutB & 0x00ffffff;}
+ iCutB *= 2;
+ }
+
+ return result;
+}
+
+void AliAnalysisFilter::AddCuts(AliAnalysisCuts* cuts)
+{
+ // Add a set of cuts
+ fCuts->Add(cuts);
+}
--- /dev/null
+#ifndef ALIANALYSISFILTER_H
+#define ALIANALYSISFILTER_H
+
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+//
+// Manager class for filter decisions based on cuts
+// Author: Andreas Morsch
+// andreas.morsch@cern.ch
+
+#include <TNamed.h>
+
+class AliAnalysisCuts;
+
+class AliAnalysisFilter : public TNamed
+{
+ public:
+ AliAnalysisFilter();
+ AliAnalysisFilter(const char* name, const char* title = "AnalysisFilter");
+ AliAnalysisFilter(const AliAnalysisFilter& obj);
+ virtual ~AliAnalysisFilter() {;}
+ virtual UInt_t IsSelected(TObject* obj);
+ virtual void AddCuts(AliAnalysisCuts* cuts);
+ private:
+ TList* fCuts; // List of cuts
+ ClassDef(AliAnalysisFilter, 1); // Manager class for filter decisions
+};
+
+#endif
SRCS = AliAnalysisDataContainer.cxx AliAnalysisDataSlot.cxx \
AliAnalysisManager.cxx AliAnalysisTask.cxx \
- AliAnalysisSelector.cxx
+ AliAnalysisSelector.cxx \
+ AliAnalysisFilter.cxx AliAnalysisCuts.cxx
+
CHECKALIEN = $(shell root-config --has-alien)
ifeq (yes,$(CHECKALIEN))