fCuts = obj.fCuts;
}
+AliAnalysisFilter::~AliAnalysisFilter()
+{
+// Destructor
+ if (fCuts) fCuts->Delete("slow");
+ delete fCuts;
+}
AliAnalysisFilter& AliAnalysisFilter::operator=(const AliAnalysisFilter& other)
{
// Assignment
- TNamed::operator=(other);
- fCuts = other.fCuts;
- return *this;
+ if (&other != this) {
+ TNamed::operator=(other);
+ fCuts = other.fCuts;
+ }
+ return *this;
}
UInt_t AliAnalysisFilter::IsSelected(TObject* obj)
//
// Returns current result for cut with name
AliAnalysisCuts* cut = (AliAnalysisCuts*) (fCuts->FindObject(name));
- return (cut->Selected());
+ if (cut) {
+ return (cut->Selected());
+ } else {
+ return 0;
+ }
}