source: releases/Mars.2014.05.26/mfbase/MFilterList.h

Last change on this file was 14448, checked in by tbretz, 12 years ago
Added some missing std::
File size: 2.1 KB
Line 
1#ifndef MARS_MFilterList
2#define MARS_MFilterList
3
4/////////////////////////////////////////////////////////////////////////////
5// //
6// MFilterList //
7// //
8// List of several filters //
9// //
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef ROOT_TOrdCollection
13#include <TOrdCollection.h>
14#endif
15#ifndef MARS_MFilter
16#include "MFilter.h"
17#endif
18
19class MParList;
20
21class MFilterList : public MFilter
22{
23private:
24 TOrdCollection fFilters; // Container for the filters
25
26 typedef enum { kEAnd, kEOr, kEXor, kELAnd, kELOr } FilterType_t;
27 FilterType_t fFilterType;
28
29 enum { kIsOwner = BIT(14) };
30
31 void StreamPrimitive(std::ostream &out) const;
32
33 void Init(const char *name, const char *title);
34
35public:
36 MFilterList(const char *type="&&", const char *name=NULL, const char *title=NULL);
37 MFilterList(MFilter *f, const char *name=NULL, const char *title=NULL);
38 MFilterList(MFilterList &ts);
39 ~MFilterList()
40 {
41 if (TestBit(kIsOwner))
42 fFilters.SetOwner();
43 }
44
45 Bool_t AddToList(MFilter *filter);
46 Bool_t AddToList(const TCollection &col);
47 void SetOwner(Bool_t enable=kTRUE) { enable ? SetBit(kIsOwner) : ResetBit(kIsOwner); }
48
49 Bool_t IsExpressionTrue() const;
50
51 void Print(Option_t *opt = "") const;
52
53 TString GetRule() const { return GetRule(""); }
54 TString GetRule(Option_t *opt) const;
55 TString GetDataMember() const;
56
57 Int_t GetNumEntries() const { return fFilters.GetEntries(); }
58
59 Bool_t ReInit(MParList *plist);
60 Int_t PreProcess(MParList *pList);
61 Int_t Process();
62 Int_t PostProcess();
63
64 void SetAccelerator(Byte_t acc=kAccStandard);
65
66 void SetVariables(const TArrayD &arr);
67
68 ClassDef(MFilterList, 1) // List to combine several filters logically
69};
70
71#endif
Note: See TracBrowser for help on using the repository browser.